RFR(S): 8214773: Replace use of thread unsafe strtok
Nils Eliasson
nils.eliasson at oracle.com
Tue Dec 4 10:28:58 UTC 2018
Hi Tobias,
I prefer that too. Thanks for noticing!
// Nils
On 2018-12-04 11:22, Tobias Hartmann wrote:
> Hi Nils,
>
> this looks good to me but I prefer consistency of the pointer asterisk in declarations. I.e., either
> use "char* var" (preferred) or "char *var". No new webrev required.
>
> Thanks,
> Tobias
>
> On 04.12.18 11:01, Nils Eliasson wrote:
>> Hi,
>>
>> Hotspot has a few uses of the thread unsafe strtok function. Most of the them are probably benign
>> since they happen during startup. The use in compilerDirectives however has been reported to cause
>> errors in user applications that also use strtok though jni. (See bug report or mail to compiler list.)
>>
>> In this patch I replace all uses of strtok. The call need to go through the os specific files since
>> windows uses a different function (strtok_s) than the rest of the platforms (strtok_r).
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8214773
>>
>> Webrev: http://cr.openjdk.java.net/~neliasso/8214773/webrev.01/
>>
>> Thanks to Andre Gillet at Nuance who reported the bug.
>>
>> Regards,
>>
>> Nils Eliasson
>>
More information about the hotspot-compiler-dev
mailing list