From 53bf2a9593a2f34151016f7d84fad6d213d76ee9 Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Thu, 7 Jul 2016 20:59:28 +0200 Subject: erts: Check if return_to trace is enabled for bif We have to do an extra check if the return_to trace is enabled here as it may have been cleared by the bif after the flags where created by the call_trace. --- erts/emulator/beam/beam_bp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'erts/emulator/beam/beam_bp.c') diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c index 8489897d3a..920c8b1ed0 100644 --- a/erts/emulator/beam/beam_bp.c +++ b/erts/emulator/beam/beam_bp.c @@ -858,7 +858,8 @@ erts_bif_trace(int bif_index, Process* p, Eterm* args, BeamInstr* I) if (flags & MATCH_SET_RX_TRACE) { erts_trace_return(p, ep->code, result, &ERTS_TRACER(p)); } - if (flags & MATCH_SET_RETURN_TO_TRACE) { + if (flags & MATCH_SET_RETURN_TO_TRACE && + IS_TRACED_FL(p, F_TRACE_RETURN_TO)) { /* can only happen if(local)*/ if (applying) { /* Apply of BIF, cp is in calling function */ -- cgit v1.2.3