[New-bugs-announce] [issue25203] Incorrect handling MemoryError in readline.set_completer_delims

Serhiy Storchaka report at bugs.python.org
Mon Sep 21 18:30:47 CEST 2015


New submission from Serhiy Storchaka:

MemoryError raised in readline.set_completer_delims() turns the readline library to incorrect state.

$ (ulimit -v 200000; ./python;)
Python 3.6.0a0 (default:e33b4c18af59+, Sep 17 2015, 17:05:17) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
>>> readline.get_completer_delims()
' \t\n`~!@#$%^&*()-=+[{]}\\|;:\'",<>/?'
>>> readline.set_completer_delims(' '*10**8)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
MemoryError
>>> readline.get_completer_delims()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe4 in position 1: invalid continuation byte

Proposed patch fixes the issue.

----------
components: Extension Modules
files: readline_set_completer_delims.patch
keywords: patch
messages: 251239
nosy: serhiy.storchaka, twouters
priority: normal
severity: normal
stage: patch review
status: open
title: Incorrect handling MemoryError in readline.set_completer_delims
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file40535/readline_set_completer_delims.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25203>
_______________________________________


More information about the New-bugs-announce mailing list