8220351: Cross-modifying code

Reviewed-by: rrich, mdoerr, dholmes, eosterlund
This commit is contained in:
Robbin Ehn 2019-03-28 11:08:23 +01:00
parent dbe0da648a
commit 76cdc8016f
21 changed files with 96 additions and 13 deletions

View file

@ -282,6 +282,7 @@ class ThreadBlockInVM : public ThreadStateTransition {
}
~ThreadBlockInVM() {
trans_and_fence(_thread_blocked, _thread_in_vm);
OrderAccess::cross_modify_fence();
// We don't need to clear_walkable because it will happen automagically when we return to java
}
};
@ -336,6 +337,8 @@ class ThreadBlockInVMWithDeadlockCheck : public ThreadStateTransition {
_thread->set_thread_state(_thread_in_vm);
CHECK_UNHANDLED_OOPS_ONLY(_thread->clear_unhandled_oops();)
OrderAccess::cross_modify_fence();
}
};