summaryrefslogtreecommitdiff
path: root/runtime/thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/thread.cc')
-rw-r--r--runtime/thread.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/runtime/thread.cc b/runtime/thread.cc
index 290b87f496..59a170517c 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -2439,9 +2439,11 @@ void Thread::Destroy() {
{
ScopedObjectAccess soa(self);
Runtime::Current()->GetHeap()->RevokeThreadLocalBuffers(this);
- if (kUseReadBarrier) {
- Runtime::Current()->GetHeap()->ConcurrentCopyingCollector()->RevokeThreadLocalMarkStack(this);
- }
+ }
+ // Mark-stack revocation must be performed at the very end. No
+ // checkpoint/flip-function or read-barrier should be called after this.
+ if (kUseReadBarrier) {
+ Runtime::Current()->GetHeap()->ConcurrentCopyingCollector()->RevokeThreadLocalMarkStack(this);
}
}