From da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 8 Jul 2021 19:21:09 +0100 Subject: bpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068) --- Python/ceval.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index 611a39de75..22184058af 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -5476,10 +5476,8 @@ maybe_call_line_trace(Py_tracefunc func, PyObject *obj, int lastline = _PyCode_CheckLineNumber(instr_prev*2, &tstate->trace_info.bounds); int line = _PyCode_CheckLineNumber(frame->f_lasti*2, &tstate->trace_info.bounds); if (line != -1 && frame->f_trace_lines) { - /* Trace backward edges or first instruction of a new line */ - if (frame->f_lasti < instr_prev || - (line != lastline && frame->f_lasti*2 == tstate->trace_info.bounds.ar_start)) - { + /* Trace backward edges or if line number has changed */ + if (frame->f_lasti < instr_prev || line != lastline) { result = call_trace(func, obj, tstate, frame, PyTrace_LINE, Py_None); } } -- cgit v1.2.1