[clang] [lld] [llvm] [LTO] enable `ObjCARCContractPass` only on optimized build (PR #101114)
Mikael Holmén via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 13 05:04:31 PDT 2024
mikaelholmen wrote:
I noticed that if I compile opt with UBSan enabled on this patch and then run
```
opt -passes=objc-arc-contract bbi-98007.ll -o /dev/null
```
we get an UBSan complaint like
```
../lib/Transforms/ObjCARC/ObjCARCContract.cpp:105:39: runtime error: load of value 255, which is not a valid value for type 'bool'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../lib/Transforms/ObjCARC/ObjCARCContract.cpp:105:39 in
```
And the bbi-98007.ll input is just
```
define void @a() {
entry:
ret void
}
```
https://github.com/llvm/llvm-project/pull/101114
More information about the cfe-commits
mailing list