Skip to content

gh-148210: fix incorrect _BINARY_OP_SUBSCR_DICT JIT optimization #148213

Open
kumaraditya303 wants to merge 2 commits intopython:mainfrom
kumaraditya303:dict-opt-bug
Open

gh-148210: fix incorrect _BINARY_OP_SUBSCR_DICT JIT optimization #148213
kumaraditya303 wants to merge 2 commits intopython:mainfrom
kumaraditya303:dict-opt-bug

Conversation

@kumaraditya303
Copy link
Copy Markdown
Contributor

@kumaraditya303 kumaraditya303 commented Apr 7, 2026

Copy link
Copy Markdown
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

lgtm!

@markshannon
Copy link
Copy Markdown
Member

markshannon commented Apr 7, 2026

The fix looks correct, but can we have a test?
This crashes on main:

>>> f = frozendict({"a":1})
>>> def test():
...     for _ in range(10_000):
...         f["a"]
>>> test()
Segmentation fault (core dumped)

@kumaraditya303
Copy link
Copy Markdown
Contributor Author

The fix looks correct, but can we have a test?

Thanks for the reproducer, I added a test based on it.

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.

3 participants