[New-bugs-announce] [issue3632] use string_print() in gdb
STINNER Victor
report at bugs.python.org
Thu Aug 21 14:39:40 CEST 2008
New submission from STINNER Victor <haypo at users.sourceforge.net>:
"pyo" macro from gdbinit (see #3631) uses _PyObject_Dump() to display
an object. This function calls (indirectly) string_print() to display
one line of text. But if the GIL is released (I guess it's the GIL or
is it called the "thread state"?), gdb crashs Python:
object : Fatal Python error: PyEval_SaveThread: NULL tstate
Program received signal SIGABRT, Aborted.
0xffffe410 in __kernel_vsyscall ()
Workaround: ensure GIL before Py_BEGIN_ALLOW_THREADS... That sounds
ugly but it works :-) So I propose to enable it in debug mode (#ifdef
Py_DEBUG) with a patch.
I guess that the issue is very specific to (gdb) debugging and should
not affect normal usage of Python. That's why I choosed to enable it
only in debug mode.
----------
components: Library (Lib)
files: string_print.patch
keywords: patch
messages: 71628
nosy: haypo
severity: normal
status: open
title: use string_print() in gdb
type: performance
versions: Python 2.6
Added file: http://bugs.python.org/file11192/string_print.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3632>
_______________________________________
More information about the New-bugs-announce
mailing list