[jdk25] Integrated: 8358183: [JVMCI] crash accessing nmethod::jvmci_name in CodeCache::aggregate

Boris Ulasevich bulasevich at openjdk.org
Fri Jul 11 12:02:44 UTC 2025


On Thu, 10 Jul 2025 17:40:20 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

This pull request has now been integrated.

Changeset: 44f5dfef
Author:    Boris Ulasevich <bulasevich at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/44f5dfef976bbe81c4b76b8b432f29ca2ea223d4
Stats:     3 lines in 2 files changed: 3 ins; 0 del; 0 mod

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

Reviewed-by: thartmann
Backport-of: 74822ce12acaf9816aa49b75ab5817ced3710776

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

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


More information about the hotspot-compiler-dev mailing list