Replace the static error string in ZIP_Put_In_Cache0 with on stack memory (original) (raw)

Alan Bateman Alan.Bateman at oracle.com
Wed Apr 11 20:09:05 UTC 2012


On 11/04/2012 15:58, Sean Chou wrote:

Hi hotspot guys,

Would any one like to take a look at this? I'm trying to fix a potential race in ZIPOpen, it is found classLoader.cpp uses this function. So a webrev for hotspot is made as well, but I need a sponsor from hotspot as suggested by Alan Bateman. The start of this thread is http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-April/009766.html . The webrevs: http://cr.openjdk.java.net/~zhouyx/7159982/webrev-hotspot.00/ <http://cr.openjdk.java.net/%7Ezhouyx/7159982/webrev-hotspot.00/> and http://cr.openjdk.java.net/~zhouyx/7159982/webrev.00/ <http://cr.openjdk.java.net/%7Ezhouyx/7159982/webrev.00/> . And, I found JDKVersion::isgtejdk18xversion suggested by Alan does not exist in hotspot yet, shall I add it to the patch too ? I had a brief chat with Coleen Phillimore about this. One suggestion that would avoid HotSpot changes is to change ZIP_Open so that it doesn't return an error message or returns something fixed. It's not used in the VM anyway (as per Coleen's reply). We need the error message for the java.util.zip APIs but that doesn't go through ZIP_Open so it means it can be freed and *pmsg = NULL returned (or a pointer to one fixed generic message).

-Alan



More information about the core-libs-dev mailing list