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