-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-107265: Fix code_hash for ENTER_EXECUTOR case #108188
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
corona10
commented
Aug 21, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Decoding instructions should handle ENTER_EXECUTOR #107265
52bed64
to
ecef768
Compare
I updated the code_richcompare not to modify the code object at all. |
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.
@markshannon Can you please confirm that this addresses your concern? (I'm sorry it slipped by me when I reviewed the previous PR.)
Would it better to ignore Ultimately we will want to compare by identity, I think. |
I'm no so sure, I expect that would cause too much breakage. |
Or factor out the normalization code involved in constructing |
Never mind, that's already factored out (deopt_code()) but it modifies the bytecode array in place. |
We keep changing the hash and equality functions, so I don't really see how another change will break anything, apart from assumptions in the compiler. |
IIUC, we need to update _PyCode_CODE for comparisons or add a new macro. It's worth experimenting with it. |
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.
LGTM.
It seems pretty fundamental that |
In #101346 I tried to change code objects to compare by identity, and in the process I reached the same conclusion as @gvanrossum. Making |