Staging
v0.5.1
https://github.com/python/cpython
Revision bfa4fe4f39dd8b5ce1a0b649cedd36857859081a authored by Nir Soffer on 10 July 2017, 21:06:57 UTC, committed by Berker Peksag on 10 July 2017, 21:06:57 UTC
If history-length is set in .inputrc, and the history file is double the
history size (or more), history_get(N) returns NULL, and python
segfaults. Fix that by checking for NULL return value.

It seems that the root cause is incorrect handling of bigger history in
readline, but Python should not segfault even if readline returns
unexpected value.

This issue affects only GNU readline. When using libedit emulation
system history size option does not work.

This is a backport of the actual fix from master without the test, since
the test depends on new run_pty() helper which is not available in 2.7.
1 parent 5d1554a
Raw File
Tip revision: bfa4fe4f39dd8b5ce1a0b649cedd36857859081a authored by Nir Soffer on 10 July 2017, 21:06:57 UTC
[2.7] bpo-29854: Fix segfault in call_readline() (GH-728)
Tip revision: bfa4fe4
.gitattributes
# Binary data types
*.aif binary
*.aifc binary
*.aiff binary
*.au binary
*.bmp binary
*.db binary
*.exe binary
*.icns binary
*.gif binary
*.ico binary
*.jpg binary
*.pck binary
*.png binary
*.tar binary
*.wav binary
*.whl binary
*.zip binary

# Specific binary files
Lib/test/sndhdrdata/sndhdr.* binary

# Text files that should not be subject to eol conversion
Lib/test/cjkencodings/* -text
Lib/test/decimaltestdata/*.decTest -text
Lib/email/test/data/*.txt -text
Lib/test/xmltestdata/* -text

# Special files in third party code
Modules/zlib/zlib.map -text

# CRLF files
*.bat text eol=crlf
*.ps1 text eol=crlf
*.sln text eol=crlf
*.vcxproj* text eol=crlf
*.vcproj text eol=crlf
*.vsprops text eol=crlf
*.props text eol=crlf
*.proj text eol=crlf
PCbuild/readme.txt text eol=crlf
PC/readme.txt text eol=crlf
back to top