8373367: interp-only mechanism fails to work for carrier threads in a corner case

This commit is contained in:
Serguei Spitsyn 2026-01-26 17:41:15 -08:00
parent 3d919ad43a
commit 4e3ff29a54

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2026, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
@ -124,6 +124,10 @@ JvmtiThreadState::JvmtiThreadState(JavaThread* thread, oop thread_oop)
} }
thread->set_interp_only_mode(false); thread->set_interp_only_mode(false);
} }
if (JvmtiEnvBase::is_thread_carrying_vthread(thread, thread_oop)) {
_thread_saved = thread;
_thread = nullptr;
}
} }