[crac] RFR: Fix NPE on ZipFile$Source access

Anton Kozlov akozlov at openjdk.java.net
Thu Mar 3 13:57:57 UTC 2022


A race between ZipFile$CleanableResource.run() and ZipFile$Resource.beforeCheckpoint() can lead to NullPointerException when zsrc == null. This is observed on some runs of JavaCompilerCRaC.java from #16. The change aligns beforeCheckpoint() with the run(), providing the zsrc check and the proper locking.

-------------

Commit messages:
 - Fix NPE on ZipFile$Source access

Changes: https://git.openjdk.java.net/crac/pull/17/files
 Webrev: https://webrevs.openjdk.java.net/?repo=crac&pr=17&range=00
  Stats: 28 lines in 1 file changed: 13 ins; 10 del; 5 mod
  Patch: https://git.openjdk.java.net/crac/pull/17.diff
  Fetch: git fetch https://git.openjdk.java.net/crac pull/17/head:pull/17

PR: https://git.openjdk.java.net/crac/pull/17


More information about the crac-dev mailing list