aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-05-29 14:51:01 +0200
committerBjörn Gustavsson <[email protected]>2017-05-29 14:51:01 +0200
commitc819af0538083d861e8bd8ba66768f5e5a633311 (patch)
tree7e2de789b3fa64e5a6f0e621e972b4610209d2f7 /erts/emulator/beam
parent23f132d9ab776ab94c29f1faed76c9fde8f4a73f (diff)
downloadotp-c819af0538083d861e8bd8ba66768f5e5a633311.tar.gz
otp-c819af0538083d861e8bd8ba66768f5e5a633311.tar.bz2
otp-c819af0538083d861e8bd8ba66768f5e5a633311.zip
erl_process.c: Add more assertions in process termination
Before terminating a process, add assertions to make sure that all queues for system tasks have been emptied.
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r--erts/emulator/beam/erl_process.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 0575729bbd..d4385e3987 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -13937,6 +13937,16 @@ erts_continue_exit_process(Process *p)
goto yield;
}
+#ifdef DEBUG
+ erts_smp_proc_lock(p, ERTS_PROC_LOCK_STATUS);
+ ASSERT(p->sys_task_qs == NULL);
+ ASSERT(ERTS_PROC_GET_DELAYED_GC_TASK_QS(p) == NULL);
+#ifdef ERTS_DIRTY_SCHEDULERS
+ ASSERT(p->dirty_sys_tasks == NULL);
+#endif
+ erts_smp_proc_unlock(p, ERTS_PROC_LOCK_STATUS);
+#endif
+
if (p->flags & F_USING_DDLL) {
erts_ddll_proc_dead(p, ERTS_PROC_LOCK_MAIN);
p->flags &= ~F_USING_DDLL;