cpython/Modules
Nick Coghlan 93602e3af7 [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169)
bpo-27286 fixed a problem where BUILD_MAP_UNPACK_WITH_CALL could
be emitted with an incorrect oparg value, causing the eval loop
to access the wrong stack entry when attempting to read the
function name.

The associated magic number change caused significant problems when
attempting to upgrade to 3.5.3 for anyone that relies on pre-cached
bytecode remaining valid across maintenance releases.

This patch restores the ability to import legacy bytecode generated
by 3.5.0, 3.5.1 or 3.5.2, and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.

Original import patch by Petr Viktorin, eval loop patch by Serhiy Storchaka,
and tests and integration by Nick Coghlan.
2017-03-08 16:41:01 +10:00
..
_ctypes Fixed bpo-29565: Corrected ctypes passing of large structs by value on Windows AMD64. (#168) (#221) 2017-02-22 06:19:55 +00:00
_decimal Issue #28701: Revert part of 5bdc8e1a50c8 for the following reasons: 2017-01-09 13:11:27 +01:00
_io Fix grammar, typos and markup in documentation and code comments 2017-01-14 08:23:08 +00:00
_multiprocessing Issue #27591: Set sigint_event to NULL if _PyOS_IsMainThread() returns false 2016-07-23 07:13:14 +03:00
_sqlite Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. 2016-11-16 10:17:58 +02:00
cjkcodecs Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
clinic Issue #28427: old keys should not remove new values from 2016-12-27 14:19:20 +01:00
expat sync ordering of stddef.h includes with expat 2.1.1 2016-06-13 23:41:19 -07:00
zlib - Issue #29169: Update zlib to 1.2.10. 2017-01-31 13:49:48 +01:00
_bisectmodule.c Issue #19514: Deduplicate some _Py_IDENTIFIER declarations. 2013-11-07 18:46:53 +01:00
_bz2module.c Issue #28275: Clean up to avoid use-after-free after bzip decompress failure 2016-10-01 02:45:17 +00:00
_codecsmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_collectionsmodule.c Fix grammar, typos and markup in documentation and code comments 2017-01-14 08:23:08 +00:00
_cryptmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_csv.c merge 3.4 (closes #27758) 2016-08-13 17:21:54 -07:00
_curses_panel.c Issue #25745: Fixed leaking a userptr in curses panel destructor. 2016-05-09 00:11:59 +03:00
_cursesmodule.c Issue #28549: Fixed segfault in curses's addch() with ncurses6. 2016-10-30 22:52:06 +02:00
_datetimemodule.c Issue #27171: Fix typos in documentation, comments, and test function names 2016-06-02 10:07:09 +00:00
_dbmmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_elementtree.c Issue #28871: Fixed a crash when deallocate deep ElementTree. 2016-12-21 12:32:56 +02:00
_functoolsmodule.c [3.5] bpo-29532: Altering a kwarg dictionary passed to functools.partial() no longer affects a partial object after creation. (#222) 2017-02-22 11:46:32 +02:00
_gdbmmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_hashopenssl.c Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
_heapqmodule.c Correct “an” → “a” with “Unicode”, “user”, “UTF”, etc 2016-04-15 02:14:19 +00:00
_json.c Py_SIZE() was misused for dict. 2017-01-13 08:34:34 +02:00
_localemodule.c Issue #28139: Fix messed up indentation 2016-09-17 03:26:16 +00:00
_lsprof.c Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. 2016-11-16 10:17:58 +02:00
_lzmamodule.c Issue #27517: LZMA compressor and decompressor no longer raise exceptions if 2016-10-31 08:30:09 +02:00
_math.c Fix typo. 2014-10-28 22:24:46 +01:00
_math.h Issue #15477: Add workaround for log1p(-0.0) on platforms where it's broken. 2012-08-18 12:24:30 +01:00
_opcode.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
_operator.c merge 3.4 (#27783) 2016-08-16 23:37:33 -07:00
_pickle.c Issue #29190: Fixed possible errors in comparing strings in the pickle module. 2017-01-09 10:04:34 +02:00
_posixsubprocess.c Issue #20947: Fixed a gcc warning with -Wstrict-overflow. 2016-09-27 22:03:51 +03:00
_randommodule.c Update URL of Mersenne Twister Home Page (#20) (#114) 2017-02-15 10:59:45 +01:00
_scproxy.c Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat 2015-03-17 17:48:27 +01:00
_sre.c Issue #29444: Fixed out-of-bounds buffer access in the group() method of 2017-02-04 22:53:57 +02:00
_ssl.c bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-398) 2017-03-02 12:32:30 -05:00
_ssl_data.h Issue #23248: Update ssl error codes from latest OpenSSL git master. 2015-01-18 17:39:32 +01:00
_stat.c Issue #21741: Add st_file_attributes to os.stat_result on Windows. 2014-06-19 09:46:37 -05:00
_struct.c Issue #26535: Correct docs regarding the struct buffer size 2016-04-15 23:03:54 +00:00
_testbuffer.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
_testcapimodule.c Issue #28147: Fix a memory leak in split-table dictionaries 2016-12-20 09:54:24 +09:00
_testimportmultiple.c Remove compile warnings for _testimportmodule 2012-12-15 18:16:47 +02:00
_testmultiphase.c Issue #27782: Fix m_methods handling in multiphase init 2016-08-21 17:41:56 +10:00
_threadmodule.c Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
_tkinter.c Fixed possible NULL decrefing. 2016-10-28 12:14:34 +03:00
_tracemalloc.c Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
_weakref.c Issue #28427: old keys should not remove new values from 2016-12-27 14:19:20 +01:00
_winapi.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
addrinfo.h Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
ar_beos
arraymodule.c Issue #27570: Avoid zero-length memcpy() calls with null source pointers 2016-09-07 11:04:41 +00:00
atexitmodule.c Issue #25523: Merge "a" to "an" fixes from 3.4 into 3.5 2015-11-02 04:04:57 +00:00
audioop.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
binascii.c Issue #29004: Document binascii.crc_hqx() implements CRC-CCITT 2016-12-24 07:36:44 +00:00
cmathmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
config.c.in PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
errnomodule.c Fix #13210. Port the Windows build from VS2008 to VS2010. 2012-05-13 11:19:23 -05:00
faulthandler.c Issue #26778: Fixed "a/an/and" typos in code comment and documentation. 2016-04-17 08:32:47 +03:00
fcntlmodule.c Issue #28139: Fix messed up indentation 2016-09-17 03:26:16 +00:00
fpectlmodule.c Issue #16136: Remove VMS support and VMS-related code 2013-12-21 16:19:10 +01:00
fpetestmodule.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
gc_weakref.txt Issue #13575: there is only one class type. 2011-12-12 18:54:29 +01:00
gcmodule.c Issue #22117: The gc module now uses _PyTime_t timestamp 2015-03-27 17:47:53 +01:00
getaddrinfo.c Issue #26505: Fix typos in getaddrinfo license text. 2016-03-07 14:51:59 -05:00
getbuildinfo.c [3.5] bpo-27593: Get SCM build info from git instead of hg. (#446) (#454) (#455) 2017-03-04 01:34:19 -05:00
getnameinfo.c Issue #15538: Fix compilation of the getnameinfo() / getaddrinfo() emulation code. 2012-08-02 20:37:12 +02:00
getpath.c Issue #19398: Extra slash no longer added to sys.path components in case of 2016-11-11 12:05:01 +02:00
grpmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
hashlib.h Issue #25523: Correct "a" article to "an" article 2015-11-02 03:37:02 +00:00
hashtable.c do not memcpy from NULL 2016-09-06 19:03:40 -07:00
hashtable.h Issue #21036: Fix typo in macro name 2014-03-24 22:34:34 +01:00
itertoolsmodule.c Issue #28322: Fixed possible crashes when unpickle itertools objects from 2016-10-02 08:34:53 +03:00
ld_so_aix.in Issue #10656: Fix out-of-tree building on AIX 2016-11-20 07:56:37 +00:00
ld_so_beos
main.c Issue #29319: Prevent RunMainFromImporter overwriting sys.path[0]. 2017-02-04 15:39:21 -08:00
makesetup generate spaces instead of tabs into config.c 2017-01-16 00:05:12 -08:00
makexp_aix
mathmodule.c Issue #27895: Spelling fixes (Contributed by Ville Skyttä). 2016-09-07 12:03:06 +00:00
md5module.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
mmapmodule.c ensure read size is initialized 2016-10-05 23:32:09 -07:00
nismodule.c Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat 2015-03-17 17:48:27 +01:00
ossaudiodev.c Issue #28715: Added error checks for PyUnicode_AsUTF8(). 2016-11-20 08:47:21 +02:00
overlapped.c asyncio: sync overlapped.c with GitHub 2016-04-01 21:37:41 +02:00
parsermodule.c Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size. 2015-12-19 20:05:25 +02:00
posixmodule.c Issue #28732: Raise ValueError when argv[0] is empty. 2016-11-19 19:03:54 -08:00
posixmodule.h Issue #4591: Uid and gid values larger than 2**31 are supported now. 2013-02-12 09:24:16 +02:00
pwdmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
pyexpat.c Issue #28701: Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString. 2016-11-16 10:17:58 +02:00
readline.c explicitly cast away constness to silence compiler warning 2016-09-05 18:26:19 -07:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
resource.c Issue #20191: Fixed a crash in resource.prlimit() when pass a sequence that 2016-12-19 08:04:15 +02:00
rotatingtree.c Recorded merge of revisions 81032 via svnmerge from 2010-05-09 16:14:21 +00:00
rotatingtree.h
selectmodule.c issue27018 - Fix the documentation of select.epoll.register method. 2016-05-14 21:28:22 -07:00
Setup.config.in Issue #21076: the C signal module has been renamed to _signal 2014-04-04 16:30:04 +02:00
Setup.dist - merge 3.4 2015-04-13 22:00:30 +02:00
sha1module.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
sha256module.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
sha512module.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
signalmodule.c Issue #28139: Fix messed up indentation 2016-09-17 03:26:16 +00:00
socketmodule.c Issue #28000: Fix gethostbyname_r() usage on AIX with _LINUX_SOURCE_COMPAT 2016-11-14 04:26:36 +00:00
socketmodule.h Issue #22117: The socket module uses _PyTime_t timestamp for timeouts 2015-03-28 01:18:54 +01:00
spwdmodule.c Issue #27332: Fixed the type of the first argument of module-level functions 2016-07-07 17:35:15 +03:00
sre.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_constants.h Issue #17381: Fixed handling of case-insensitive ranges in regular expressions. 2014-10-31 12:36:56 +02:00
sre_lib.h Issue #18684: Fixed reading out of the buffer in the re module. 2015-07-06 14:03:01 +03:00
symtablemodule.c remove the concept of an unoptimized function scope from the compiler, since it can't happen anymore 2015-04-27 21:44:22 -04:00
syslogmodule.c Issue #20437: Fixed 22 potential bugs when deleting objects references. 2014-02-09 13:46:20 +02:00
termios.c Issue #11495: OSF support is eliminated. It was deprecated in Python 3.2 2011-03-14 17:36:54 +01:00
testcapi_long.h Issue #9530: Fix undefined behaviour due to signed overflow in testcapi_long.h. 2011-11-19 17:58:15 +00:00
timemodule.c Issue #25092: Fix datetime.strftime() failure when errno was already set to EINVAL. 2015-09-22 14:51:42 -07:00
tkappinit.c Issue #4350: Removed a number of out-of-dated and non-working for a long time 2014-07-23 22:33:50 +03:00
tkinter.h Issue #16840. Turn off bignum support in tkinter with with Tcl earlier than 8.5.8 2015-04-22 10:59:32 +03:00
unicodedata.c Add an extra byte for null in case we ever get very long unicode names. 2016-09-23 20:20:27 +02:00
unicodedata_db.h upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
unicodename_db.h upgrade to Unicode 8.0.0 2015-06-27 15:45:56 -05:00
winreparse.h Issue18314 Allow unlink to remove junctions. Includes support for creating junctions. Patch by Kim Gräsman 2014-05-05 19:46:17 +01:00
xxlimited.c gc types needs to be allocated as such (closes #29398) 2017-01-31 23:31:02 -08:00
xxmodule.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
xxsubtype.c PEP 489: Multi-phase extension module initialization 2015-05-23 22:24:10 +10:00
zipimport.c [3.5] bpo-29537: Tolerate legacy invalid bytecode (#169) 2017-03-08 16:41:01 +10:00
zlibmodule.c Issue #27130: Fix handling of buffers exceeding UINT_MAX in “zlib” module 2016-07-23 03:02:07 +00:00

Source files for standard library extension modules,
and former extension modules that are now builtin modules.