RFR(s): 8148425: strerror() function is not thread-safe
thomas.stuefe at gmail.com
Fri Feb 26 16:05:00 UTC 2016
please take a look at this proposed fix:
This adds a replacement function os::strerror() as a drop-in for
strerror(), which has a number of issues.
strerror() is unsafe to use and may cause (and has caused) crashes in
multithreaded scenarios. It is also not ideal for log files because of the
implicit localization of the error messages.
For details please see the discussion under the bug report.
Please note that I did not yet change any call sites, although all call
sites in the os namespace should already use the new function. I wanted to
see whether there would be any general objections.
Kind Regards, Thomas
More information about the hotspot-runtime-dev