1 | // RUN: %clangxx_tysan %s -o %t && %run %t 2>&1 | FileCheck --implicit-check-not ERROR %s |
---|---|
2 | |
3 | #include <stdio.h> |
4 | |
5 | class Inner { |
6 | public: |
7 | void *ptr = nullptr; |
8 | }; |
9 | |
10 | class Base { |
11 | public: |
12 | void *buffer1; |
13 | Inner inside; |
14 | void *buffer2; |
15 | }; |
16 | |
17 | class Derrived : public Base {}; |
18 | |
19 | Derrived derr; |
20 | |
21 | int main() { |
22 | printf(format: "%p", derr.inside.ptr); |
23 | |
24 | return 0; |
25 | } |
26 |