diff options
author | Mike Frysinger <vapier@gentoo.org> | 2024-01-25 01:51:49 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-25 01:51:49 -0500 |
commit | 80a83a8f6aebd4c5f0d2a21bfbfe5d7cffd1fc9b (patch) | |
tree | 2dfc5ce8dede3a31a91d9034ccc975cb74bc63f8 | |
parent | dumpelf: free elf after fuzzing it to avoid leaking (diff) | |
download | pax-utils-80a83a8f6aebd4c5f0d2a21bfbfe5d7cffd1fc9b.tar.gz pax-utils-80a83a8f6aebd4c5f0d2a21bfbfe5d7cffd1fc9b.tar.bz2 pax-utils-80a83a8f6aebd4c5f0d2a21bfbfe5d7cffd1fc9b.zip |
sanitizer: fix feature tests under clang
While gcc defines __SANITIZE_ADDRESS__, clang requires more verbose
tests. Add them to make the cleanup/security logic work correctly.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r-- | porting.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -74,6 +74,13 @@ #endif #undef PAX_UTILS_CLEANUP +#ifndef __SANITIZE_ADDRESS__ +# ifdef __has_feature +# if __has_feature (address_sanitizer) +# define __SANITIZE_ADDRESS__ 1 +# endif +# endif +#endif /* LSAN (Leak Sanitizer) will complain about things we leak. */ #ifdef __SANITIZE_ADDRESS__ # define PAX_UTILS_CLEANUP 1 |