Revert submission

Reason for revert: b/140119552 has been fixed. The change no longer needed.

Change-Id: I66c4744d8d72992bf01042a5043bd3dcfbbbe005
diff --git a/runtime/gc/collector/concurrent_copying-inl.h b/runtime/gc/collector/concurrent_copying-inl.h
index 544258e..2de7910 100644
--- a/runtime/gc/collector/concurrent_copying-inl.h
+++ b/runtime/gc/collector/concurrent_copying-inl.h
@@ -199,9 +199,6 @@
 inline mirror::Object* ConcurrentCopying::MarkFromReadBarrier(mirror::Object* from_ref) {
   mirror::Object* ret;
   Thread* const self = Thread::Current();
-  // TODO (lokeshgidra): Remove the check once b/140119552 is fixed.
-  CHECK(self->GetThreadLocalMarkStack()
-        != reinterpret_cast<accounting::AtomicStack<mirror::Object>*>(0x1));
   // We can get here before marking starts since we gray immune objects before the marking phase.
   if (from_ref == nullptr || !self->GetIsGcMarking()) {
     return from_ref;
diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc
index d34bbdb..afae3ef 100644
--- a/runtime/gc/collector/concurrent_copying.cc
+++ b/runtime/gc/collector/concurrent_copying.cc
@@ -440,9 +440,6 @@
   void Run(Thread* thread) override REQUIRES_SHARED(Locks::mutator_lock_) {
     // Note: self is not necessarily equal to thread since thread may be suspended.
     Thread* self = Thread::Current();
-    // TODO (lokeshgidra): Remove once b/140119552 is fixed.
-    CHECK(self->GetThreadLocalMarkStack()
-          != reinterpret_cast<accounting::AtomicStack<mirror::Object>*>(0x1));
     CHECK(thread == self || thread->IsSuspended() || thread->GetState() == kWaitingPerformingGc)
         << thread->GetState() << " thread " << thread << " self " << self;
     thread->SetIsGcMarkingAndUpdateEntrypoints(true);
@@ -999,9 +996,7 @@
         << thread->GetState() << " thread " << thread << " self " << self;
     // Revoke thread local mark stacks.
     accounting::AtomicStack<mirror::Object>* tl_mark_stack = thread->GetThreadLocalMarkStack();
-    // TODO (lokeshgidra): remove the 0x1 condition once b/140119552 is fixed.
-    if (tl_mark_stack != nullptr
-        && tl_mark_stack != reinterpret_cast<accounting::AtomicStack<mirror::Object>*>(0x1)) {
+    if (tl_mark_stack != nullptr) {
       MutexLock mu(self, concurrent_copying_->mark_stack_lock_);
       concurrent_copying_->revoked_mark_stacks_.push_back(tl_mark_stack);
       thread->SetThreadLocalMarkStack(nullptr);
@@ -2064,9 +2059,6 @@
     RemoveThreadMarkStackMapping(thread, tl_mark_stack);
     thread->SetThreadLocalMarkStack(nullptr);
   }
-  // TODO (lokeshgidra): storing a non-null value to diagnose b/140119552.
-  // The CL to be reverted once the issue is fixed.
-  thread->SetThreadLocalMarkStack(reinterpret_cast<accounting::AtomicStack<mirror::Object>*>(0x1));
 }
 
 void ConcurrentCopying::ProcessMarkStack() {
diff --git a/runtime/thread.cc b/runtime/thread.cc
index c78d4ec..290b87f 100644
--- a/runtime/thread.cc
+++ b/runtime/thread.cc
@@ -2466,9 +2466,7 @@
     Runtime::Current()->GetHeap()->ConcurrentCopyingCollector()
         ->AssertNoThreadMarkStackMapping(this);
     gc::accounting::AtomicStack<mirror::Object>* tl_mark_stack = GetThreadLocalMarkStack();
-    CHECK(tl_mark_stack == nullptr
-          || tl_mark_stack == reinterpret_cast<gc::accounting::AtomicStack<mirror::Object>*>(0x1))
-        << "mark-stack: " << tl_mark_stack;
+    CHECK(tl_mark_stack == nullptr) << "mark-stack: " << tl_mark_stack;
   }
   // Make sure we processed all deoptimization requests.
   CHECK(tlsPtr_.deoptimization_context_stack == nullptr) << "Missed deoptimization";