aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2017-03-01 10:40:49 +0100
committerLukas Larsson <[email protected]>2017-03-01 10:40:49 +0100
commit7d0d5f017edef503630419ff617a6c14ff3ebf13 (patch)
treeaa11a18d9102287d3ae69cb570320d739bc9a1dc /erts/emulator
parente91f1fc6f07dfe99b73661e8d431a51f6f996b0f (diff)
parentc0f82eef818a71a8cb475d9b27a3c30074fe3b77 (diff)
downloadotp-7d0d5f017edef503630419ff617a6c14ff3ebf13.tar.gz
otp-7d0d5f017edef503630419ff617a6c14ff3ebf13.tar.bz2
otp-7d0d5f017edef503630419ff617a6c14ff3ebf13.zip
Merge branch 'lukas/erts/fix_proc_exiting_arity'
* lukas/erts/fix_proc_exiting_arity: erts: Fix proc arity value when exiting
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/beam/beam_emu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c
index 49f932a1c2..8be0f58227 100644
--- a/erts/emulator/beam/beam_emu.c
+++ b/erts/emulator/beam/beam_emu.c
@@ -1324,6 +1324,7 @@ void process_main(Eterm * x_reg_array, FloatDef* f_reg_array)
goto do_schedule1;
do_schedule:
+ ASSERT(c_p->arity < 6);
ASSERT(c_p->debug_reds_in == REDS_IN(c_p));
if (!ERTS_PROC_GET_SAVED_CALLS_BUF(c_p))
reds_used = REDS_IN(c_p) - FCALLS;
@@ -1924,6 +1925,7 @@ void process_main(Eterm * x_reg_array, FloatDef* f_reg_array)
erts_smp_proc_unlock(c_p, ERTS_PROC_LOCKS_MSG_RECEIVE);
SWAPOUT;
c_p->flags &= ~F_DELAY_GC;
+ c_p->arity = 0;
goto do_schedule; /* Will be rescheduled for exit */
}
ERTS_SMP_MSGQ_MV_INQ2PRIVQ(c_p);
@@ -2166,6 +2168,7 @@ void process_main(Eterm * x_reg_array, FloatDef* f_reg_array)
* in limbo forever.
*/
SWAPOUT;
+ c_p->arity = 0;
goto do_schedule;
}
#endif