This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug python/21068] New: Python interactive prompt crashes GDB when using Python 3.6


https://sourceware.org/bugzilla/show_bug.cgi?id=21068

            Bug ID: 21068
           Summary: Python interactive prompt crashes GDB when using
                    Python 3.6
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: python
          Assignee: unassigned at sourceware dot org
          Reporter: simon.marchi at ericsson dot com
  Target Milestone: ---

When building GDB against Python 3.6, trying to enter anything in the Python
interactive prompt crashes the process:

GNU gdb (GDB) 7.12.50.20170119-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) python hello
Traceback (most recent call last):
  File "<string>", line 1, in <module>
NameError: name 'hello' is not defined
Error while executing Python code.
(gdb) pi
>>> foo
Fatal Python error: Python memory allocator called without holding the GIL

Current thread 0x00007f28a32d7780 (most recent call first):
[1]    31729 abort      ./gdb


The issue is that we're calling PyMem_Malloc instead of PyMem_RawMalloc in
gdbpy_readline_wrapper.  We need to change this only for Python >= 3.4.

Ref:
https://docs.python.org/3.4/c-api/veryhigh.html#c.PyOS_ReadlineFunctionPointer

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]