[llvm-branch-commits] [compiler-rt] [TySan] Fix struct access with different bases (PR #108385)
Tavian Barnes via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Sep 12 08:29:32 PDT 2024
================
@@ -128,6 +128,10 @@ static bool isAliasingLegalUp(tysan_type_descriptor *TDA,
break;
}
+ //You can't have negative offset, you must be partially inside the last type
+ if (TDA->Struct.Members[Idx].Offset > OffsetA)
+ Idx -=1;
+
----------------
tavianator wrote:
```suggestion
Idx -= 1;
```
https://github.com/llvm/llvm-project/pull/108385
More information about the llvm-branch-commits
mailing list