mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
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>
This commit is contained in:
parent
8dcc02f89b
commit
e8f56be3da
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user