Skip to content

Commit 3a9ac82

Browse files
MatthieuDartiailhserhiy-storchaka
authored andcommitted
bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (#202)
1 parent fb8fe72 commit 3a9ac82

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.7.0 alpha 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
@@ -1045,7 +1045,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg)
10451045
case CALL_FUNCTION_KW:
10461046
return -oparg-1;
10471047
case CALL_FUNCTION_EX:
1048-
return - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0);
1048+
return -1 - ((oparg & 0x01) != 0);
10491049
case MAKE_FUNCTION:
10501050
return -1 - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0) -
10511051
((oparg & 0x04) != 0) - ((oparg & 0x08) != 0);

0 commit comments

Comments
 (0)