[Python-Dev] How to debug pyexpat SIGSEGV with GDB?
Christian Tismer
tismer at stackless.com
Fri Feb 27 22:12:00 EST 2004
Brad Clements wrote:
> Sorry if this is OT.
>
> I've hit a repeatable segfault in pyexpat on RH Linux 9 with Python 2.3.3 (I'm trying
> rss2email).
>
> It seems that XML_parse is returning an error, but when XML_GetCurrentLineNumber
> is called positionPtr is not valid.
>
> I catch this in GDB and have looked at the stack (see below), but when I get back up
> the stack into PyCFunction_Call I don't know what to do.
>
> Ideally, I want to find out the Python source file and line number that is currently being
> executed, then look at the Python source to figure out exactly which pyexpat call is
> being made just before the call to get_parse_result.
>
> It seems strange that (it appears) that Python code is calling get_parse_result directly.
>
> So, how can I figure out where in the Python source the function call is coming from
> using gdb? I'm sure it involves "print" and some casts.. I couldn't find a howto on
> python.org
Just as a wild idea:
Could this be related to the fact that Python 2.3.3 doesn't
maintain explicit line numbers, any longer?
--
Christian Tismer :^) <mailto:tismer at stackless.com>
Mission Impossible 5oftware : Have a break! Take a ride on Python's
Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/
14109 Berlin : PGP key -> http://wwwkeys.pgp.net/
work +49 30 89 09 53 34 home +49 30 802 86 56 mobile +49 173 24 18 776
PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04
whom do you want to sponsor today? http://www.stackless.com/
More information about the Python-Dev
mailing list