Skip to content

Conversation

@kartcq
Copy link
Contributor

@kartcq kartcq commented Oct 30, 2024

The patch adds a nullptr check before accessing the loop blocks in 'hasPossiblyDistributableLoop' function. The existing check for the loop’s containment in the region does not capture nullptr cases when the region covers the entire function. Therefore, it’s better to exit if the basic block isn’t part of any loop

Fixes #113772.

The patch adds a nullptr check before accessing the loop blocks in
'hasPossiblyDistributableLoop' function. The existing check for the
loop’s containment in the region does not capture nullptr cases when
the region covers the entire function. Therefore, it’s better to exit
if the basic block isn’t part of any loop

Fixes llvm#113772.
Copy link
Member

@Meinersbur Meinersbur 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

@kartcq kartcq merged commit 4cb7170 into llvm:main Nov 1, 2024
9 checks passed
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
The patch adds a nullptr check before accessing the loop blocks in
'hasPossiblyDistributableLoop' function. The existing check for the
loop’s containment in the region does not capture nullptr cases when the
region covers the entire function. Therefore, it’s better to exit if the
basic block isn’t part of any loop

Fixes llvm#113772.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
The patch adds a nullptr check before accessing the loop blocks in
'hasPossiblyDistributableLoop' function. The existing check for the
loop’s containment in the region does not capture nullptr cases when the
region covers the entire function. Therefore, it’s better to exit if the
basic block isn’t part of any loop

Fixes llvm#113772.
@kartcq kartcq deleted the polly_fix branch April 16, 2025 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segfault in polly::ScopDetection::hasPossiblyDistributableLoop

2 participants