[Python-3000] Possible py3k problem.

Christian Heimes lists at cheimes.de
Tue Nov 18 22:10:14 CET 2008


Lambert, David W (S&T) wrote:
> Attached program works with
> 
>         callback = GSL_FUNCTION(self.f)
>         set_with_values(mnzr,callback,xn,fn,xLB,fLB,xUB,fUB)
> 
> But core dumps with
> 
>         set_with_values(mnzr,GSL_FUNCTION(self.f),xn,fn,xLB,fLB,xUB,fUB)
> 

I had to change your module a bit to load the right library on my 
system. Here is a backtrace:

This GDB was configured as "x86_64-linux-gnu"...
(gdb) run dump.py 1
Starting program: /home/heimes/dev/python/py3k/python dump.py 1
[Thread debugging using libthread_db enabled]
[New Thread 0x7fb4ed67d6e0 (LWP 18856)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fb4ed67d6e0 (LWP 18856)]
0x00007fb4ebf094b0 in ?? () from /usr/lib/libgsl.so.0
(gdb) bt
#0  0x00007fb4ebf094b0 in ?? () from /usr/lib/libgsl.so.0
#1  0x00007fb4ebf08e07 in gsl_min_fminimizer_iterate () from 
/usr/lib/libgsl.so.0
#2  0x00007fb4ec67281c in ffi_call_unix64 ()
     at 
/home/heimes/dev/python/py3k/Modules/_ctypes/libffi/src/x86/unix64.S:75
#3  0x00007fb4ec67222c in ffi_call (cif=0x7ffff569e650, 
fn=0x7fb4ebf08dd0 <gsl_min_fminimizer_iterate>,
     rvalue=0x7ffff569e710, avalue=0x7ffff569e6f0)
     at 
/home/heimes/dev/python/py3k/Modules/_ctypes/libffi/src/x86/ffi64.c:430
#4  0x00007fb4ec667a4d in _call_function_pointer (flags=4353,
     pProc=0x7fb4ebf08dd0 <gsl_min_fminimizer_iterate>, 
avalues=0x7ffff569e6f0, atypes=0x7ffff569e6d0,
     restype=0xb37830, resmem=0x7ffff569e710, argcount=1)
     at /home/heimes/dev/python/py3k/Modules/_ctypes/callproc.c:803
#5  0x00007fb4ec668665 in _CallProc (pProc=0x7fb4ebf08dd0 
<gsl_min_fminimizer_iterate>, argtuple=0xb73b50,
     flags=4353, argtypes=0xae9a00, restype=0xb37370, checker=0x0)
     at /home/heimes/dev/python/py3k/Modules/_ctypes/callproc.c:1150
#6  0x00007fb4ec6616ca in CFuncPtr_call (self=0xa87e60, inargs=0xb73b50, 
kwds=0x0)
     at /home/heimes/dev/python/py3k/Modules/_ctypes/_ctypes.c:3775
#7  0x00000000004e819a in PyObject_Call (func=0xa87e60, arg=0xb73b50, 
kw=0x0) at Objects/abstract.c:2184


More information about the Python-3000 mailing list