segfault in extension module

Nat Echols echols at uclink.berkeley.edu
Sat Dec 6 20:07:32 EST 2003


> *That's* very odd.
>
> Can we see a little more?

Yup:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074141248 (LWP 5500)]
0x420744b0 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x420744b0 in _int_free () from /lib/tls/libc.so.6
#1  0x420734d6 in free () from /lib/tls/libc.so.6
#2  0x08055a1f in _PyObject_Del ()
#3  0x080593c5 in PyString_AsEncodedString ()
#4  0x0807db19 in _PyEval_SliceIndex ()
#5  0x080c41c9 in PyFunction_SetClosure ()
#6  0x080cdf49 in PyDict_New ()
#7  0x080ce35e in PyDict_SetItem ()
#8  0x080d1799 in _PyModule_Clear ()
#9  0x0808e81a in PyImport_Cleanup ()
#10 0x08096114 in Py_Finalize ()
#11 0x080539bf in Py_Main ()
#12 0x08053469 in main ()
#13 0x42015574 in __libc_start_main () from /lib/tls/libc.so.6

Now, if I run it interactively instead (still within gdb), I get this
backtrace when it segfaults after I try to exit Python:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074141248 (LWP 5502)]
0x420744b0 in _int_free () from /lib/tls/libc.so.6
(gdb) bt
#0  0x420744b0 in _int_free () from /lib/tls/libc.so.6
#1  0x420734d6 in free () from /lib/tls/libc.so.6
#2  0x08055a1f in _PyObject_Del ()
#3  0x080593c5 in PyString_AsEncodedString ()
#4  0x080ce4d9 in PyDict_DelItem ()
#5  0x0805f1f2 in PyString_Fini ()
#6  0x08096153 in Py_Finalize ()
#7  0x080539bf in Py_Main ()
#8  0x08053469 in main ()
#9  0x42015574 in __libc_start_main () from /lib/tls/libc.so.6





More information about the Python-list mailing list