aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-11 16:16:58 +0100
committerRickard Green <[email protected]>2017-01-11 16:16:58 +0100
commitabfa6e4d3dc9d88de7a3b6cccffdcfc4f937d96d (patch)
tree117731d57b3dcd7592b9c44be7e784dbe8c9a1d0 /erts
parentf704fcf7a4524ad8dba04484224e486999db0a3d (diff)
parent67355d1f2f4efb61ef9345751c15c0263cdc97a0 (diff)
downloadotp-abfa6e4d3dc9d88de7a3b6cccffdcfc4f937d96d.tar.gz
otp-abfa6e4d3dc9d88de7a3b6cccffdcfc4f937d96d.tar.bz2
otp-abfa6e4d3dc9d88de7a3b6cccffdcfc4f937d96d.zip
Merge branch 'rickard/debug-fix' into maint
* rickard/debug-fix: 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 cd0a2b2a21..6affbd794c 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -8642,8 +8642,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);