-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-112355: fix calculation of jump target of ENTER_EXECUTOR in dis #112377
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
Conversation
@@ -373,6 +374,8 @@ def _get_argval_argrepr(op, arg, offset, co_consts, names, varname_from_oparg, | |||
argval = offset + 2 + signed_arg*2 | |||
caches = _get_cache_size(_all_opname[deop]) | |||
argval += 2 * caches | |||
if deop == ENTER_EXECUTOR: | |||
argval += 2 |
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.
It would be nice if we didn't need to special case this here, but that would require a change in the oparg (and implementation) of ENTER_EXECUTOR, and I figured this PR should just fix the bug in dis
.
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.
Oh, this must be the cache of the underlying JUMP_BACKWARD. I think there currently is no way to get that. Not even via _testinternalcapi
.
we should file an issue about that, it will get worse once we start putting executors on other ops.
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.
Created an issue here: #112383
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.
Thanks!
@@ -373,6 +374,8 @@ def _get_argval_argrepr(op, arg, offset, co_consts, names, varname_from_oparg, | |||
argval = offset + 2 + signed_arg*2 | |||
caches = _get_cache_size(_all_opname[deop]) | |||
argval += 2 * caches | |||
if deop == ENTER_EXECUTOR: | |||
argval += 2 |
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.
Oh, this must be the cache of the underlying JUMP_BACKWARD. I think there currently is no way to get that. Not even via _testinternalcapi
.
we should file an issue about that, it will get worse once we start putting executors on other ops.
With this
./python.exe -Xuops -m test -v test_dis
passes.