aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2011-07-06 20:43:54 +0200
committerSverker Eriksson <[email protected]>2011-07-07 17:38:08 +0200
commitc50b9bf4137333850e76393752495a09147e73a6 (patch)
treee62d9069924e63f79a6f6c651be1943da16c1372 /lib/observer
parent32fc16e311bfbc5abd0ab8caf64d566e1e65196d (diff)
downloadotp-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 'lib/observer')
0 files changed, 0 insertions, 0 deletions