Re: [PATCH 0/6] pull: almost working AddressSanitizer support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 12, 2014 at 08:50:01PM +0000, Sami Kerola wrote:
> +/*
> + * UL_ASAN_BLACKLIST is a macro to tell AddressSanitizer (a compile-time
> + * instrumentation shipped with Clang and GCC) to not instrument the
> + * annotated function.  Furthermore, it will prevent the compiler from
> + * inlining the function because inlining currently breaks the
> + * blacklisting mechanism of AddressSanitizer.
> + */
> +#if defined(__has_feature)
> +# if __has_feature(address_sanitizer)
> +#  define UL_ASAN_BLACKLIST __attribute__((no_sanitize_address))
> +# else
> +#  define UL_ASAN_BLACKLIST    /* nothing */
> +# endif
> +#else
> +# define UL_ASAN_BLACKLIST     /* nothing */
> +#endif
> +

it would be better to follow our current manner and use directly
__attribute__ in code than introduce extra layer of macros. All
you need is define empty no_sanitize_address 
if !__has_feature(address_sanitizer).

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux