Skip to content

Commit 3ab24bd

Browse files
authored
bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (GH-219)
(cherry picked from commit 3a9ac82)
1 parent e48fd93 commit 3ab24bd

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ What's New in Python 3.6.1 release candidate 1?
1010
Core and Builtins
1111
-----------------
1212

13+
- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX.
14+
Patch by Matthieu Dartiailh.
15+
1316
- bpo-29602: Fix incorrect handling of signed zeros in complex constructor for
1417
complex subclasses and for inputs having a __complex__ method. Patch
1518
by Serhiy Storchaka.

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
10431043
case CALL_FUNCTION_KW:
10441044
return -oparg-1;
10451045
case CALL_FUNCTION_EX:
1046-
return - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0);
1046+
return -1 - ((oparg & 0x01) != 0);
10471047
case MAKE_FUNCTION:
10481048
return -1 - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0) -
10491049
((oparg & 0x04) != 0) - ((oparg & 0x08) != 0);

0 commit comments

Comments
 (0)