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
History
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
File Mode Size
.github
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.bzrignore -rw-r--r-- 552 bytes
.gitattributes -rw-r--r-- 809 bytes
.gitignore -rw-r--r-- 1.1 KB
.hgeol -rw-r--r-- 1007 bytes
.hgignore -rw-r--r-- 1.1 KB
.hgtags -rw-r--r-- 8.5 KB
.mention-bot -rw-r--r-- 39 bytes
.travis.yml -rw-r--r-- 3.0 KB
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 47.3 KB
README -rw-r--r-- 54.4 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 43.2 KB
config.sub -rwxr-xr-x 35.7 KB
configure -rwxr-xr-x 432.6 KB
configure.ac -rw-r--r-- 138.3 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 34.3 KB
setup.py -rw-r--r-- 96.7 KB

README

back to top