[SciPy-dev] Segfault with newcore

Ed Schofield schofield at ftw.at
Wed Nov 16 10:08:45 CST 2005

The following gives a segfault

>>> a = array([1.,2.])
>>> a['BLAH'] = 1

I admit that it's not clear why anyone sane would want to try this ;)

Would anyone object to my adding this to a new test_crazy_input.py module?

Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208756544 (LWP 6850)]
0x0808bb27 in tupleitem (a=0xb6411e14, i=0) at Objects/tupleobject.c:313
313             Py_INCREF(a->ob_item[i]);
(gdb) bt
#0  0x0808bb27 in tupleitem (a=0xb6411e14, i=0) at Objects/tupleobject.c:313
#1  0x0805bb27 in PySequence_GetItem (s=0xb6411e14, i=0)
    at Objects/abstract.c:1202
#2  0xb7d2d4b5 in discover_depth (s=0xb6411e14, max=40, stop_at_string=0)
    at arrayobject.c:4549
#3  0xb7d2d4e5 in discover_depth (s=0xb6a4202c, max=41, stop_at_string=0)
    at arrayobject.c:4551
#4  0xb7d2e210 in Array_FromSequence (s=0xb6a4202c, typecode=0xbfe4f9ec,
    min_depth=0, max_depth=0) at arrayobject.c:4878
#5  0xb7d304ef in array_fromobject (op=0xb6a4202c, typecode=0xbfe4f9ec,
    min_depth=0, max_depth=0, flags=16) at arrayobject.c:5639
#6  0xb7d307e8 in PyArray_FromAny (op=0xb6a4202c, typecode=0xbfe4f9ec,
    min_depth=0, max_depth=0, requires=16) at arrayobject.c:5772
#7  0xb7d33a91 in _convert_obj (obj=0xb6a4202c, iter=0xbfe4fa34)
    at arrayobject.c:6683
#8  0xb7d35b2c in PyArray_MapIterNew (indexobj=0xb7ea80f4)
    at arrayobject.c:7189
#9  0xb7d23391 in array_ass_sub (self=0x82a99e8, index=0xb61f88a0,
    op=0x8154db0) at arrayobject.c:1803
#10 0x0805965a in PyObject_SetItem (o=0x82a99e8, key=0xb61f88a0,
    value=0x8154db0) at Objects/abstract.c:123

-- Ed

More information about the Scipy-dev mailing list