diff options
author | Björn Gustavsson <[email protected]> | 2017-05-29 14:51:01 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-05-29 14:51:01 +0200 |
commit | c819af0538083d861e8bd8ba66768f5e5a633311 (patch) | |
tree | 7e2de789b3fa64e5a6f0e621e972b4610209d2f7 | |
parent | 23f132d9ab776ab94c29f1faed76c9fde8f4a73f (diff) | |
download | otp-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.
-rw-r--r-- | erts/emulator/beam/erl_process.c | 10 |
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; |