◐ Shell
clean mode source ↗

gh-98831: Modernize FORMAT_VALUE by gvanrossum · Pull Request #101628 · python/cpython

This wasn't simple after all. A test crashed because there was an error path with a manual goto error when the inputs had already been decref'ed. This caused a reference deficiency for the inputs on the stack leading to a crash that had me stumped until I picked up paper and pencil and reasoned through the generated code.

While I think I've fixed this now, this points out a general weakness in our bytecode definitions. Sometimes we feel forced to leave a manual goto error in the code (though note that in this case it was an oversight, for which I take full responsibility), but maintaining reference count correctness in all cases is hard!