aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2016-04-01 11:48:29 +0200
committerRickard Green <[email protected]>2016-04-01 11:48:29 +0200
commit6d905fa0c6be1f70e0c562b909bc49ca402b3e67 (patch)
tree9cad29c397cec94182bbb080450b1203fe7cd3ca
parent785079d7d9c797b57dce9f8ff4dbf4b4fb7042a9 (diff)
parentd97dc2c64be5530b22c8e4f9e11d246285ea8a17 (diff)
downloadotp-6d905fa0c6be1f70e0c562b909bc49ca402b3e67.tar.gz
otp-6d905fa0c6be1f70e0c562b909bc49ca402b3e67.tar.bz2
otp-6d905fa0c6be1f70e0c562b909bc49ca402b3e67.zip
Merge branch 'rickard/proc-free-fix/OTP-13446'
* rickard/proc-free-fix/OTP-13446: Fix bad refc management of process struct Conflicts: erts/emulator/beam/erl_process.c
-rw-r--r--erts/emulator/beam/erl_process.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c
index 1fb8502ebe..794af60b2f 100644
--- a/erts/emulator/beam/erl_process.c
+++ b/erts/emulator/beam/erl_process.c
@@ -9701,12 +9701,14 @@ Process *schedule(Process *p, int calls)
| ERTS_PSFLG_ACTIVE_SYS
| ERTS_PSFLG_DIRTY_ACTIVE_SYS))
== ERTS_PSFLG_SUSPENDED)) {
- if (state & ERTS_PSFLG_FREE)
- erts_proc_dec_refc(p);
if (proxy_p) {
free_proxy_proc(proxy_p);
proxy_p = NULL;
}
+ else if (state & ERTS_PSFLG_FREE) {
+ /* free and not queued by proxy */
+ erts_proc_dec_refc(p);
+ }
goto pick_next_process;
}
state = new;