diff options
author | Andreas Schneider <asn@samba.org> | 2015-01-23 15:22:18 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-01-28 17:17:07 +0100 |
commit | fa8290e7b9c3981dad94894e492991d7b9e8b3a9 (patch) | |
tree | 1711e03110cff9f376965eee43cac12305143468 /lib/uid_wrapper/uid_wrapper.c | |
parent | 50b6d948671850283d1d8e05c59758c8062c6e14 (diff) | |
download | samba-fa8290e7b9c3981dad94894e492991d7b9e8b3a9.tar.gz samba-fa8290e7b9c3981dad94894e492991d7b9e8b3a9.tar.xz samba-fa8290e7b9c3981dad94894e492991d7b9e8b3a9.zip |
uwrap: Add support for running with address sanitizer.
The address sanitzer will complain about our hack with variable function
attributes. This disables the checking of it.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/uid_wrapper/uid_wrapper.c')
-rw-r--r-- | lib/uid_wrapper/uid_wrapper.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/uid_wrapper/uid_wrapper.c b/lib/uid_wrapper/uid_wrapper.c index 8e3a7d3120..97e10267b5 100644 --- a/lib/uid_wrapper/uid_wrapper.c +++ b/lib/uid_wrapper/uid_wrapper.c @@ -63,6 +63,12 @@ #define DESTRUCTOR_ATTRIBUTE #endif /* HAVE_DESTRUCTOR_ATTRIBUTE */ +#ifdef HAVE_ADDRESS_SANITIZER_ATTRIBUTE +#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE __attribute__((no_sanitize_address)) +#else /* DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE */ +#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE +#endif /* DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE */ + /* GCC have printf type attribute check. */ #ifdef HAVE_FUNCTION_ATTRIBUTE_FORMAT #define PRINTF_ATTRIBUTE(a,b) __attribute__ ((__format__ (__printf__, a, b))) @@ -472,6 +478,7 @@ static int libc_setgroups(size_t size, const gid_t *list) } #ifdef HAVE_SYSCALL +DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE static long int libc_vsyscall(long int sysno, va_list va) { long int args[8]; |