Skip to content

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Nov 23, 2022

Fixes #99708.

The crash comes from a cleanup sequence where we call eliminate_empty_basic_blocks() followed by remove_redundant_nops(). Later we assert that there are no empty blocks, but removing a redundant NOP can create an empty basic block.

I don't think that removing empty blocks can create new redundant NOPs. So this PR reverses the order, and add a debug assertion afterwards that there are no redundant NOPs.

@iritkatriel iritkatriel requested a review from corona10 November 23, 2022 18:41
@iritkatriel iritkatriel added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump labels Nov 23, 2022
Copy link
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, Thanks for the kind explanation :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-crash A hard crash of the interpreter, possibly with a core dump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.12: segmentation fault from compile() builtin
3 participants