classification
Title: Broken stack_effect for CALL_FUNCTION_EX
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Demur Rumed, inada.naoki, mdartiailh, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-02-20 19:50 by mdartiailh, last changed 2017-03-31 16:36 by dstufft. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 202 merged mdartiailh, 2017-02-20 19:54
PR 219 merged inada.naoki, 2017-02-21 15:02
PR 703 larry, 2017-03-17 21:00
PR 552 closed dstufft, 2017-03-31 16:36
Messages (6)
msg288230 - (view) Author: Matthieu Dartiailh (mdartiailh) * Date: 2017-02-20 19:50
The computation of the stack_effect of the CALL_FUNCTION_EX does not reflect the use of the argument to the opcode.

Currently stack_effect expect two flags (one on 0x01 and one on 0x02) corresponding to whether positional arguments and keyword arguments are being passed. However in the current implementation the argument of CALL_FUNCTION_EX is either 0 or 1 depending on the presence of keyword arguments. According to Serhiy Storchaka, the behavior of stack_effect is a left-over of the previous implementation and should be fixed.
msg288232 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-20 20:03
The fix LGTM. Please add the Misc/NEWS entry.
msg288292 - (view) Author: Matthieu Dartiailh (mdartiailh) * Date: 2017-02-21 12:54
I added the Misc/NEWS entry under Python 3.7. I guess it will be backported to 3.6 when cherry-pinking.
msg288297 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-02-21 13:25
New changeset 3a9ac827c7c87dffc60c4200323948551bcb6662 by Serhiy Storchaka in branch 'master':
bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (#202)
https://github.com/python/cpython/commit/3a9ac827c7c87dffc60c4200323948551bcb6662
msg288311 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2017-02-21 17:33
New changeset 3ab24bdd47fdd9d45719ad49f93d3878d4442d7e by GitHub in branch '3.6':
bpo-29607: Fix stack_effect computation for CALL_FUNCTION_EX (GH-219)
https://github.com/python/cpython/commit/3ab24bdd47fdd9d45719ad49f93d3878d4442d7e
msg288312 - (view) Author: Inada Naoki (inada.naoki) * (Python committer) Date: 2017-02-21 17:34
Thanks, Matthieu.
History
Date User Action Args
2017-03-31 16:36:13dstufftsetpull_requests: + pull_request886
2017-03-17 21:00:35larrysetpull_requests: + pull_request613
2017-02-21 17:34:36inada.naokisetstatus: open -> closed
resolution: fixed
messages: + msg288312

stage: patch review -> resolved
2017-02-21 17:33:26inada.naokisetnosy: + inada.naoki
messages: + msg288311
2017-02-21 15:02:45inada.naokisetpull_requests: + pull_request183
2017-02-21 13:25:24serhiy.storchakasetmessages: + msg288297
2017-02-21 12:54:17mdartiailhsetmessages: + msg288292
2017-02-20 20:03:06serhiy.storchakasetnosy: + serhiy.storchaka, Demur Rumed
messages: + msg288232

assignee: serhiy.storchaka
stage: patch review
2017-02-20 19:54:18mdartiailhsetpull_requests: + pull_request168
2017-02-20 19:50:39mdartiailhcreate