[Polly] Add null pointer check before size retrieval (#174309)

This patch avoids assertion failures by ensuring a null pointer check is
performed before accessing the object's size.
Note: The corresponding test case remains too large even after
reduction, so it has not been included in this patch.

Fixes #174147
This commit is contained in:
Karthika Devi C 2026-01-14 19:49:19 +05:30 committed by GitHub
parent d363c7f95b
commit bf845a4364
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3250,6 +3250,9 @@ static bool buildMinMaxAccess(isl::set Set,
Set = Set.remove_divs();
polly::simplify(Set);
if (Set.is_null())
return false;
if (unsignedFromIslSize(Set.n_basic_set()) > RunTimeChecksMaxAccessDisjuncts)
Set = Set.simple_hull();