Staging
v0.5.1
https://github.com/python/cpython
Revision 68c3724651776f4ae90ed24d70cef6fd45bc7db5 authored by Nir Soffer on 09 July 2017, 10:42:35 UTC, committed by Berker Peksag on 09 July 2017, 10:42:35 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.
1 parent 3bbdf99
History
Tip revision: 68c3724651776f4ae90ed24d70cef6fd45bc7db5 authored by Nir Soffer on 09 July 2017, 10:42:35 UTC
[3.5] bpo-29854: Fix segfault in call_readline() (GH-728)
Tip revision: 68c3724
File Mode Size
_ctypes
_decimal
_io
_multiprocessing
_sqlite
cjkcodecs
clinic
expat
zlib
README -rw-r--r-- 112 bytes
Setup.config.in -rw-r--r-- 409 bytes
Setup.dist -rw-r--r-- 14.8 KB
_bisectmodule.c -rw-r--r-- 7.4 KB
_bz2module.c -rw-r--r-- 24.5 KB
_codecsmodule.c -rw-r--r-- 36.6 KB
_collectionsmodule.c -rw-r--r-- 70.4 KB
_cryptmodule.c -rw-r--r-- 1.4 KB
_csv.c -rw-r--r-- 50.1 KB
_curses_panel.c -rw-r--r-- 14.4 KB
_cursesmodule.c -rw-r--r-- 102.1 KB
_datetimemodule.c -rw-r--r-- 179.2 KB
_dbmmodule.c -rw-r--r-- 13.1 KB
_elementtree.c -rw-r--r-- 111.4 KB
_functoolsmodule.c -rw-r--r-- 37.0 KB
_gdbmmodule.c -rw-r--r-- 17.9 KB
_hashopenssl.c -rw-r--r-- 24.1 KB
_heapqmodule.c -rw-r--r-- 20.9 KB
_json.c -rw-r--r-- 59.8 KB
_localemodule.c -rw-r--r-- 17.1 KB
_lsprof.c -rw-r--r-- 27.1 KB
_lzmamodule.c -rw-r--r-- 47.0 KB
_math.c -rw-r--r-- 7.0 KB
_math.h -rw-r--r-- 995 bytes
_opcode.c -rw-r--r-- 1.7 KB
_operator.c -rw-r--r-- 38.5 KB
_pickle.c -rw-r--r-- 205.4 KB
_posixsubprocess.c -rw-r--r-- 25.9 KB
_randommodule.c -rw-r--r-- 15.8 KB
_scproxy.c -rw-r--r-- 6.1 KB
_sre.c -rw-r--r-- 77.9 KB
_ssl.c -rw-r--r-- 144.7 KB
_ssl_data.h -rw-r--r-- 67.9 KB
_stat.c -rw-r--r-- 15.4 KB
_struct.c -rw-r--r-- 64.3 KB
_testbuffer.c -rw-r--r-- 82.0 KB
_testcapimodule.c -rw-r--r-- 128.7 KB
_testimportmultiple.c -rw-r--r-- 1.1 KB
_testmultiphase.c -rw-r--r-- 16.1 KB
_threadmodule.c -rw-r--r-- 43.4 KB
_tkinter.c -rw-r--r-- 92.7 KB
_tracemalloc.c -rw-r--r-- 37.0 KB
_weakref.c -rw-r--r-- 4.4 KB
_winapi.c -rw-r--r-- 46.8 KB
addrinfo.h -rw-r--r-- 6.1 KB
ar_beos -rwxr-xr-x 1.8 KB
arraymodule.c -rw-r--r-- 86.9 KB
atexitmodule.c -rw-r--r-- 8.7 KB
audioop.c -rw-r--r-- 56.5 KB
binascii.c -rw-r--r-- 51.0 KB
cmathmodule.c -rw-r--r-- 41.1 KB
config.c.in -rw-r--r-- 1.6 KB
errnomodule.c -rw-r--r-- 28.1 KB
faulthandler.c -rw-r--r-- 33.0 KB
fcntlmodule.c -rw-r--r-- 18.8 KB
fpectlmodule.c -rw-r--r-- 9.9 KB
fpetestmodule.c -rw-r--r-- 5.7 KB
gc_weakref.txt -rw-r--r-- 11.2 KB
gcmodule.c -rw-r--r-- 56.8 KB
getaddrinfo.c -rw-r--r-- 18.4 KB
getbuildinfo.c -rw-r--r-- 1.3 KB
getnameinfo.c -rw-r--r-- 6.2 KB
getpath.c -rw-r--r-- 27.1 KB
grpmodule.c -rw-r--r-- 5.9 KB
hashlib.h -rw-r--r-- 2.1 KB
hashtable.c -rw-r--r-- 14.8 KB
hashtable.h -rw-r--r-- 4.0 KB
itertoolsmodule.c -rw-r--r-- 146.0 KB
ld_so_aix.in -rw-r--r-- 6.1 KB
ld_so_beos -rwxr-xr-x 1.8 KB
main.c -rw-r--r-- 24.0 KB
makesetup -rwxr-xr-x 7.3 KB
makexp_aix -rwxr-xr-x 3.2 KB
mathmodule.c -rw-r--r-- 67.6 KB
md5module.c -rw-r--r-- 15.0 KB
mmapmodule.c -rw-r--r-- 44.2 KB
nismodule.c -rw-r--r-- 11.7 KB
ossaudiodev.c -rw-r--r-- 36.2 KB
overlapped.c -rw-r--r-- 36.3 KB
parsermodule.c -rw-r--r-- 102.7 KB
posixmodule.c -rw-r--r-- 339.2 KB
posixmodule.h -rw-r--r-- 553 bytes
pwdmodule.c -rw-r--r-- 5.8 KB
pyexpat.c -rw-r--r-- 60.3 KB
readline.c -rw-r--r-- 37.6 KB
resource.c -rw-r--r-- 11.8 KB
rotatingtree.c -rw-r--r-- 3.4 KB
rotatingtree.h -rw-r--r-- 901 bytes
selectmodule.c -rw-r--r-- 75.1 KB
sha1module.c -rw-r--r-- 14.1 KB
sha256module.c -rw-r--r-- 22.2 KB
sha512module.c -rw-r--r-- 28.3 KB
signalmodule.c -rw-r--r-- 41.3 KB
socketmodule.c -rw-r--r-- 207.7 KB
socketmodule.h -rw-r--r-- 6.3 KB
spwdmodule.c -rw-r--r-- 5.8 KB
sre.h -rw-r--r-- 2.8 KB
sre_constants.h -rw-r--r-- 2.5 KB
sre_lib.h -rw-r--r-- 46.0 KB
symtablemodule.c -rw-r--r-- 2.5 KB
syslogmodule.c -rw-r--r-- 9.4 KB
termios.c -rw-r--r-- 20.4 KB
testcapi_long.h -rw-r--r-- 6.8 KB
timemodule.c -rw-r--r-- 41.3 KB
tkappinit.c -rw-r--r-- 4.7 KB
tkinter.h -rw-r--r-- 881 bytes
unicodedata.c -rw-r--r-- 40.5 KB
unicodedata_db.h -rw-r--r-- 499.5 KB
unicodename_db.h -rw-r--r-- 1.7 MB
winreparse.h -rw-r--r-- 1.4 KB
xxlimited.c -rw-r--r-- 6.9 KB
xxmodule.c -rw-r--r-- 12.1 KB
xxsubtype.c -rw-r--r-- 10.7 KB
zipimport.c -rw-r--r-- 47.6 KB
zlibmodule.c -rw-r--r-- 39.9 KB

README

back to top