[compiler-rt] [TySan] Fix struct access with different bases (PR #120412)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 04:57:48 PST 2025


================
@@ -131,6 +131,18 @@ static bool isAliasingLegalUp(tysan_type_descriptor *TDA,
           break;
       }
 
+      // This offset can't be negative. Therefore we must be accessing something
+      // partially inside the last type
----------------
fhahn wrote:

```suggestion
      // This offset can't be negative. Therefore we must be accessing something
      // before the current type (not legal) or partially inside the last type. In the latter case, we adjust Idx.
```

https://github.com/llvm/llvm-project/pull/120412


More information about the llvm-commits mailing list