8285595: Assert frame anchor doesn't change in safepoints/handshakes

Reviewed-by: rehn, coleenp
This commit is contained in:
Ron Pressler 2022-04-28 09:56:31 +00:00 committed by Robbin Ehn
parent 5629c7555f
commit d7514b068f

View File

@ -112,6 +112,7 @@ void SafepointMechanism::update_poll_values(JavaThread* thread) {
}
void SafepointMechanism::process(JavaThread *thread, bool allow_suspend, bool check_async_exception) {
DEBUG_ONLY(intptr_t* sp_before = thread->last_Java_sp();)
// Read global poll and has_handshake after local poll
OrderAccess::loadload();
@ -140,6 +141,7 @@ void SafepointMechanism::process(JavaThread *thread, bool allow_suspend, bool ch
update_poll_values(thread);
OrderAccess::cross_modify_fence();
assert(sp_before == thread->last_Java_sp(), "Anchor has changed");
}
void SafepointMechanism::initialize_header(JavaThread* thread) {