diff options
author | Mark Shannon <mark@hotpy.org> | 2021-07-08 18:21:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-08 18:21:09 (GMT) |
commit | da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f (patch) | |
tree | 17309f8d48ae702110150f9d9c9731c8810905e0 /Python/ceval.c | |
parent | 91a8f8c16ca9a7e2466a8241d9b41769ef97d094 (diff) | |
download | cpython-da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f.zip cpython-da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f.tar.gz cpython-da6414f0acf5ec9ea3b07e4b3907bc49c2a61e2f.tar.bz2 |
bpo-44570: Fix line tracing for forwards jumps to duplicated tails (GH-27068)
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 611a39d..2218405 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); } } |