Fix a large object space issue with the GSS collector.

Objects in the large object space weren't properly collected because
large objects on the allocation stack weren't copied from the live set
to the marked set.

(Cherrypick commit c7c9fdff117cd53a12aaefb0f5bc9b3245de6a02 from master.)

Bug: 12553120
Bug: 11650816
Change-Id: Ib67394eb6de0520fe215c9e6e6988a7dd59cdd48
diff --git a/runtime/gc/collector/semi_space.cc b/runtime/gc/collector/semi_space.cc
index 99c726d..a273e5a 100644
--- a/runtime/gc/collector/semi_space.cc
+++ b/runtime/gc/collector/semi_space.cc
@@ -119,7 +119,6 @@
   if (generational_ && !whole_heap_collection_) {
     // We won't collect the large object space if a bump pointer space only collection.
     is_large_object_space_immune_ = true;
-    GetHeap()->GetLargeObjectsSpace()->CopyLiveToMarked();
   }
   timings_.EndSplit();
 }
@@ -287,6 +286,11 @@
 
   if (is_large_object_space_immune_) {
     DCHECK(generational_ && !whole_heap_collection_);
+    // Delay copying the live set to the marked set until here from
+    // BindBitmaps() as the large objects on the allocation stack may
+    // be newly added to the live set above in MarkAllocStackAsLive().
+    GetHeap()->GetLargeObjectsSpace()->CopyLiveToMarked();
+
     // When the large object space is immune, we need to scan the
     // large object space as roots as they contain references to their
     // classes (primitive array classes) that could move though they