summaryrefslogtreecommitdiffstats
path: root/runtime/thread.h
diff options
context:
space:
mode:
authorSerguei Katkov <serguei.i.katkov@intel.com>2014-05-26 11:23:39 +0700
committerSerguei Katkov <serguei.i.katkov@intel.com>2014-06-02 10:41:55 +0700
commita309d76d4c9f4e5564b09708004bf4b2e3401bb3 (patch)
tree64390ebfb947779a72bf1c3cb950778d1c90b9bc /runtime/thread.h
parente4283be97047a26d3476acd3863dcc386498be17 (diff)
downloadart-a309d76d4c9f4e5564b09708004bf4b2e3401bb3.tar.gz
art-a309d76d4c9f4e5564b09708004bf4b2e3401bb3.tar.bz2
art-a309d76d4c9f4e5564b09708004bf4b2e3401bb3.zip
Fix GC race condition in visit roots
While GC visits roots other code can change the set pending exception due to lack of synchronization. Change-Id: If387944ac933a66fe176df066c3a0ea52131cad4 Signed-off-by: Serguei Katkov <serguei.i.katkov@intel.com>
Diffstat (limited to 'runtime/thread.h')
-rw-r--r--runtime/thread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/thread.h b/runtime/thread.h
index 88b4b0de8f..6569a962a0 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -326,7 +326,7 @@ class Thread {
tlsPtr_.throw_location = throw_location;
}
- void ClearException() {
+ void ClearException() SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
tlsPtr_.exception = nullptr;
tlsPtr_.throw_location.Clear();
}