Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
[3.13] gh-133441: Fix STORE_ATTR_WITH_HINT bytecode#133446
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
Deoptimize if the dict is a dict subclass.
It looks like the offending code is on main as well. |
I failed to write code to trigger the bug on main, so I'm not sure that main is affected. |
Lib/test/test_dict.py Outdated
@@ -1594,6 +1594,24 @@ def make_pairs(): | |||
self.assertEqual(d.get(key3_3), 44) | |||
self.assertGreaterEqual(eq_count, 1) | |||
def test_store_attr_with_hint(self): | |||
# gh-133441: Regression test for STORE_ATTR_WITH_HINT bytecode |
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.
This should be intest_opcache
nottest_dict
IMO.
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.
I moved the test to test_opcache, but I'm not sure if TestInstanceDict is a good home for such test.
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!
@Fidget-Spinner: Do you think that the main branch is also affected? I'm unable to trigger the bug in the main branch, but the code looks the same. I would prefer to not deoptimize just for an hypothetical case if it cannot occur in practice. The code in the main branch is a little bit different. |
Fidget-Spinner commentedMay 9, 2025 • 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.
@vstinner did you try wrapping the repro in a loop? Sometimes that might trigger it. I mean an actual Python for loop, not |
I just tried to put the reproducer in a loop: I still cannot reproduce the failure on the main branch. |
Misc/NEWS.d/next/Core_and_Builtins/2025-05-05-17-02-08.gh-issue-133441.EpjHD4.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
…e-133441.EpjHD4.rstCo-authored-by: Peter Bierma <zintensitydev@gmail.com>
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 as well. If 3.14 and 3.15 aren't affected, someone should add the test case.
5cd56b2
intopython:3.13Uh oh!
There was an error while loading.Please reload this page.
Merged, thanks. |
Uh oh!
There was an error while loading.Please reload this page.
Deoptimize if the dict is a dict subclass.
_PyEval_EvalFrameDefault
#133441