Fixes issue #125079 as well as another case I discovered while trying to build LLVM with TySan.
26 lines
346 B
C++
26 lines
346 B
C++
// RUN: %clangxx_tysan %s -o %t && %run %t 2>&1 | FileCheck --implicit-check-not ERROR %s
|
|
|
|
#include <stdio.h>
|
|
|
|
class Inner {
|
|
public:
|
|
void *ptr = nullptr;
|
|
};
|
|
|
|
class Base {
|
|
public:
|
|
void *buffer1;
|
|
Inner inside;
|
|
void *buffer2;
|
|
};
|
|
|
|
class Derrived : public Base {};
|
|
|
|
Derrived derr;
|
|
|
|
int main() {
|
|
printf("%p", derr.inside.ptr);
|
|
|
|
return 0;
|
|
}
|