[jdk20] RFR: 8296955: Kitchensink.java failed with "double free or corruption (!prev): <addr>"

Coleen Phillimore coleenp at openjdk.org
Fri Dec 9 12:35:36 UTC 2022


Thanks to Kim for the diagnosis of this problem.  G1 cleans up nmethods in parallel threads during a safepoint and may post or queue unload events to be posted.  The event posting creates jmethodIDs.  The jmethodID code assumes that it's thread safe in a safepoint, which it is not.
I removed this optimization, which isn't much of an optimization (did run some sanity performance tests) and is unsafe in the modern code.
Tested with tier1-7, where tier5 found the original bug.

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

Commit messages:
 - 8296955: Kitchensink.java failed with "double free or corruption (!prev): <addr>"

Changes: https://git.openjdk.org/jdk20/pull/10/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk20&pr=10&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296955
  Stats: 89 lines in 3 files changed: 14 ins; 50 del; 25 mod
  Patch: https://git.openjdk.org/jdk20/pull/10.diff
  Fetch: git fetch https://git.openjdk.org/jdk20 pull/10/head:pull/10

PR: https://git.openjdk.org/jdk20/pull/10


More information about the hotspot-dev mailing list