diff --git a/test/main-override.cpp b/test/main-override.cpp index db96efb1..5e4eed6a 100644 --- a/test/main-override.cpp +++ b/test/main-override.cpp @@ -95,6 +95,10 @@ static void various_tests() { delete t; t = new (std::nothrow) Test(42); delete t; + auto tbuf = new unsigned char[sizeof(Test)]; + t = new (tbuf) Test(42); + t->~Test(); + delete tbuf; } class Static { @@ -298,4 +302,4 @@ static void tsan_numa_test() { auto t1 = std::thread(dummy_worker); dummy_worker(); t1.join(); -} \ No newline at end of file +}