Skip to content

Commit 27b1e1a

Browse files
Jiawei Tangshipilev
authored andcommitted
8330146: assert(!_thread->is_in_any_VTMS_transition()) failed
Backport-of: c4ff58b9bcfd08eae0623a648a837e08f25b3f9b
1 parent 27abeb8 commit 27b1e1a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/hotspot/share/prims/jvmtiExport.cpp

Lines changed: 7 additions & 7 deletions
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();
@@ -1363,10 +1365,9 @@ void JvmtiExport::post_class_load(JavaThread *thread, Klass* klass) {
13631365
if (state == nullptr) {
13641366
return;
13651367
}
1366-
if (thread->is_in_tmp_VTMS_transition()) {
1367-
return; // skip ClassLoad events in tmp VTMS transition
1368+
if (thread->is_in_any_VTMS_transition()) {
1369+
return; // no events should be posted if thread is in any VTMS transition
13681370
}
1369-
assert(!thread->is_in_any_VTMS_transition(), "class load events are not allowed in any VTMS transition");
13701371

13711372
EVT_TRIG_TRACE(JVMTI_EVENT_CLASS_LOAD, ("[%s] Trg Class Load triggered",
13721373
JvmtiTrace::safe_get_thread_name(thread)));
@@ -1401,10 +1402,9 @@ void JvmtiExport::post_class_prepare(JavaThread *thread, Klass* klass) {
14011402
if (state == nullptr) {
14021403
return;
14031404
}
1404-
if (thread->is_in_tmp_VTMS_transition()) {
1405-
return; // skip ClassPrepare events in tmp VTMS transition
1405+
if (thread->is_in_any_VTMS_transition()) {
1406+
return; // no events should be posted if thread is in any VTMS transition
14061407
}
1407-
assert(!thread->is_in_any_VTMS_transition(), "class prepare events are not allowed in any VTMS transition");
14081408

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

0 commit comments

Comments
 (0)