summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKoundinya Veluri <kouvel@microsoft.com>2016-04-14 19:52:55 -0700
committerKoundinya Veluri <kouvel@microsoft.com>2016-04-15 01:26:36 -0700
commitfaa782a20b738a9c9921bf54c29c229f4078748d (patch)
treeadaeee4a5de61d32e2f4e1adaae585b9547df0fa /src
parent3ad8f15af54add9dcc3ecb8b89f3b9a82c65bef3 (diff)
downloadcoreclr-faa782a20b738a9c9921bf54c29c229f4078748d.tar.gz
coreclr-faa782a20b738a9c9921bf54c29c229f4078748d.tar.bz2
coreclr-faa782a20b738a9c9921bf54c29c229f4078748d.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/gc/gc.cpp10
-rw-r--r--src/gc/gcpriv.h2
2 files changed, 6 insertions, 6 deletions
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);