Skip to content

Commit 74822ce

Browse files
author
Boris Ulasevich
committed
8358183: [JVMCI] crash accessing nmethod::jvmci_name in CodeCache::aggregate
Reviewed-by: eastigeevich, phh
1 parent ea86a20 commit 74822ce

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/hotspot/share/code/codeBlob.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,8 @@ void CodeBlob::purge() {
206206
if (_mutable_data != blob_end()) {
207207
os::free(_mutable_data);
208208
_mutable_data = blob_end(); // Valid not null address
209+
_mutable_data_size = 0;
210+
_relocation_size = 0;
209211
}
210212
if (_oop_maps != nullptr) {
211213
delete _oop_maps;

src/hotspot/share/code/nmethod.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2164,6 +2164,7 @@ void nmethod::purge(bool unregister_nmethod) {
21642164
}
21652165
CodeCache::unregister_old_nmethod(this);
21662166

2167+
JVMCI_ONLY( _metadata_size = 0; )
21672168
CodeBlob::purge();
21682169
}
21692170

0 commit comments

Comments
 (0)