[all-commits] [llvm/llvm-project] c9ca76: [mlir][shape] Fix crash when shape.lib array refer...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Wed Mar 4 06:37:23 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c9ca768c88cc2bec4240b8710e6d173e7be278e4
https://github.com/llvm/llvm-project/commit/c9ca768c88cc2bec4240b8710e6d173e7be278e4
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-03-04 (Wed, 04 Mar 2026)
Changed paths:
M mlir/lib/Dialect/Shape/IR/Shape.cpp
M mlir/test/Dialect/Shape/invalid.mlir
Log Message:
-----------
[mlir][shape] Fix crash when shape.lib array references undefined symbol (#184613)
In verifyOperationAttribute(), the single-symbol path for shape.lib used
SymbolTable::lookupSymbolIn() followed by an explicit null check. The
array path at line 196-197 used dyn_cast<FunctionLibraryOp>() directly
on the lookup result, which asserts when the symbol is not found (null
pointer).
Fix: use dyn_cast_or_null<> instead of dyn_cast<> so that a missing
symbol falls through to the existing "does not refer to
FunctionLibraryOp" error diagnostic instead of asserting.
Fixes #159653
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list