From 58ee2af48ecc353bd56fab588c85248a2f1bc373 Mon Sep 17 00:00:00 2001 From: "Michael W. Hudson" Date: Tue, 29 Apr 2003 16:18:47 +0000 Subject: Armin Rigo's fix & test for [ 729622 ] line tracing hook errors with massaging from me to integrate test into test suite. --- Python/ceval.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'Python') diff --git a/Python/ceval.c b/Python/ceval.c index 3ea1bdc966..abefd32f12 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 */ -- cgit v1.2.1