From 9f8885c325e66624eac3f08c12158ef1d24716c2 Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 23 Nov 2017 20:26:02 +0300 Subject: [PATCH] Avoid 'Unexpected heap growth' fail if compiled by GCC with ASan (gctest) * tests/test.c [ADDRESS_SANITIZER && !__clang__] (check_heap_stats): Multiply max_heap_sz by ~1.66. --- tests/test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test.c b/tests/test.c index 71a04b5..27dcc04 100644 --- a/tests/test.c +++ b/tests/test.c @@ -1608,6 +1608,9 @@ void check_heap_stats(void) # endif # endif # endif +# if defined(ADDRESS_SANITIZER) && !defined(__clang__) + max_heap_sz = max_heap_sz * 2 - max_heap_sz / 3; +# endif # ifdef MEMORY_SANITIZER max_heap_sz += max_heap_sz / 4; # endif -- 2.7.4