diff options
author | Sverker Eriksson <[email protected]> | 2011-07-06 20:43:54 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2011-07-07 17:38:08 +0200 |
commit | c50b9bf4137333850e76393752495a09147e73a6 (patch) | |
tree | e62d9069924e63f79a6f6c651be1943da16c1372 /erts/emulator/beam/erl_db.c | |
parent | 32fc16e311bfbc5abd0ab8caf64d566e1e65196d (diff) | |
download | otp-c50b9bf4137333850e76393752495a09147e73a6.tar.gz otp-c50b9bf4137333850e76393752495a09147e73a6.tar.bz2 otp-c50b9bf4137333850e76393752495a09147e73a6.zip |
Fix a match-spec trace bug that could cause emulator crash
A trace matchspec with 'enable_trace' or 'disable_trace' in body could
cause an emulator crash if a concurrent process altered the trace
setting of the traced function by calling erlang:trace_pattern.
The effect was a deallocation of the binary holding the matchspec
program while it was running. Fixed by increasing reference count of
ms-binary in the cases when 'enable_trace' or 'disable_trace' may
cause a system block that may alter the ongoing trace.
The paradox here is that db_prog_match() is using erts_smp_block_system()
to do 'enable_trace' and 'disable_trace' in a safe (atomic) way. But that
also have the (non-atomic) effect that racing thread might block the
system and change the trace settings with erlang:trace_pattern.
Diffstat (limited to 'erts/emulator/beam/erl_db.c')
0 files changed, 0 insertions, 0 deletions