Message90026
Hello guys,
i am experiencing segmentation fault, when trying to set the
error indicator via the PyErr_SetString() method called from C source.
This occurs for all Python exceptions, as documented in:
http://docs.python.org/c-api/exceptions.html
Checked Python-2.6.2, also Python-2.4.1 - the crash is present
there (wondering what's wrong with the provided reproducer).
Scenario:
--------
tar xvzf pyexceptions-sample.tar.gz
cd pyexceptions-sample
make
./pyexceptionssample ->
Segmentation fault (core dumped)
Note: Doesn't matter if compiled with libpython2.6.a or libpython2.4.so,
the crash is still there.
Here is the most interesting part of the backtrace (the whole
coredump also attached).
gdb ./pyexceptions-sample core.31283
Core was generated by `./pyexceptions-sample'.
Program terminated with signal 11, Segmentation fault.
[New process 31283]
#0 PyErr_Restore (type=0x60000000000058f0, value=0x2000000000435030,
traceback=0x0) at Python/errors.c:39
39 oldtype = tstate->curexc_type;
(gdb) bt
#0 PyErr_Restore (type=0x60000000000058f0, value=0x2000000000435030,
traceback=0x0) at Python/errors.c:39
#1 0x4000000000125180 in PyErr_SetString (exception=0x60000000000058f0,
string=<value optimized out>) at Python/errors.c:57
#2 0x4000000000005eb0 in check_value ()
#3 0x4000000000006670 in main ()
(gdb) info args
type = (PyObject *) 0x60000000000058f0
value = (PyObject *) 0x2000000000435030
traceback = (PyObject *) 0x0
(gdb) info locals
tstate = (PyThreadState *) 0x0
oldtype = <value optimized out>
oldvalue = <value optimized out>
oldtraceback = <value optimized out>
(Looks like NULL ptr dereference in tstate = (PyThreadState *)).
Could you please have a look?
Thanks && regards, Jan.
--
Jan iankko Lieskovsky |
|
Date |
User |
Action |
Args |
2009-07-02 16:54:26 | iankko | set | recipients:
+ iankko |
2009-07-02 16:54:26 | iankko | set | messageid: <1246553666.48.0.84202001291.issue6402@psf.upfronthosting.co.za> |
2009-07-02 16:54:25 | iankko | link | issue6402 messages |
2009-07-02 16:54:24 | iankko | create | |
|