[issue45757] dis module incorrectly handles EXTENDED_ARG + NOP sequence
Brandt Bucher
report at bugs.python.org
Mon Nov 8 19:02:46 EST 2021
Brandt Bucher <brandtbucher at gmail.com> added the comment:
I have a hunch that this is caused in optimize_basic_block. In general, we don't bother clearing the oparg when peepholing instructions into NOPs.
We could either start becoming more principled about that and fix all of the existing NOPs, or just update instrsize and write_op_arg to ignore args for instructions that don't use them.
The latter seems easier and less error-prone.
----------
nosy: +brandtbucher
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45757>
_______________________________________
More information about the Python-bugs-list
mailing list