Skip to content

gh-141510: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on frozendict#145039

Open
corona10 wants to merge 1 commit intopython:mainfrom
corona10:gh-141510-fix
Open

gh-141510: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on frozendict#145039
corona10 wants to merge 1 commit intopython:mainfrom
corona10:gh-141510-fix

Conversation

@corona10
Copy link
Member

@corona10 corona10 commented Feb 20, 2026

@corona10 corona10 changed the title gh-141510: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on fr… gh-141510: Add _GUARD_NOS_ANY_DICT to prevent STORE_SUBSCR_DICT on frozendict Feb 20, 2026
@corona10
Copy link
Member Author

}
else if (sym_matches_type(tos, &PyFrozenDict_Type)) {
ADD_OP(_NOP, 0, 0);
sym_set_type(tos, &PyFrozenDict_Type);
Copy link
Member Author

@corona10 corona10 Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure this is correct way to handle this.
Should I just follow the same as _GUARD_TOS_ANY_SET which does not call sym_set_type?

@corona10
Copy link
Member Author

corona10 commented Feb 20, 2026

Without this PR, tthe est code will fail like this:

Raised RLIMIT_NOFILE: 256 -> 1024
Using random seed: 2311893955
0:00:00 load avg: 7.54 Run 1 test sequentially in a single process
0:00:00 load avg: 7.54 [1/1] test_opcache
test test_opcache failed -- Traceback (most recent call last):
  File "/Users/dongheena/oss/cpython/Lib/test/test_opcache.py", line 1910, in test_store_subscr
    with self.assertRaises(TypeError):
         ~~~~~~~~~~~~~~~~~^^^^^^^^^^^
AssertionError: TypeError not raised

0:00:00 load avg: 7.54 [1/1/1] test_opcache failed (1 failure)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments