diff options
author | Andreas Schneider <asn@samba.org> | 2015-02-23 17:16:00 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-02-23 20:02:51 +0100 |
commit | e8f56be3da4b14df9be830d7b4670dc51516e0b2 (patch) | |
tree | 95f132c9952599d6150cf9d1c4569aa1e08b6b85 /lib/socket_wrapper | |
parent | 8dcc02f89b48ab07a6a6bc8fa53870f352c766e9 (diff) | |
download | samba-e8f56be3da4b14df9be830d7b4670dc51516e0b2.tar.gz |
src: Add support for running with address sanitizer.
If 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: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'lib/socket_wrapper')
-rw-r--r-- | lib/socket_wrapper/socket_wrapper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index b30303f3192..82e57376c35 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/socket_wrapper.c @@ -100,6 +100,12 @@ enum swrap_dbglvl_e { #define DESTRUCTOR_ATTRIBUTE #endif +#ifdef HAVE_ADDRESS_SANITIZER_ATTRIBUTE +#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE __attribute__((no_sanitize_address)) +#else +#define DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE +#endif + #ifdef HAVE_GCC_THREAD_LOCAL_STORAGE # define SWRAP_THREAD __thread #else @@ -598,6 +604,7 @@ static int libc_eventfd(int count, int flags) } #endif +DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE static int libc_vfcntl(int fd, int cmd, va_list ap) { long int args[4]; @@ -649,6 +656,7 @@ static int libc_getsockopt(int sockfd, return swrap.fns.libc_getsockopt(sockfd, level, optname, optval, optlen); } +DO_NOT_SANITIZE_ADDRESS_ATTRIBUTE static int libc_vioctl(int d, unsigned long int request, va_list ap) { long int args[4]; |