From 38e848112861c7dde2ae66dc023117a8b55fde81 Mon Sep 17 00:00:00 2001 From: Matthieu Dartiailh Date: Mon, 20 Feb 2017 20:49:13 +0100 Subject: [PATCH 1/4] Fix stack_effect computation for CALL_FUNCTION_EX --- Python/compile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/compile.c b/Python/compile.c index 17fef314829a8e..8bf4ae1c3a118b 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1045,7 +1045,7 @@ PyCompile_OpcodeStackEffect(int opcode, int oparg) case CALL_FUNCTION_KW: return -oparg-1; case CALL_FUNCTION_EX: - return - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0); + return -1 - ((oparg & 0x01) != 0); case MAKE_FUNCTION: return -1 - ((oparg & 0x01) != 0) - ((oparg & 0x02) != 0) - ((oparg & 0x04) != 0) - ((oparg & 0x08) != 0); From 84e928569583f47725be335c6ba29c5b311a03b1 Mon Sep 17 00:00:00 2001 From: Matthieu Dartiailh Date: Tue, 21 Feb 2017 13:52:32 +0100 Subject: [PATCH 2/4] Update NEWS --- Misc/NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Misc/NEWS b/Misc/NEWS index fa7e3f5a5e7f06..4b116da7b8c930 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,8 @@ What's New in Python 3.7.0 alpha 1? Core and Builtins ----------------- +- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX + - bpo-29347: Fixed possibly dereferencing undefined pointers when creating weakref objects. From 2f57b520044bbd6b4d5d5889925909968d30239d Mon Sep 17 00:00:00 2001 From: Matthieu Dartiailh Date: Tue, 21 Feb 2017 14:11:15 +0100 Subject: [PATCH 3/4] Adding patch origin --- Misc/NEWS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 0fb66f81c58462..993a46287c3bd6 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,7 +10,8 @@ What's New in Python 3.7.0 alpha 1? Core and Builtins ----------------- -- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX +- bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. + Patch by Matthieu Dartiailh - bpo-29602: Fix incorrect handling of signed zeros in complex constructor for complex subclasses and for inputs having a __complex__ method. Patch From 87bd7003983db8ee608c013a67b5258fcb7a21d9 Mon Sep 17 00:00:00 2001 From: Matthieu Dartiailh Date: Tue, 21 Feb 2017 14:21:58 +0100 Subject: [PATCH 4/4] Update NEWS --- Misc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS b/Misc/NEWS index 993a46287c3bd6..4d1cf298ae5df9 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -11,7 +11,7 @@ Core and Builtins ----------------- - bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX. - Patch by Matthieu Dartiailh + Patch by Matthieu Dartiailh. - bpo-29602: Fix incorrect handling of signed zeros in complex constructor for complex subclasses and for inputs having a __complex__ method. Patch