[HeapVerify=2] Fix Assert failure "Pointer updated without using write barrier" ...
authorLeslie Zhai <zhaixiang@loongson.cn>
Wed, 26 Aug 2020 09:53:17 +0000 (17:53 +0800)
committerGitHub <noreply@github.com>
Wed, 26 Aug 2020 09:53:17 +0000 (02:53 -0700)
* [HeapVerify=2] Fix Assert failure "Pointer updated without using write barrier"

src/coreclr/src/gc/gc.cpp

index c0775bb..a678a1b 100644 (file)
@@ -1987,6 +1987,8 @@ void stomp_write_barrier_resize(bool is_runtime_suspended, bool requires_upper_b
 
 void stomp_write_barrier_ephemeral(uint8_t* ephemeral_low, uint8_t* ephemeral_high)
 {
+    initGCShadow();
+
     WriteBarrierParameters args = {};
     args.operation = WriteBarrierOp::StompEphemeral;
     args.is_runtime_suspended = true;
@@ -37414,11 +37416,6 @@ void gc_heap::update_recorded_gen_data (last_recorded_gc_info* gc_info)
 
 void gc_heap::do_post_gc()
 {
-    if (!settings.concurrent)
-    {
-        initGCShadow();
-    }
-
 #ifdef MULTIPLE_HEAPS
     gc_heap* hp = g_heaps[0];
 #else