8246381: VM crashes with "Current BasicObjectLock* below than low_mark"

Save and restores "donotunlock" flag in check_and_handle_async_exceptions

Reviewed-by: coleenp, dholmes
This commit is contained in:
Jamsheed Mohammed C M 2020-07-16 08:28:55 -07:00
parent 4320afbd58
commit d63aebe6cb
3 changed files with 22 additions and 17 deletions

View file

@ -2281,7 +2281,8 @@ void JavaThread::remove_monitor_chunk(MonitorChunk* chunk) {
// _thread_in_native_trans state (such as from
// check_special_condition_for_native_trans()).
void JavaThread::check_and_handle_async_exceptions(bool check_unsafe_error) {
// May be we are at method entry and requires to save do not unlock flag.
UnlockFlagSaver fs(this);
if (has_last_Java_frame() && has_async_condition()) {
// If we are at a polling page safepoint (not a poll return)
// then we must defer async exception because live registers