Skip to content

Commit 39a1e40

Browse files
committed
Fix crash with CheckUnhandledOops
1 parent 144f06c commit 39a1e40

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/hotspot/share/runtime/continuation.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,7 +2928,11 @@ class Freeze {
29282928
_cont.e_add_refs(_oops);
29292929
}
29302930

2931-
if (!is_chunk()) {
2931+
_chunk = chunkh();
2932+
2933+
if (is_chunk()) {
2934+
_top_address = (intptr_t*)InstanceStackChunkKlass::start_of_stack(_chunk) + jdk_internal_misc_StackChunk::sp(_chunk); // TODO: add method to jdk_internal_misc_StackChunk
2935+
} else {
29322936
_cont.add_size(_size); // chunk's size has already been added when originally freezing it
29332937
}
29342938

@@ -2942,11 +2946,6 @@ class Freeze {
29422946

29432947
// java_lang_Continuation::set_tail(_cont.mirror(), _cont.tail()); -- doesn't seem to help
29442948

2945-
if (is_chunk()) {
2946-
_chunk = chunkh();
2947-
_top_address = (intptr_t*)InstanceStackChunkKlass::start_of_stack(_chunk) + jdk_internal_misc_StackChunk::sp(_chunk); // TODO: add method to jdk_internal_misc_StackChunk
2948-
}
2949-
29502949
#ifdef ASSERT
29512950
hframe orig_top_frame = _cont.last_frame<mode_slow>();
29522951
bool empty = _cont.is_empty();

0 commit comments

Comments
 (0)