diff options
author | Erlang/OTP <[email protected]> | 2015-07-08 20:31:15 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2015-07-08 20:31:15 +0200 |
commit | 0b996eb2bb2ac04a0515d8f113cb6529db5ed272 (patch) | |
tree | 36a1733cf7fffb26ca500912d7ab1cb5f4cbd0ec /erts/emulator/beam/erl_process.c | |
parent | 1c14bf099be15790ccbe56f464e81a9557476b3f (diff) | |
parent | e98fb1920ad053d2db4594c5d33cdfcfcdc6d771 (diff) | |
download | otp-0b996eb2bb2ac04a0515d8f113cb6529db5ed272.tar.gz otp-0b996eb2bb2ac04a0515d8f113cb6529db5ed272.tar.bz2 otp-0b996eb2bb2ac04a0515d8f113cb6529db5ed272.zip |
Merge branch 'rickard/non-smp-trace-port-exit-bug/OTP-12889' into maint-18
* rickard/non-smp-trace-port-exit-bug/OTP-12889:
Teach non-smp VM how to deal with trace port crash
Test case testing crash in tracer port
Diffstat (limited to 'erts/emulator/beam/erl_process.c')
-rw-r--r-- | erts/emulator/beam/erl_process.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_process.c b/erts/emulator/beam/erl_process.c index 7b3d12ce09..ee1dd36d48 100644 --- a/erts/emulator/beam/erl_process.c +++ b/erts/emulator/beam/erl_process.c @@ -11409,6 +11409,22 @@ set_proc_exiting(Process *p, KILL_CATCHES(p); p->i = (BeamInstr *) beam_exit; +#ifndef ERTS_SMP + if (state & (ERTS_PSFLG_RUNNING|ERTS_PSFLG_RUNNING_SYS)) { + /* + * I non smp case: + * + * Currently executing process might be sent an exit + * signal if it is traced by a port that it also is + * linked to, and the port terminates during the + * trace. In this case we want schedule out the + * process as quickly as possible in order to detect + * the event as fast as possible. + */ + ERTS_VBUMP_ALL_REDS(p); + } +#endif + if (enqueue) add2runq(enqueue > 0 ? p : make_proxy_proc(NULL, p, enq_prio), state, |