diff options
author | Erlang/OTP <[email protected]> | 2016-04-01 20:18:55 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-04-01 20:18:55 +0200 |
commit | 026f04a07e396603943c373f6eb541c1ed4500af (patch) | |
tree | 7aa184388142823a47431deb6ae8459cf5a298c1 /erts/emulator | |
parent | 6db3f232f2ca8a77537a241cdd3e0f289610e064 (diff) | |
parent | d97dc2c64be5530b22c8e4f9e11d246285ea8a17 (diff) | |
download | otp-026f04a07e396603943c373f6eb541c1ed4500af.tar.gz otp-026f04a07e396603943c373f6eb541c1ed4500af.tar.bz2 otp-026f04a07e396603943c373f6eb541c1ed4500af.zip |
Merge branch 'rickard/proc-free-fix/OTP-13446' into maint-18
* rickard/proc-free-fix/OTP-13446:
Fix bad refc management of process struct
# Conflicts:
# erts/emulator/beam/erl_process.c
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index c2afcc9c4f..4ec98d5cc7 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -9807,12 +9807,14 @@ Process *schedule(Process *p, int calls) | ERTS_PSFLG_PENDING_EXIT | ERTS_PSFLG_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; |