Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In Python 3.11b0, dis.dis() and dis.get_instructions() will show the "wrong" operand values for instructions prefixed by EXTENDED_ARG_QUICK.
dis.dis()
dis.get_instructions()
cpython/Lib/dis.py
Lines 591 to 595 in a4460f2
The bug is that this line only checks for EXTENDED_ARG instructions. It should check for instructions that deoptimize to EXTENDED_ARG (i.e. deop == EXTENDED_ARG).
EXTENDED_ARG
deop == EXTENDED_ARG
Line 595 in a4460f2
To reproduce the issue, consider this snippet adapted from cloudpickle:
import random import textwrap import dis nvars = 65537 + 258 names = ['g%d' % i for i in range(1, nvars)] r = random.Random(42) d = {name: r.randrange(100) for name in names} # def f(x): # x = g1, g2, ... code = """ def f(): x = {tup} """.format(tup=', '.join(names)) exec(textwrap.dedent(code), d, d) f = d['f'] dis.dis(f)
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
In Python 3.11b0,
dis.dis()
anddis.get_instructions()
will show the "wrong" operand values for instructions prefixed by EXTENDED_ARG_QUICK.cpython/Lib/dis.py
Lines 591 to 595 in a4460f2
The bug is that this line only checks for
EXTENDED_ARG
instructions. It should check for instructions that deoptimize toEXTENDED_ARG
(i.e.deop == EXTENDED_ARG
).cpython/Lib/dis.py
Line 595 in a4460f2
To reproduce the issue, consider this snippet adapted from cloudpickle:
The text was updated successfully, but these errors were encountered: