Skip to content

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Sep 20, 2023

Fixes #109627.

In order to ensure that function exits have a line number, the compiler duplicates small exit blocks which (1) do not have a line number in any instruction and (2) have more than one predecessor. Since these blocks are jump targets (at least one predecessor reaches this block via a jump or exception), they need to have labels assigned to them. This was missing, and is added in this PR.

@iritkatriel iritkatriel added type-bug An unexpected behavior, bug, or error needs backport to 3.12 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Sep 20, 2023
@iritkatriel iritkatriel enabled auto-merge (squash) September 20, 2023 22:51
@iritkatriel iritkatriel merged commit 9ccf054 into python:main Sep 20, 2023
@miss-islington
Copy link
Contributor

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @iritkatriel, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 9ccf0545efd5bc5af5aa51774030c471d49a972b 3.12

iritkatriel added a commit to iritkatriel/cpython that referenced this pull request Sep 20, 2023
iritkatriel added a commit to iritkatriel/cpython that referenced this pull request Sep 20, 2023
@bedevere-app
Copy link

bedevere-app bot commented Sep 20, 2023

GH-109632 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Sep 20, 2023
@bedevere-app
Copy link

bedevere-app bot commented Sep 22, 2023

GH-109632 is a backport of this pull request to the 3.12 branch.

Yhg1s pushed a commit that referenced this pull request Sep 22, 2023
…mp target labels (#109630) (#109632)

gh-109627: duplicated smalll exit blocks need to be assigned jump target labels (#109630)

(cherry picked from commit 9ccf054)
csm10495 pushed a commit to csm10495/cpython that referenced this pull request Sep 28, 2023
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
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) release-blocker type-bug An unexpected behavior, bug, or error
Projects
Development

Successfully merging this pull request may close these issues.

basicblock_addop Assertion
3 participants