RFR: 6907252: ZipFileInputStream Not Thread-Safe

Seán Coffey sean.coffey at oracle.com
Wed Oct 14 13:20:42 UTC 2015

Looking to tighten up access between the java and native level zip 
library calls. This extra check should ensure that we don't hit SEGV on 
thread races.

I've also taken the opportunity to make the ZStreamRef address variable 
volatile. I'm still getting reports of zip crashes in the deflate, 
deflate_slow functions [1] but can't reproduce the failure. Access to 
the ZStreamRef address variable seems to be synchronized correctly in 
all calling sites. I'm just be extra sure for possible sharing across 
multiple threads.

bug report : https://bugs.openjdk.java.net/browse/JDK-6907252
webrev : http://cr.openjdk.java.net/~coffeys/webrev.6907252/webrev/

[1] https://bugs.openjdk.java.net/browse/JDK-8028216


More information about the core-libs-dev mailing list