-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
Decoding instructions should handle ENTER_EXECUTOR #107265
New issue
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
Comments
Open question. Should @markshannon Do you have an opinion? |
I am working on |
Ideally, everything would use the same set of functions to get instruction lengths, opcodes and opargs. The interaction between instrumentation and |
I think we can remove |
But PEP 667 seems in limbo (and rather ambitious, so I wouldn't want to wait for it if we can drop I don't understand at all what
to it and am now running the test suite with |
So the entire test suite run with |
Guido, IIUC, we don't need to fix Please let me know if I miss something. cpython/Python/instrumentation.c Lines 705 to 727 in 154477b
cpython/Python/instrumentation.c Lines 121 to 127 in 154477b
|
IIUC, we don't need to handle Please let me know if I miss something :) |
Yeah, |
Sent #108460 and merged :) |
cpython/Python/instrumentation.c Lines 1294 to 1308 in 75903f2
I was able to reproduce the situation by executing the following command.
|
And plus |
…_EXECUTOR (pythongh-108460)" This reverts commit d6ac5c7.
Working from the other end, in main the following two commands crash:
and
I think both are related to ENTER_EXECUTOR. |
…OR case (pythongh-108482)" This reverts commit 6cb48f0.
About |
PEP 667 landed for 3.13, and a code search indicates (This issue came up while doing a search for "PEP 667" to check for issues that could be closed now that has been implemented) |
There's a variety of places where we walk over an array of instructions, using some variant of
All these make the mistake that if
opcode
isENTER_EXECUTOR
, it may obscure an underlyingJUMP_BACKWARD
instruction, which has a cache entry.I fixed this in gh-107256 for
_PyInstruction_GetLength()
and it was first reported in gh-107082, but there are a number of other occurrences. Basically every time we consult_PyOpcode_Caches
we should ensure that the index is notENTER_EXECUTOR
.CC: @markshannon
Places where I found this:
_Py_GetBaseOpcode[should not be "fixed", it would break callers that need the oparg]There are possibly others.
Linked PRs
The text was updated successfully, but these errors were encountered: