Author twouters
Recipients lukasz.langa, pablogsal, serhiy.storchaka, twouters
Date 2019-09-12.12:55:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568292925.42.0.0225742597397.issue38115@roundup.psfhosted.org>
In-reply-to
Content
As mentioned in the PR (GH-15970), I don't think we should fix this bug. We can, but it involves replacing PyCode_Optimize() (which is public but undocumented, with confusing refcount effects) with a stub, and very careful surgery on the code of the peephole optimizer. I tried three different ways and I keep running into unexpected side-effects of my changes, because of how the optimizer is called by the compiler.

It is the case that other changes in 3.8 make this bug more apparent, but it's always been around (at least since lnotab was introduced). At this point I think the best thing to do is to document that lnotab can have invalid bytecode offsets, and then reconsider serious refactoring and redesign of the peephole optimizer if it's going to be kept around in 3.9. (Right now there's talk about replacing it with a more sensible CFG-based optimizer.)
History
Date User Action Args
2019-09-12 12:55:25twouterssetrecipients: + twouters, lukasz.langa, serhiy.storchaka, pablogsal
2019-09-12 12:55:25twouterssetmessageid: <1568292925.42.0.0225742597397.issue38115@roundup.psfhosted.org>
2019-09-12 12:55:25twouterslinkissue38115 messages
2019-09-12 12:55:25twouterscreate