Fix moving GC bugs in MonitorEnter and MonitorExit
Fixes test 088 with gcstress mode.
Change-Id: Iaeb91f62f22233e403e97e954bfdc8dc367e63c8
diff --git a/runtime/monitor.h b/runtime/monitor.h
index 8cd93c6..61235ef 100644
--- a/runtime/monitor.h
+++ b/runtime/monitor.h
@@ -65,12 +65,16 @@
// NO_THREAD_SAFETY_ANALYSIS for mon->Lock.
static mirror::Object* MonitorEnter(Thread* thread, mirror::Object* obj)
EXCLUSIVE_LOCK_FUNCTION(obj)
- SHARED_REQUIRES(Locks::mutator_lock_) NO_THREAD_SAFETY_ANALYSIS;
+ NO_THREAD_SAFETY_ANALYSIS
+ REQUIRES(!Roles::uninterruptible_)
+ SHARED_REQUIRES(Locks::mutator_lock_);
// NO_THREAD_SAFETY_ANALYSIS for mon->Unlock.
static bool MonitorExit(Thread* thread, mirror::Object* obj)
+ NO_THREAD_SAFETY_ANALYSIS
+ REQUIRES(!Roles::uninterruptible_)
SHARED_REQUIRES(Locks::mutator_lock_)
- UNLOCK_FUNCTION(obj) NO_THREAD_SAFETY_ANALYSIS;
+ UNLOCK_FUNCTION(obj);
static void Notify(Thread* self, mirror::Object* obj) SHARED_REQUIRES(Locks::mutator_lock_) {
DoNotify(self, obj, false);