RFR: 8166842: String.hashCode() has a non-benign data race

Peter Levart peter.levart at gmail.com
Wed Sep 28 12:44:10 UTC 2016


Hi,

According to discussion here:

http://cs.oswego.edu/pipermail/concurrency-interest/2016-September/015414.html

it seems compact strings introduced (at least theoretical) non-benign 
data race into String.hasCode() method.

Here is a proposed patch:

http://cr.openjdk.java.net/~plevart/jdk9-dev/8166842_String.hashCode/webrev.01/

For the bug:

     https://bugs.openjdk.java.net/browse/JDK-8166842



JDK 8 did not have this problem, so no back-porting necessary.

Regards, Peter



More information about the core-libs-dev mailing list