RFR: [8036088] - Thread-unsafe strtok() is used to parse the list of overrides
Ivan Gerasimov
ivan.gerasimov at oracle.com
Mon Mar 3 09:01:15 PST 2014
Hi Christos!
On 03.03.2014 20:52, christos at zoulas.com wrote:
> On Mar 3, 8:32pm, ivan.gerasimov at oracle.com (Ivan Gerasimov) wrote:
> -- Subject: RFR: [8036088] - Thread-unsafe strtok() is used to parse the list
>
> | Hello!
> |
> | The strtok() function is used in
> | ./windows/native/sun/net/spi/DefaultProxySelector.c.
> | This function is not thread safe, so it may potentially cause a problem.
> |
> | The failure in this particular place would be very unlikely, because
> | this code should be executed only once during initialization.
> | Therefore, no regtest provided.
> |
> | The fix would be to use a thread-safe equivalent, which is strtok_s()
> | under Windows.
> |
> | Would you please help review this simple fix?
> |
> | BUGURL: https://bugs.openjdk.java.net/browse/JDK-8036088
> | WEBREV: http://cr.openjdk.java.net/~igerasim/8036088/0/webrev/
>
> Doesn't windows have strtok_r() IEEE Std 1003.1c-1995 (``POSIX.1'').
MSDN does not refer to strtok_r().
Grepping the JDK code shows that strtok_s() is used in the
windows-specific code.
Sincerely yours,
Ivan
> christos
>
>
More information about the net-dev
mailing list