[llvm-branch-commits] [compiler-rt] [TySan] Fixed false positive when accessing offset member variables (PR #95387)

Jeremy Morse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 11 09:49:56 PST 2024


================
@@ -221,7 +221,17 @@ __tysan_check(void *addr, int size, tysan_type_descriptor *td, int flags) {
     OldTDPtr -= i;
     OldTD = *OldTDPtr;
 
-    if (!isAliasingLegal(td, OldTD))
+    tysan_type_descriptor *InternalMember = OldTD;
----------------
jmorse wrote:

I feel like you should name the variable declared here "AccessedType" or similar, as the default-path is to check access to OldTD rather than an internal member of it, right?

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


More information about the llvm-branch-commits mailing list