From 3b56d82549d40fe1a28e2d3aad88e8c3671470f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Wed, 10 Feb 2010 17:10:20 +0000 Subject: OTP-8420 Fix processes in exiting status that are about to be scheduled, to not be allowed to garbage collect. --- erts/emulator/beam/erl_process.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'erts') diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index bf08bc7a86..996806fc75 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -6286,7 +6286,9 @@ Process *schedule(Process *p, int calls) erts_check_my_tracer_proc(p); #endif - if ((FLAGS(p) & F_FORCE_GC) || (MSO(p).overhead > BIN_VHEAP_SZ(p))) { + if (!ERTS_PROC_IS_EXITING(p) + && ((FLAGS(p) & F_FORCE_GC) + || (MSO(p).overhead > BIN_VHEAP_SZ(p)))) { reds -= erts_garbage_collect(p, 0, p->arg_reg, p->arity); if (reds < 0) { reds = 1; -- cgit v1.2.3