Re: Problem with (KeyboardInterrupt and wdb

Guido van Rossum (Guido.van.Rossum@cwi.nl)
Thu, 09 Apr 1992 10:02:20 +0200

Patrick Dussud reported a Python core dump when a program being traced
by wdb or pdb is interrupted. In private e-mail he suggested a fix.
Here's my version of that fix. Note that this isn't an official patch
to Python, just a little band-aid if you're worried about it...

*** /tmp/,RCSt1a09915 Thu Apr 9 09:47:21 1992
--- ceval.c Thu Apr 9 09:45:03 1992
***************
*** 1189,1194 ****
--- 1189,1198 ----
object *type, *value, *traceback, *arg;
int err;
err_get(&type, &value);
+ if (value == NULL) {
+ value = None;
+ INCREF(value);
+ }
traceback = tb_fetch();
arg = newtupleobject(3);
if (arg == NULL)

Hats off to Patrick for finding and solving this so quickly!

BTW, just in case anyone missed it, it is now official that on a Sparc
DON'T USE THE STRTOD.C SOURCE DISTRIBUTED WITH PYTHON!

--Guido van Rossum, CWI, Amsterdam <guido@cwi.nl>
"I've got a pet halibut called Eric. I chose him out of thousands,
the others were all to flat."