Skip to content

gh-135608: Add a null check for attribute promotion to fix a JIT crash #135613

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Fidget-Spinner
Copy link
Member

@Fidget-Spinner Fidget-Spinner commented Jun 17, 2025

@Fidget-Spinner Fidget-Spinner changed the title gh-135608: Add a null check for attribute promotion to fix a crash gh-135608: Add a null check for attribute promotion to fix a JIT crash Jun 17, 2025
@Fidget-Spinner Fidget-Spinner requested a review from tomasr8 June 17, 2025 13:37
Co-Authored-By: devdanzin <[email protected]>
@tomasr8
Copy link
Member

tomasr8 commented Jun 17, 2025

I'll take a look today or tomorrow :)

Copy link
Member

@tomasr8 tomasr8 left a comment

Choose a reason for hiding this comment

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

Two nits/questions, otherwise LGTM! :)

ex = get_first_executor(testfunc)
assert ex is not None
"""), PYTHON_JIT="1")
self.assertEqual(result[0].rc, 0, result)
Copy link
Member

Choose a reason for hiding this comment

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

You can remove this line if you use assert_python_ok instead of run_python_until_end ;)

testfunc(_testinternalcapi.TIER2_THRESHOLD)
ex = get_first_executor(testfunc)
assert ex is not None
"""), PYTHON_JIT="1")
Copy link
Member

Choose a reason for hiding this comment

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

Is it necessary to pass PYTHON_JIT here? I would think that since this test requires the JIT anyway (via requires_jit_enabled), passing the variable would be redundant. Though another test passes it as well (added here: https://github.com/python/cpython/pull/129194/files#diff-67b5bd915e37f77df79907865982648172c27d3b96fbb072b30a73c6a2735439R649)

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.

2 participants