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

Reviewed-by: thartmann
Backport-of: 74822ce12acaf9816aa49b75ab5817ced3710776
This commit is contained in:
Boris Ulasevich 2025-07-11 11:59:32 +00:00
parent 9adc480ec3
commit 44f5dfef97
2 changed files with 3 additions and 0 deletions

View File

@ -210,6 +210,8 @@ void CodeBlob::purge() {
if (_mutable_data != blob_end()) {
os::free(_mutable_data);
_mutable_data = blob_end(); // Valid not null address
_mutable_data_size = 0;
_relocation_size = 0;
}
if (_oop_maps != nullptr) {
delete _oop_maps;

View File

@ -2166,6 +2166,7 @@ void nmethod::purge(bool unregister_nmethod) {
}
CodeCache::unregister_old_nmethod(this);
JVMCI_ONLY( _metadata_size = 0; )
CodeBlob::purge();
}