Issue |
125079
|
Summary |
[TySan] False positives accessing base class member variables
|
Labels |
new issue
|
Assignees |
gbMattN
|
Reporter |
gbMattN
|
```
class Base{
public:
void* first;
void* second;
};
class Derrived : public Base{};
Derrived derr;
int main(){
derr.second = nullptr;
return 0;
}
```
Results in the following false positive
```
==191047==ERROR: TypeSanitizer: type-aliasing-violation on address 0x64fe5b465d00 (pc 0x64fe5ab0df8f bp 0x7ffc691b0050 sp 0x7ffc691af7f8 tid 191047)
WRITE of size 8 at 0x64fe5b465d00 with type p1 void (in Base at offset 8) accesses part of an existing object of type Derrived that starts at offset -8
#0 0x64fe5ab0df8e in main inherited_member.cpp:12:17
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs