[3.13] gh-133441: Fix STORE_ATTR_WITH_HINT bytecode#133446
[3.13] gh-133441: Fix STORE_ATTR_WITH_HINT bytecode#133446vstinner merged 5 commits intopython:3.13from
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
| 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.
This should be in test_opcache not test_dict IMO.
There was a problem hiding this comment.
I moved the test to test_opcache, but I'm not sure if TestInstanceDict is a good home for such test.
|
@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. |
|
@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
Outdated
Show resolved
Hide resolved
…e-133441.EpjHD4.rst Co-authored-by: Peter Bierma <zintensitydev@gmail.com>
ZeroIntensity
left a comment
There was a problem hiding this comment.
LGTM as well. If 3.14 and 3.15 aren't affected, someone should add the test case.
|
Merged, thanks. |
Deoptimize if the dict is a dict subclass.
_PyEval_EvalFrameDefault#133441