Request for review: Race conditions in java.nio.charset.Charset (original) (raw)

Ulf Zibis Ulf.Zibis at gmx.de
Tue Oct 6 22:09:15 UTC 2009


I.) Internal charset cache will be corrupted in theoretical race conditions:

Startpoint: cache1 --> Charset1 cache2 --> Charset2

Scenario 1:

Scenario 2:

II.) Endless loop, if VM's default charset (called by Charset.defaultCharset()) needs to load mapping data via Class.getResourceAsStream():

Note: The error condition, described in http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6795536 is fixed since Bug ID 6797688, but the endless loop, getting the default charset, remains.

See my patches here: https://bugs.openjdk.java.net/show_bug.cgi?id=100107

-Ulf



More information about the core-libs-dev mailing list