build-sys: use __SANITIZE_ADDRESS__ rather than custom USE_CLOSE_ATEXIT
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
eab90ef8d4
commit
084365f1a1
|
@ -156,10 +156,7 @@ AC_ARG_ENABLE([asan],
|
|||
AS_IF([test "x$enable_asan" = xyes], [
|
||||
UL_WARN_ADD([-fsanitize=address])
|
||||
ASAN_LDFLAGS="-fsanitize=address"
|
||||
],[
|
||||
AC_DEFINE([USE_CLOSE_ATEXIT], [1], [close stdout at exit])
|
||||
])
|
||||
|
||||
AC_SUBST([ASAN_LDFLAGS])
|
||||
|
||||
dnl libtool-2
|
||||
|
|
|
@ -57,7 +57,7 @@ close_stdout_atexit(void)
|
|||
/*
|
||||
* Note that close stdout at exit disables ASAN to report memory leaks
|
||||
*/
|
||||
#ifdef USE_CLOSE_ATEXIT
|
||||
#if !defined(__SANITIZE_ADDRESS__)
|
||||
atexit(close_stdout);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue