diff options
author | Michael W. Hudson <mwh@python.net> | 2003-04-29 16:18:47 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2003-04-29 16:18:47 (GMT) |
commit | 58ee2af48ecc353bd56fab588c85248a2f1bc373 (patch) | |
tree | 82cd9cbba15eb6f84bdb6d39ef9aed1e240ae65c /Python | |
parent | 572f5233f0263ab75782bbce4bd67259d73e32ac (diff) | |
download | cpython-58ee2af48ecc353bd56fab588c85248a2f1bc373.zip cpython-58ee2af48ecc353bd56fab588c85248a2f1bc373.tar.gz cpython-58ee2af48ecc353bd56fab588c85248a2f1bc373.tar.bz2 |
Armin Rigo's fix & test for
[ 729622 ] line tracing hook errors
with massaging from me to integrate test into test suite.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 3ea1bdc..abefd32 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -819,18 +819,19 @@ eval_frame(PyFrameObject *f) for expository comments */ f->f_stacktop = stack_pointer; - if (maybe_call_line_trace(tstate->c_tracefunc, - tstate->c_traceobj, - f, &instr_lb, &instr_ub)) { + err = maybe_call_line_trace(tstate->c_tracefunc, + tstate->c_traceobj, + f, &instr_lb, &instr_ub); + /* Reload possibly changed frame fields */ + JUMPTO(f->f_lasti); + if (f->f_stacktop != NULL) { + stack_pointer = f->f_stacktop; + f->f_stacktop = NULL; + } + if (err) { /* trace function raised an exception */ - why = WHY_EXCEPTION; goto on_error; } - /* Reload possibly changed frame fields */ - JUMPTO(f->f_lasti); - stack_pointer = f->f_stacktop; - assert(stack_pointer != NULL); - f->f_stacktop = NULL; } /* Extract opcode and argument */ |