aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-01-11 16:17:20 +0100
committerRickard Green <[email protected]>2017-01-11 16:17:20 +0100
commit3406c9e2c1c8870f33b383cdf8d85de1bc0f9cf1 (patch)
tree560b0370ba3fe41bbd09e5bd90458e7b89fe237a /erts/emulator
parent14b51371e2feaa748525c04682d26c9741a2ab7a (diff)
parentabfa6e4d3dc9d88de7a3b6cccffdcfc4f937d96d (diff)
downloadotp-3406c9e2c1c8870f33b383cdf8d85de1bc0f9cf1.tar.gz
otp-3406c9e2c1c8870f33b383cdf8d85de1bc0f9cf1.tar.bz2
otp-3406c9e2c1c8870f33b383cdf8d85de1bc0f9cf1.zip
Merge branch 'maint'
* maint: Fix faulty assertion
Diffstat (limited to 'erts/emulator')
-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 a6fdd67088..6928b282ee 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);