[compiler-rt] [TySan] Fixed false positive when accessing offset member variables (PR #120406)

Sean McBride via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 20:09:01 PST 2025


seanm wrote:

I'm seeing some TySan reports that I don't understand, and structs are involved, so I though I was maybe seeing the same as this ticket, but your original C++ example, below, indeed does not provoke any warning with current master:

```c++
#include <stdio.h>
struct S{
    int a, b, c;
};
S s;
int main(){
    s.a = 1;
    s.b = 2;
    s.c = 3;
    printf("%d %d %d\n", s.a, s.b, s.c);
    return 0;
}
```


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


More information about the llvm-commits mailing list