This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pitrou
Recipients jyasskin, pitrou
Date 2010-05-15.21:25:43
SpamBayes Score 0.005527264
Marked as misclassified No
Message-id <1273958746.75.0.764612388834.issue8726@psf.upfronthosting.co.za>
In-reply-to
Content
It turns out that the test segfaults:

$ ./python -E -bb -c "import _testcapi; _testcapi.crash_no_current_thread()"
Erreur de segmentation (core dumped)


And here is the backtrace:

Program terminated with signal 11, Segmentation fault.
#0  PyErr_SetObject (exception=<type at remote 0x7970c0>, value='bork bork bork') at Python/errors.c:67
67	    exc_value = tstate->exc_value;
Missing debug package(s), you should install: glibc-debug-2.11.1-6mnb2.x86_64
(gdb) bt
#0  PyErr_SetObject (exception=<type at remote 0x7970c0>, value='bork bork bork') at Python/errors.c:67
#1  0x000000000046d0e7 in PyErr_SetString (exception=<type at remote 0x7970c0>, string=<value optimized out>)
    at Python/errors.c:125
#2  0x00007f6a0b31ec1f in crash_no_current_thread (self=<value optimized out>)
    at /home/antoine/py3k/__svn__/Modules/_testcapimodule.c:2014
#3  0x000000000045fb74 in call_function (f=Frame 0x184dcc0, for file <string>, line 1, in <module> (), 
    throwflag=<value optimized out>) at Python/ceval.c:3854
#4  PyEval_EvalFrameEx (f=Frame 0x184dcc0, for file <string>, line 1, in <module> (), throwflag=<value optimized out>)
    at Python/ceval.c:2670
#5  0x0000000000460715 in PyEval_EvalCodeEx (co=0x7f6a0d100d78, globals=<value optimized out>, 
    locals=<value optimized out>, args=0x0, argcount=<value optimized out>, kws=<value optimized out>, kwcount=0, defs=
    0x0, defcount=0, kwdefs=0x0, closure=0x0) at Python/ceval.c:3307
#6  0x000000000046098b in PyEval_EvalCode (co=0x7970c0, globals='bork bork bork', locals=0x0) at Python/ceval.c:746
#7  0x0000000000482d6f in run_mod (command=<value optimized out>, flags=<value optimized out>) at Python/pythonrun.c:1716
#8  PyRun_StringFlags (command=<value optimized out>, flags=<value optimized out>) at Python/pythonrun.c:1650
#9  PyRun_SimpleStringFlags (command=<value optimized out>, flags=<value optimized out>) at Python/pythonrun.c:1226
#10 0x0000000000495a37 in Py_Main (argc=<value optimized out>, argv=<value optimized out>) at Modules/main.c:570
#11 0x0000000000414b95 in main (argc=5, argv=<value optimized out>) at ./Modules/python.c:50


That's probably because PyThreadState_GET() gets compiled to a simple lookup in non-debug mode, and doesn't trigger the fatal error.
History
Date User Action Args
2010-05-15 21:25:47pitrousetrecipients: + pitrou, jyasskin
2010-05-15 21:25:46pitrousetmessageid: <1273958746.75.0.764612388834.issue8726@psf.upfronthosting.co.za>
2010-05-15 21:25:45pitroulinkissue8726 messages
2010-05-15 21:25:43pitroucreate