aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-02 13:09:47 +0100
committerRickard Green <[email protected]>2017-01-02 13:09:47 +0100
commit67355d1f2f4efb61ef9345751c15c0263cdc97a0 (patch)
tree0d7a8e99adeeebfd09f3ecfd2aa12164a70a65be /erts
parent3473ecd83a7bbe7e0bebb865f25dddb93e3bf10f (diff)
downloadotp-67355d1f2f4efb61ef9345751c15c0263cdc97a0.tar.gz
otp-67355d1f2f4efb61ef9345751c15c0263cdc97a0.tar.bz2
otp-67355d1f2f4efb61ef9345751c15c0263cdc97a0.zip
Fix faulty assertion
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_process.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index b345c35a7e..d15430b902 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -8604,8 +8604,15 @@ pid2proc_not_running(Process *c_p, ErtsProcLocks c_p_locks,
* from being selected for normal execution regardless
* of locks held or not held on it...
*/
- ASSERT(!((ERTS_PSFLG_RUNNING|ERTS_PSFLG_DIRTY_RUNNING_SYS)
- & erts_smp_atomic32_read_nob(&rp->state)));
+#ifdef DEBUG
+ {
+ erts_aint32_t state;
+ state = erts_smp_atomic32_read_nob(&rp->state);
+ ASSERT((state & ERTS_PSFLG_PENDING_EXIT)
+ || !(state & (ERTS_PSFLG_RUNNING
+ | ERTS_PSFLG_DIRTY_RUNNING_SYS)));
+ }
+#endif
if (!suspend)
resume_process(rp, pid_locks|ERTS_PROC_LOCK_STATUS);