-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
gh-143820: ENTER_EXECUTOR can be inserted after BINARY_OP_INPLACE_ADD_UNICODE #143894
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
base: main
Are you sure you want to change the base?
Changes from all commits
ad90e76
7f38ff5
6c4f6db
8ff9896
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Fix a bug in JIT builds where executors can be inserted after certain super instructions. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -783,8 +783,16 @@ dummy_func( | |
|
|
||
| int next_oparg; | ||
| #if TIER_ONE | ||
| assert(next_instr->op.code == STORE_FAST); | ||
| next_oparg = next_instr->op.arg; | ||
| #if _Py_TIER2 | ||
| // In JIT builds, we might have inserted an executor after this instruction, | ||
| // which breaks this super instruction. | ||
| if (next_instr->op.code == ENTER_EXECUTOR) { | ||
| _PyExecutorObject *exec = _PyFrame_GetCode(frame)->co_executors->executors[next_oparg]; | ||
| next_oparg = exec->vm_data.oparg; | ||
| } | ||
| #endif | ||
| assert(next_instr->op.code == STORE_FAST || next_instr->op.code == ENTER_EXECUTOR); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is wrong as it will fail if the code is instrumented. You'll need to use |
||
| #else | ||
| next_oparg = (int)CURRENT_OPERAND0_16(); | ||
| #endif | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems like a lot of extraneous stuff in this test, and no check that the
STORE_FASTis overwritten by anENTER_EXECUTOR.