RFR - 8133249: Occasional SIGSEGV: non thread-safe use of strerr in getLastErrorString

Rob McKenna rob.mckenna at oracle.com
Mon Sep 21 21:38:56 UTC 2015


Thanks Christos:

On 21/09/15 17:32, christos at zoulas.com wrote:
> On Sep 21,  4:53pm, rob.mckenna at oracle.com (Rob McKenna) wrote:
> -- Subject: RFR - 8133249: Occasional SIGSEGV: non thread-safe use of strerr
>
> | Hi folks,
> |
> | Requesting a review of this change which switches corelibs usages of the
> | thread-unsafe strerror over to strerror_r/strerror_s:
> |
> | http://cr.openjdk.java.net/~robm/8133249/webrev.01/
>
> I like this change, but in jdk_strerror.c:
>
> 1. Why are you using "errno" instead of "err" in the linux strerror_r()
>     invocation?

Gah. An oversight. Thanks for catching it.

> 2. Isn't the "Unknown error" test going to break on non-english locales?

Unless I'm misreading the gnu implementation appears to hardcode 
"Unknown error" string for strerror_r. (but not strerror_l)

I'll have a new webrev up soon that addresses the first comment and 
Rogers feedback.

	-Rob

>
> Best,
>
> christos
>



More information about the core-libs-dev mailing list