[jdk25u] RFR: 8358183: [JVMCI] crash accessing nmethod::jvmci_name in CodeCache::aggregate

Tobias Hartmann thartmann at openjdk.org
Thu Jul 10 14:56:44 UTC 2025


On Fri, 4 Jul 2025 15:06:23 GMT, Boris Ulasevich <bulasevich at openjdk.org> wrote:

> This is the backport of the JVMCI metadata crash fix.
> 
> Issue:
> When flushing nmethods via CodeBlob::purge(), the JVMCI metadata was freed (mutable_data) but its size fields remained non-zero. As a result, invoking heap analytics via jcmd Compiler.CodeHeap_Analytics still walks the purged metadata and calls jvmci_name() on arbitrary memory, leading to intermittent crashes
> 
> Fix:
> Extend CodeBlob::purge() to zero out the _mutable_data_size, _relocation_size, and _metadata_size fields so that after a purge jvmci_data_size() returns 0 and CompileBroker::print_heapinfo() skips any JVMCI metadata

Shouldn't this go to JDK 25, not JDK 25u?

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

PR Comment: https://git.openjdk.org/jdk25u/pull/13#issuecomment-3057808780


More information about the jdk-updates-dev mailing list