Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
corona10 commentedAug 21, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.)
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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. |
corona10 commentedAug 21, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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 |
carljm commentedAug 21, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
In#101346 I tried to change code objects to compare by identity, and in the process Ireached the same conclusion as@gvanrossum. Making |
Uh oh!
There was an error while loading.Please reload this page.