[Live-devel] setlocale 0xc0000374 heap corruption - LOCALE_NOT_USED is OK

Ross Finlayson finlayson at live555.com
Tue Oct 26 13:07:44 PDT 2021



> On Oct 27, 2021, at 5:29 AM, Jonathan Brady via live-devel <live-devel at us.live555.com> wrote:
> 
> 	• On Windows setlocale is not thread safe
>https://social.msdn.microsoft.com/Forums/windowsserver/en-US/b46aa226-d337-43c3-8d15-135f6fca9b53/setlocale-behavior-in-multithreaded-applications?forum=vcgeneral
> 	• It hasn't been thread safe since Visual C++ 2012.
>https://www.tolon.co.uk/2014/10/beware-setlocale/

Thanks for the info.  Although we can try to make our code safe to run in multiple threads, there’s not a lot we can do if an underlying language runtime library or OS call is not thread safe.

Another reason to avoid threads, if possible.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list