[Zope-dev] Confusing segfault for Zope2 head on RH7.3

Dieter Maurer dieter@handshake.de
Thu, 18 Jul 2002 20:22:14 +0200


Barry A. Warsaw writes:
 > ....
 > At the PyErr_SetString() call
 > PyExc_IndexError is a perfectly valid PyObject*, but just one stack
 > frame later, inside the PyErr_SetString, the exception object is a
 > completely bogus address.  PyErr_SetString() is not getting the same
 > object that Splitter_item() is providing in the first argument.  Note
 > that the second argument, a char* is just fine.
This looks like a compiler error, maybe an error in the dynamic
linking code.

I would single step through the assembler code and check whether
the parameter is pushed onto the stack, whether this stack address
is overwritten during the call sequence (which may include dynamic
linking code) and whether the variable is referenced in "PyErr_SetString"
from the correct frame offset.

To do this, you would use "display/i $pc"
and then single step on assembly level "xi" until you are
beyond the setup code of "PyErr_SetString".
You should find the frame offsets of you parameters with "i addr <parameter>".

When you like, you can send me the output for further examination.


Dieter