mikaelholmen wrote:
> @mikaelholmen I can't reproduce this on commit
> [e40915b](https://github.com/llvm/llvm-project/commit/e40915b7407eda4b370658da5c9606e310b55d19)
> with `-DLLVM_USE_SANITIZER=Undefined`. Kindly let me know how to reproduce
> this.
>
> Looking from the code, I suspect that it's caused by uninitialized bool (
>
> https://github.com/llvm/llvm-project/blob/539bf499615dbbfe98deaac1021f351eaad330ea/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp#L553
> )
I think the problem is that the
```
Changed = CFGChanged = false;
```
initialization done in
```
bool ObjCARCContract::run(Function &F, AAResults *A, DominatorTree *D) {
if (!Run)
return false;
if (!EnableARCOpts)
return false;
Changed = CFGChanged = false;
```
is skipped if we bail out early due to "!Run" or "!EnableARCOpts".
But the pass always asks
```
bool CFGChanged = OCAC.hasCFGChanged();
```
afterwards anyway.
https://github.com/llvm/llvm-project/pull/101114
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits