Index: test/asan/TestCases/Posix/tsd_dtor_leak.cc =================================================================== --- test/asan/TestCases/Posix/tsd_dtor_leak.cc +++ test/asan/TestCases/Posix/tsd_dtor_leak.cc @@ -34,6 +34,11 @@ fprintf(stderr, "heap size: new: %zd old: %zd\n", new_heap_size, old_heap_size); if (old_heap_size) assert(old_heap_size == new_heap_size); +#if defined(__FreeBSD__) + if (i > 0) + old_heap_size = new_heap_size; +#else old_heap_size = new_heap_size; +#endif } }