Skip to content

Commit c4ff58b

Browse files
author
Serguei Spitsyn
committedMay 9, 2024
8330146: assert(!_thread->is_in_any_VTMS_transition()) failed
Reviewed-by: cjplummer, kevinw
1 parent aaa90b3 commit c4ff58b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎src/hotspot/share/prims/jvmtiExport.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,9 @@ class JvmtiClassFileLoadHookPoster : public StackObj {
929929
_cached_class_file_ptr = cache_ptr;
930930
_has_been_modified = false;
931931

932-
assert(!_thread->is_in_any_VTMS_transition(), "CFLH events are not allowed in any VTMS transition");
932+
if (_thread->is_in_any_VTMS_transition()) {
933+
return; // no events should be posted if thread is in any VTMS transition
934+
}
933935
_state = JvmtiExport::get_jvmti_thread_state(_thread);
934936
if (_state != nullptr) {
935937
_class_being_redefined = _state->get_class_being_redefined();
@@ -1366,10 +1368,9 @@ void JvmtiExport::post_class_load(JavaThread *thread, Klass* klass) {
13661368
if (state == nullptr) {
13671369
return;
13681370
}
1369-
if (thread->is_in_tmp_VTMS_transition()) {
1370-
return; // skip ClassLoad events in tmp VTMS transition
1371+
if (thread->is_in_any_VTMS_transition()) {
1372+
return; // no events should be posted if thread is in any VTMS transition
13711373
}
1372-
assert(!thread->is_in_any_VTMS_transition(), "class load events are not allowed in any VTMS transition");
13731374

13741375
EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Trg Class Load triggered",
13751376
JvmtiTrace::safe_get_thread_name(thread)));
@@ -1404,10 +1405,9 @@ void JvmtiExport::post_class_prepare(JavaThread *thread, Klass* klass) {
14041405
if (state == nullptr) {
14051406
return;
14061407
}
1407-
if (thread->is_in_tmp_VTMS_transition()) {
1408-
return; // skip ClassPrepare events in tmp VTMS transition
1408+
if (thread->is_in_any_VTMS_transition()) {
1409+
return; // no events should be posted if thread is in any VTMS transition
14091410
}
1410-
assert(!thread->is_in_any_VTMS_transition(), "class prepare events are not allowed in any VTMS transition");
14111411

14121412
EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_PREPARE, ("[%s] Trg Class Prepare triggered",
14131413
JvmtiTrace::safe_get_thread_name(thread)));

0 commit comments

Comments
 (0)