[SciPy-user] Bug on r_

Nils Wagner nwagner at mecha.uni-stuttgart.de
Tue Jan 10 11:18:28 CST 2006


On Tue, 10 Jan 2006 17:03:47 +0000
  Hugo Gamboa <hgamboa at gmail.com> wrote:
> This manage to create a segmentation fault:
> 
> r_[0,arange(10,dtype='f')]
> 
> How to track a bug when a segmentation fault appears in 
>python?
> 
> Hugo Gamboa
> 
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.net
> http://www.scipy.net/mailman/listinfo/scipy-user

You may use gdb

gdb python
run gamboa.py
bt
Starting program: /usr/local/bin/python gamboa.py
[Thread debugging using libthread_db enabled]
[New Thread 1076175008 (LWP 7519)]
Overwriting fft=<function fft at 0x40b21d14> from 
scipy.fftpack.basic (was <function fft at 0x409ee87c> from 
numpy.dft.fftpack)
Overwriting ifft=<function ifft at 0x40b21d4c> from 
scipy.fftpack.basic (was <function inverse_fft at 
0x409ee8b4> from numpy.dft.fftpack)

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1076175008 (LWP 7519)]
PyArray_Concatenate (op=0x438e434c, axis=0) at 
arrayobject.c:178
warning: Source file is more recent than executable.

178             if (PyArray_CheckExact(obj))
(gdb) bt
#0  PyArray_Concatenate (op=0x438e434c, axis=0) at 
arrayobject.c:178
#1  0x4036495c in array_concatenate (dummy=0x0, 
args=0x409f9c6c, kwds=0x438de9bc)
     at multiarraymodule.c:4736
#2  0x0811eb56 in PyCFunction_Call (func=0x402bd18c, 
arg=0x409f9c6c, kw=0x438de9bc)
     at methodobject.c:93
#3  0x0805935e in PyObject_Call (func=0x402bd18c, 
arg=0x409f9c6c, kw=0x438de9bc)
     at abstract.c:1756
#4  0x080c4c5e in PyEval_EvalFrame (f=0x817dda4) at 
ceval.c:3766
#5  0x080c8bb4 in PyEval_EvalCodeEx (co=0x409db4e0, 
globals=0x409e00b4, locals=0x0,
     args=0x438e42d8, argcount=2, kws=0x0, kwcount=0, 
defs=0x0, defcount=0, closure=0x0)
     at ceval.c:2736
#6  0x0811dda2 in function_call (func=0x409e6fb4, 
arg=0x438e42cc, kw=0x0)
     at funcobject.c:548
#7  0x0805935e in PyObject_Call (func=0x409e6fb4, 
arg=0x438e42cc, kw=0x0)
     at abstract.c:1756
#8  0x08064bd4 in instancemethod_call (func=0x0, 
arg=0x438e42cc, kw=0x0)
     at classobject.c:2447
#9  0x0805935e in PyObject_Call (func=0x438ba0f4, 
arg=0x402a26cc, kw=0x0)
     at abstract.c:1756
#10 0x080989e0 in call_method (o=0x409e10cc, 
name=0x812b48e "__getitem__",
     nameobj=0x815d788, format=0x81287f4 "(O)") at 
typeobject.c:923
#11 0x08099082 in slot_mp_subscript (self=0x409e10cc, 
arg1=0x43686ccc)
     at typeobject.c:4221
#12 0x0805da36 in PyObject_GetItem (o=0x409e10cc, 
key=0x43686ccc) at abstract.c:94
#13 0x080c3186 in PyEval_EvalFrame (f=0x816d8f4) at 
ceval.c:1169
#14 0x080c8bb4 in PyEval_EvalCodeEx (co=0x4029af60, 
globals=0x4026c824,
     locals=0x4026c824, args=0x0, argcount=0, kws=0x0, 
kwcount=0, defs=0x0, defcount=0,
     closure=0x0) at ceval.c:2736
#15 0x080c8de5 in PyEval_EvalCode (co=0x4029af60, 
globals=0x4026c824, locals=0x4026c824)
     at ceval.c:484
#16 0x080f77f8 in PyRun_SimpleFileExFlags (fp=0x8160008, 
filename=0xbffff019 "gamboa.py",
     closeit=1, flags=0xbfffecf4) at pythonrun.c:1265
#17 0x08055917 in Py_Main (argc=1, argv=0xbfffedc4) at 
main.c:484
#18 0x08054fc8 in main (argc=2, argv=0xbfffedc4) at 
python.c:23

Nils



More information about the SciPy-user mailing list