Skip to content

[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974)#148997

Merged
iritkatriel merged 3 commits intopython:3.13from
iritkatriel:gh-148973-313-crashfix
Apr 25, 2026
Merged

[3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974)#148997
iritkatriel merged 3 commits intopython:3.13from
iritkatriel:gh-148973-313-crashfix

Conversation

@iritkatriel
Copy link
Copy Markdown
Member

@iritkatriel iritkatriel commented Apr 25, 2026

…imization.

Ensure compiler_codegen returns a consts list aligned with final LOAD_CONST opargs and validate optimize_cfg inputs so malformed const mappings raise ValueError/TypeError instead of asserting.

Made-with: Cursor
…ler tests.

Import _testinternalcapi from test.support.bytecode_helper so DirectCfgOptimizerTests uses the same skip/import behavior as the existing helper-based test classes.

Made-with: Cursor
@iritkatriel iritkatriel changed the title Gh 148973 313 crashfix [3.13] gh-148973: fix segfault on mismatch between consts size and oparg in compiler (GH-148974) Apr 25, 2026
@iritkatriel iritkatriel merged commit 8da3d39 into python:3.13 Apr 25, 2026
40 checks passed
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