* tests/test-free.c (main): Skip mmap/munmap based test if ASAN is
enabled.
+2024-05-09 Bruno Haible <bruno@clisp.org>
+
+ free tests: Avoid test failure with ASAN.
+ * tests/test-free.c (main): Skip mmap/munmap based test if ASAN is
+ enabled.
+
2024-05-09 Bruno Haible <bruno@clisp.org>
explicit_bzero, memset_explicit tests: Avoid test failures with ASAN.
#undef N
}
+ /* Skip this test when an address sanitizer is in use, because it would report
+ a "heap buffer overflow". */
+ #ifndef __has_feature
+ #define __has_feature(a) 0
+ #endif
+ #if !(defined __SANITIZE_ADDRESS__ || __has_feature (address_sanitizer))
/* Test a less common code path.
When malloc() is based on mmap(), free() can sometimes call munmap().
munmap() usually succeeds, but fails in a particular situation: when
}
}
#endif
+ #endif
return 0;
}