Strange segfault in extension

Berthold Höllmann hoel at germanlloyd.org
Thu Apr 11 09:56:50 EDT 2002


hoel at germanlloyd.org (Berthold Höllmann) writes:

> I have an extension that, where calling a function, generates an
> segmentatin fault. This is nothing new for me, but I stumbled over the
> backtrace in gdb. Why is "args" getting the address 0x1? Is this
> possible?
> 
> Here is the top of my Backtrace
> 
> #0  0xfe4069f0 in LexSrt_method (self=0x0, args=0x1) at module/LexSrt.c:73
> #1  0xaea38 in PyCFunction_Call (func=0x1c43f0, arg=0x274c30, kw=0x0)
>     at Objects/methodobject.c:80
> #2  0x4abb4 in eval_frame (f=0x30d3f8) at Python/ceval.c:2004
> 
> Thanks for your help
> 
> Berthold

It was'nt that strange really. My module uses NumPy arrays and the
actual segfault was in a line

#0  0xfe726aa8 in LexSrt_method (self=0x0, args=0x2) at module/LexSrt.c:75
75              coor = (PyArrayObject*)PyArray_ContiguousFromObject

and my module was spread among some C source files. We are in the
process of switching from Python 1.5.2 to 2.2.1 and so we need to
define PY_ARRAY_UNIQUE_SYMBOL in our C files. Not that we didn't came
accross this problem earlier, but the symptom was different.

So this problem seems to be solved for now.

Greetings
-------------- next part --------------

Berthold
-- 
Dipl.-Ing. Berthold Höllmann   __   Address:       
hoel at germanlloyd.org        G /  \ L Germanischer Lloyd
phone: +49-40-36149-7374    -+----+- Vorsetzen 32/35    P.O.Box 111606
fax  : +49-40-36149-7320      \__/   D-20459 Hamburg    D-20416 Hamburg


More information about the Python-list mailing list