Skip to content

Commit c5b7af7

Browse files
author
Vladimir Kozlov
committedJul 20, 2024
8336692: Redo fix for JDK-8284620
Reviewed-by: dlong
1 parent 491b9f5 commit c5b7af7

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed
 

‎src/hotspot/share/asm/codeBuffer.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,11 @@ CodeBuffer::~CodeBuffer() {
135135
// Previous incarnations of this buffer are held live, so that internal
136136
// addresses constructed before expansions will not be confused.
137137
cb->free_blob();
138+
}
139+
if (_overflow_arena != nullptr) {
138140
// free any overflow storage
139-
delete cb->_overflow_arena;
141+
delete _overflow_arena;
140142
}
141-
142143
if (_shared_trampoline_requests != nullptr) {
143144
delete _shared_trampoline_requests;
144145
}
@@ -973,8 +974,6 @@ void CodeBuffer::take_over_code_from(CodeBuffer* cb) {
973974
CodeSection* this_sect = code_section(n);
974975
this_sect->take_over_code_from(cb_sect);
975976
}
976-
_overflow_arena = cb->_overflow_arena;
977-
cb->_overflow_arena = nullptr;
978977
// Make sure the old cb won't try to use it or free it.
979978
DEBUG_ONLY(cb->_blob = (BufferBlob*)badAddress);
980979
}

0 commit comments

Comments
 (0)
Please sign in to comment.