RFR: 8214944: replace strerror by os::strerror

David Holmes david.holmes at oracle.com
Thu Dec 6 12:56:51 UTC 2018


Hi Matthias,

On 6/12/2018 8:36 pm, Baesken, Matthias wrote:
> Hello  , please review this small fix .
> 
> Hotspot still has a few uses of the thread unsafe strerror function.
> Most places where strerror has been used previously, were already replaced by os::strerror  (using a errno_to_string error text array).
> 
> But a few places remained and should also use better use  os:strerror.

It's not that they "remain" but were added later. Previous strerror 
replacement was done under JDK-8148425. The new uses in OS-specific 
get_mtime functions were added in a few weeks later by JDK-8146879. The 
ZGC use is obviously much more recent.

Pity there is no way to detect when we use something like that which we 
shouldn't.

Fix looks good.

Thanks,
David
-----

> 
> Bug/webrev :
> 
> https://bugs.openjdk.java.net/browse/JDK-8214944
> 
> http://cr.openjdk.java.net/~mbaesken/webrevs/8214944.0/
> 
> 
> Thanks, Matthias
> 


More information about the hotspot-dev mailing list