diff options
author | Sverker Eriksson <[email protected]> | 2016-03-17 16:35:08 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-05-04 19:53:37 +0200 |
commit | 5cb62b003d082c5a32ef5b12a89d872a317fd05f (patch) | |
tree | 04cae6377f78cfad3db7165d44daa37c525be507 /erts/emulator/beam/erl_bif_trace.c | |
parent | 8b2906d9974decf9e8bab24a8f753ba81a025410 (diff) | |
download | otp-5cb62b003d082c5a32ef5b12a89d872a317fd05f.tar.gz otp-5cb62b003d082c5a32ef5b12a89d872a317fd05f.tar.bz2 otp-5cb62b003d082c5a32ef5b12a89d872a317fd05f.zip |
erts: Add matchspec restrictions for 'receive' trace
and non-call-trace.
This is the easy way out to avoid difficult locking
scenarios when accessing tracing flags on another process.
Diffstat (limited to 'erts/emulator/beam/erl_bif_trace.c')
-rw-r--r-- | erts/emulator/beam/erl_bif_trace.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/erts/emulator/beam/erl_bif_trace.c b/erts/emulator/beam/erl_bif_trace.c index 7b21ff0110..c604053caa 100644 --- a/erts/emulator/beam/erl_bif_trace.c +++ b/erts/emulator/beam/erl_bif_trace.c @@ -156,11 +156,14 @@ trace_pattern(Process* p, Eterm MFA, Eterm Pattern, Eterm flaglist) } else if (Pattern == am_pause) { match_prog_set = NULL; on = ERTS_BREAK_PAUSE; - } else if ((match_prog_set = erts_match_set_compile(p, Pattern)) != NULL) { - MatchSetRef(match_prog_set); - on = 1; - } else{ - goto error; + } else { + match_prog_set = erts_match_set_compile(p, Pattern, MFA); + if (match_prog_set) { + MatchSetRef(match_prog_set); + on = 1; + } else{ + goto error; + } } is_global = 0; |