This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Demur Rumed, martius, ned.deily, r.david.murray, serhiy.storchaka, vstinner, yselivanov
Date 2016-11-24.14:25:28
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Updated patch. I added a NEWS entry and the two assertions from  lasti.patch. These assertions are basic sanity checks, not directly related to this issue, they shouldn't harm. A started frame must never go back to the not-started state (f_lasti < 0).

Yury: "How about we commit pygen_yf.patch to 3.6 and whatever else in 3.7?"

Wordcode is already a massive change in our bytecode, I would prefer to not touch f_lasti just as a late update of WORDCODE in 3.7.

I'm ok to keep f_lasti == -1 for frames not started yet.

Serhiy: "I prefer pygen_yf.patch (with addressing Yury's suggestions)."

Ok, fine. I'm also more confident in smaller changes when we are very close to the final release! So let's forget lasti.patch ;-) (Sorry Demur!)


FYI attached reproduces the bug because Cursor._read_data() starts with the instruction  "SETUP_LOOP 72" and 72 is the code of the operation YIELD_FROM :-)

To reproduce the bug, you must have a code object where the second byte is 72. It's not easy to control the generated bytecode from the Python code, so I decided to not write an unit test for this bug.
Date User Action Args
2016-11-24 14:25:29vstinnersetrecipients: + vstinner, ned.deily, r.david.murray, serhiy.storchaka, yselivanov, martius, Demur Rumed
2016-11-24 14:25:29vstinnersetmessageid: <>
2016-11-24 14:25:29vstinnerlinkissue28782 messages
2016-11-24 14:25:28vstinnercreate