diff options
author | Andreas Schneider <asn@samba.org> | 2014-10-20 09:13:36 +0200 |
---|---|---|
committer | Andreas Schneider <asn@samba.org> | 2014-10-20 16:48:29 +0200 |
commit | db8edc87e6a1a771336d832a6da02c4760c74100 (patch) | |
tree | 98bd093ec792c0550d029d7df352e647c4a28c5e /src | |
parent | 390cfbef05e42439f82d301752b74f8865f32225 (diff) | |
download | socket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.tar.gz socket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.tar.xz socket_wrapper-db8edc87e6a1a771336d832a6da02c4760c74100.zip |
src: Add support for running with address sanitizer.
It 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 'src')
-rw-r--r-- | src/socket_wrapper.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index b30303f..82e5737 100644 --- a/src/socket_wrapper.c +++ b/src/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]; |