From faa782a20b738a9c9921bf54c29c229f4078748d Mon Sep 17 00:00:00 2001 From: Koundinya Veluri Date: Thu, 14 Apr 2016 19:52:55 -0700 Subject: Fix assertion failure on ARM StompWriteBarrierEphemeral may be called on the init path, where the runtime is technically not suspended, but has not started yet. Added a check for g_fEEInit in the call. --- src/gc/gc.cpp | 10 +++++----- src/gc/gcpriv.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/gc/gc.cpp b/src/gc/gc.cpp index 6c3141d682..082713fc71 100644 --- a/src/gc/gc.cpp +++ b/src/gc/gc.cpp @@ -9636,7 +9636,7 @@ void gc_heap::make_generation (generation& gen, heap_segment* seg, uint8_t* star #endif //FREE_USAGE_STATS } -void gc_heap::adjust_ephemeral_limits () +void gc_heap::adjust_ephemeral_limits (bool is_runtime_suspended) { ephemeral_low = generation_allocation_start (generation_of (max_generation - 1)); ephemeral_high = heap_segment_reserved (ephemeral_heap_segment); @@ -9645,7 +9645,7 @@ void gc_heap::adjust_ephemeral_limits () (size_t)ephemeral_low, (size_t)ephemeral_high)) // This updates the write barrier helpers with the new info. - StompWriteBarrierEphemeral(!!IsSuspendEEThread()); + StompWriteBarrierEphemeral(is_runtime_suspended); } #if defined(TRACE_GC) || defined(GC_CONFIG_DRIVEN) @@ -10442,7 +10442,7 @@ gc_heap::init_gc_heap (int h_number) make_background_mark_stack (b_arr); #endif //BACKGROUND_GC - adjust_ephemeral_limits(); + adjust_ephemeral_limits(true); #ifdef MARK_ARRAY // why would we clear the mark array for this page? it should be cleared.. @@ -15334,7 +15334,7 @@ void gc_heap::gc1() if (!settings.concurrent) #endif //BACKGROUND_GC { - adjust_ephemeral_limits(); + adjust_ephemeral_limits(!!IsSuspendEEThread()); } #ifdef BACKGROUND_GC @@ -16181,7 +16181,7 @@ BOOL gc_heap::expand_soh_with_minimal_gc() dd_gc_new_allocation (dynamic_data_of (max_generation)) -= ephemeral_size; dd_new_allocation (dynamic_data_of (max_generation)) = dd_gc_new_allocation (dynamic_data_of (max_generation)); - adjust_ephemeral_limits(); + adjust_ephemeral_limits(!!IsSuspendEEThread()); return TRUE; } else diff --git a/src/gc/gcpriv.h b/src/gc/gcpriv.h index bfb6f8146d..64f37c5d35 100644 --- a/src/gc/gcpriv.h +++ b/src/gc/gcpriv.h @@ -1663,7 +1663,7 @@ protected: PER_HEAP void reset_write_watch (BOOL concurrent_p); PER_HEAP - void adjust_ephemeral_limits (); + void adjust_ephemeral_limits (bool is_runtime_suspended); PER_HEAP void make_generation (generation& gen, heap_segment* seg, uint8_t* start, uint8_t* pointer); -- cgit v1.2.3