aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_gc.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2017-01-17 15:50:27 +0100
committerSverker Eriksson <[email protected]>2017-01-17 15:50:27 +0100
commit9b6643e4c573e4a5536a48f8115f12d0b99f9d41 (patch)
treed5948a5a507c10b3699c79bc3b1fd4f003d274f7 /erts/emulator/beam/erl_gc.c
parentec2e03ad47d38400ac39dbc34911705fd50315aa (diff)
parent287edce0090a14fdd88a9e10d13327e74e52831a (diff)
downloadotp-9b6643e4c573e4a5536a48f8115f12d0b99f9d41.tar.gz
otp-9b6643e4c573e4a5536a48f8115f12d0b99f9d41.tar.bz2
otp-9b6643e4c573e4a5536a48f8115f12d0b99f9d41.zip
Merge branch 'sverker/trace_gc-bug/OTP-14154' into maint
* sverker/trace_gc-bug: erts: Fix GC tracing to use temp heap erts: Assert sufficient space need after GC
Diffstat (limited to 'erts/emulator/beam/erl_gc.c')
-rw-r--r--erts/emulator/beam/erl_gc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_gc.c b/erts/emulator/beam/erl_gc.c
index 669f2bc610..edbdbb4b8f 100644
--- a/erts/emulator/beam/erl_gc.c
+++ b/erts/emulator/beam/erl_gc.c
@@ -616,7 +616,7 @@ garbage_collect(Process* p, ErlHeapFragment *live_hf_end,
Uint reclaimed_now = 0;
Eterm gc_trace_end_tag;
int reds;
- ErtsMonotonicTime start_time = 0; /* Shut up faulty warning... */
+ ErtsMonotonicTime start_time;
ErtsSchedulerData *esdp;
erts_aint32_t state;
ERTS_MSACC_PUSH_STATE_M();
@@ -624,6 +624,7 @@ garbage_collect(Process* p, ErlHeapFragment *live_hf_end,
DTRACE_CHARBUF(pidbuf, DTRACE_TERM_BUF_SIZE);
#endif
+ ERTS_UNDEF(start_time, 0);
ERTS_CHK_MBUF_SZ(p);
ASSERT(CONTEXT_REDS - ERTS_REDS_LEFT(p, fcalls)
@@ -790,6 +791,7 @@ do_major_collection:
ASSERT(!p->mbuf);
ASSERT(!ERTS_IS_GC_DESIRED(p));
+ ASSERT(need <= HEAP_LIMIT(p) - HEAP_TOP(p));
return reds;
}