[Numpy-tickets] [NumPy] #378: NumPy or Python crashing with segfault

NumPy numpy-tickets at scipy.net
Sun Nov 12 03:16:36 CST 2006


#378: NumPy or Python crashing with segfault
--------------------------------+-------------------------------------------
 Reporter:  tecki               |        Owner:  somebody
     Type:  defect              |       Status:  reopened
 Priority:  normal              |    Milestone:          
Component:  numpy.core          |      Version:          
 Severity:  normal              |   Resolution:          
 Keywords:  segfault vectorize  |  
--------------------------------+-------------------------------------------
Changes (by tecki):

  * status:  closed => reopened
  * resolution:  worksforme =>

Comment:

 OK, I tried to run with r3435 (at least print numpy.version.version says
 1.0.1.dev3435), same segfault. Stack trace by GDB:

 {{{
 #0  0x0807564e in PyInt_AsLong (op=0x81720f4) at Objects/intobject.c:155
 155             if (op == NULL || (nb = op->ob_type->tp_as_number) == NULL
 ||
 (gdb) bt
 #0  0x0807564e in PyInt_AsLong (op=0x81720f4) at Objects/intobject.c:155
 #1  0xb7c19be9 in LONG_setitem (op=0x81720f4, ov=0x82ab548 "",
 ap=0x823ac40)
     at arraytypes.inc.src:133
 #2  0xb7c21732 in OBJECT_to_LONG (ip=0x82a1900, op=0x82ab548, n=10000,
     aip=0x82829f0, aop=0x823ac40) at arraytypes.inc.src:784
 #3  0xb7c48a82 in PyArray_CastTo (out=0x823ac40, mp=0x82829f0)
     at arrayobject.c:7607
 #4  0xb7c5047e in PyArray_CastToType (mp=0x82829f0, at=0xb7c78160,
 fortran_=0)
     at arrayobject.c:7380
 #5  0xb7c5956a in array_cast (self=0x82829f0, args=0xb7b3e30c)
     at arraymethods.c:661
 #6  0x080c7b4a in PyEval_EvalFrameEx (f=0x8289e8c, throwflag=0)
     at Python/ceval.c:3566
 #7  0x080c8c02 in PyEval_EvalCodeEx (co=0x8289e8c, globals=0x1,
     locals=0x8172100, args=0xb7d4002c, argcount=3, kws=0x0, kwcount=0,
     defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
 #8  0x08113c12 in function_call (func=0xb79840d4, arg=0xb7979bbc, kw=0x0)
     at Objects/funcobject.c:517
 #9  0x0805e47e in PyObject_Call (func=0x823ac40, arg=0xb7979bbc, kw=0x0)
     at Objects/abstract.c:1860
 #10 0x08067777 in instancemethod_call (func=0x1, arg=0xb7979bbc, kw=0x0)
     at Objects/classobject.c:2493
 #11 0x0805e47e in PyObject_Call (func=0x823ac40, arg=0xb7b306cc, kw=0x0)
     at Objects/abstract.c:1860
 #12 0x0809f4ee in slot_tp_call (self=0xb7b3ed6c, args=0xb7b306cc,
 kwds=0x0)
     at Objects/typeobject.c:4590
 #13 0x0805e47e in PyObject_Call (func=0x823ac40, arg=0xb7b306cc, kw=0x0)
     at Objects/abstract.c:1860
 #14 0x080c2d12 in PyEval_EvalFrameEx (f=0x8177e2c, throwflag=0)
     at Python/ceval.c:3777
 #15 0x080c8c02 in PyEval_EvalCodeEx (co=0x8177e2c, globals=0x1,
     locals=0x8172100, args=0xb7d4002c, argcount=0, kws=0x0, kwcount=0,
     defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2833
 #16 0x080c8d65 in PyEval_EvalCode (co=0xb7d06650, globals=0xb7d58a44,
     locals=0xb7d58a44) at Python/ceval.c:494
 #17 0x080e82c6 in PyRun_FileExFlags (fp=0x816e008,
     filename=0xbfc7e872 "hilf.py", start=257, globals=0xb7d58a44,
     locals=0xb7d58a44, closeit=1, flags=0xbfc7da7c) at
 Python/pythonrun.c:1264
 #18 0x080e9090 in PyRun_SimpleFileExFlags (fp=0x816e008,
     filename=0xbfc7e872 "hilf.py", closeit=1, flags=0xbfc7da7c)
     at Python/pythonrun.c:870
 #19 0x08056bef in Py_Main (argc=1, argv=0xbfc7dbb4) at Modules/main.c:496
 #20 0x08056209 in main (argc=2, argv=0xbfc7dbb4) at ./Modules/python.c:23
 }}}

 I also tried to run the same script on windows (using numpy-1.0),
 with the result of a general protection fault. I'll try to compile with
 another compiler, I've been using GCC 3.4.6, which version are you using?

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/378#comment:3>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list