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

Coleen Phillimore coleenp at openjdk.org
Thu Dec 8 14:31:12 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 and is unsafe in the modern code.
Tested with tier1-5, where 5 found the original bug.
I'll also rebase this to JDK 20 repository and close this, but here's a preview.

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

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

Changes: https://git.openjdk.org/jdk/pull/11594/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11594&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8296955
  Stats: 50 lines in 2 files changed: 2 ins; 32 del; 16 mod
  Patch: https://git.openjdk.org/jdk/pull/11594.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11594/head:pull/11594

PR: https://git.openjdk.org/jdk/pull/11594


More information about the hotspot-dev mailing list