mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
4f8aaf6440
commit
3c317e76a2
7 changed files with 121 additions and 107 deletions
|
@ -3262,7 +3262,7 @@ compiler_call_helper(struct compiler *c,
|
|||
code |= 2;
|
||||
if (nsubkwargs > 1) {
|
||||
/* Pack it all up */
|
||||
int function_pos = n + (code & 1) + nkw + 1;
|
||||
int function_pos = n + (code & 1) + 2 * nkw + 1;
|
||||
ADDOP_I(c, BUILD_MAP_UNPACK_WITH_CALL, nsubkwargs | (function_pos << 8));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue