]> granicus.if.org Git - gc/commitdiff
Avoid 'Unexpected heap growth' fail if compiled by GCC with ASan (gctest)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 23 Nov 2017 17:26:02 +0000 (20:26 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 23 Nov 2017 17:26:02 +0000 (20:26 +0300)
* tests/test.c [ADDRESS_SANITIZER && !__clang__] (check_heap_stats):
Multiply max_heap_sz by ~1.66.

tests/test.c

index 71a04b54714ee55f3de2a7dcb8294f9e76bcaaa7..27dcc047267d608e1dd75db167c193383d676b20 100644 (file)
@@ -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