Issue #27286: Fixed compiling BUILD_MAP_UNPACK_WITH_CALL opcode. Calling

function with generalized unpacking (PEP 448) and conflicting keyword names
could cause undefined behavior.
This commit is contained in:
Serhiy Storchaka 2016-06-12 09:22:01 +03:00
parent 4f8aaf6440
commit 3c317e76a2
7 changed files with 121 additions and 107 deletions

View file

@ -223,6 +223,7 @@ _code_type = type(_write_atomic.__code__)
# Python 3.5b1 3330 (PEP 448: Additional Unpacking Generalizations)
# Python 3.5b2 3340 (fix dictionary display evaluation order #11205)
# Python 3.5b2 3350 (add GET_YIELD_FROM_ITER opcode #24400)
# Python 3.5.2 3351 (fix BUILD_MAP_UNPACK_WITH_CALL opcode #27286)
#
# MAGIC must change whenever the bytecode emitted by the compiler may no
# longer be understood by older implementations of the eval loop (usually
@ -231,7 +232,7 @@ _code_type = type(_write_atomic.__code__)
# Whenever MAGIC_NUMBER is changed, the ranges in the magic_values array
# in PC/launcher.c must also be updated.
MAGIC_NUMBER = (3350).to_bytes(2, 'little') + b'\r\n'
MAGIC_NUMBER = (3351).to_bytes(2, 'little') + b'\r\n'
_RAW_MAGIC_NUMBER = int.from_bytes(MAGIC_NUMBER, 'little') # For import.c
_PYCACHE = '__pycache__'