]> 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>
Fri, 15 Dec 2017 21:27:37 +0000 (00:27 +0300)
* tests/test.c [ADDRESS_SANITIZER && !__clang__] (check_heap_stats):
Multiply max_heap_sz by ~1.66.

tests/test.c

index 18c9482151460831d0ec8f539bf351b0ca0cd0c1..828a3cd7dc8b73261460fd04f373dde216ffcf72 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