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
NEWS.d
TextMate
Vim
ACKS -rw-r--r-- 22.7 KB
BeOS-NOTES -rw-r--r-- 1.4 KB
BeOS-setup.py -rw-r--r-- 23.1 KB
HISTORY -rw-r--r-- 669.3 KB
NEWS -rw-r--r-- 462.5 KB
Porting -rw-r--r-- 1.9 KB
README -rw-r--r-- 2.3 KB
README.AIX -rw-r--r-- 5.0 KB
README.Emacs -rw-r--r-- 1.0 KB
README.OpenBSD -rw-r--r-- 1.5 KB
README.coverity -rw-r--r-- 845 bytes
README.klocwork -rw-r--r-- 1.2 KB
README.valgrind -rw-r--r-- 4.3 KB
RFD -rw-r--r-- 3.9 KB
SpecialBuilds.txt -rw-r--r-- 10.7 KB
cheatsheet -rw-r--r-- 103.6 KB
developers.txt -rw-r--r-- 12.0 KB
gdbinit -rw-r--r-- 4.7 KB
indent.pro -rw-r--r-- 557 bytes
maintainers.rst -rw-r--r-- 8.0 KB
pymemcompat.h -rw-r--r-- 3.1 KB
python-config.in -rw-r--r-- 1.6 KB
python-wing3.wpr -rw-r--r-- 537 bytes
python-wing4.wpr -rw-r--r-- 698 bytes
python.man -rw-r--r-- 14.2 KB
python.pc.in -rw-r--r-- 253 bytes
setuid-prog.c -rw-r--r-- 5.6 KB
valgrind-python.supp -rw-r--r-- 7.1 KB
vgrindefs -rw-r--r-- 505 bytes

README

back to top