New submission from Tim Chase:

Attempting to use a readline macro (use "C-x (" to start recording, "C-x )" to 
stop recording, and "C-x e" to playback) with more than one newline in it will 
cause a segfault.  The behavior also presents in the [`rlwrap` 
tool](https://github.com/hanslub42/rlwrap/issues/36) but not in `bash`.  I've 
tested and reproduced with Python 2.[4-6] and 3.4, but I don't see any similar 
bug-reports that would suggest that the problem doesn't also exist in all 3.x 
series releases.  To reproduce, in a `readline`-enabled Python:

    $ python
    …
    >>> import cmd
    >>> cmd.Cmd().cmdloop()  
    (Cmd) # do "C-x ( <NL> <NL> C-x ) C-x e" and it segfaults

The author of `rlwrap` is working to create a minimum working example, and I'm 
not sure whether this is a problem with the underlying `libreadline` or just 
how it's being used by `rlwrap` and Python.

----------
components: Library (Lib)
messages: 251800
nosy: gumnos
priority: normal
severity: normal
status: open
title: readline macros can segfault Python
type: crash
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25259>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to