All of lore.kernel.org
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Sami Kerola <kerolasa@iki.fi>
Cc: kerolasa@gmail.com, Boris Egorov <egorov@linux.com>,
	util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 0/6] pull: almost working AddressSanitizer support
Date: Thu, 13 Nov 2014 15:48:35 +0100	[thread overview]
Message-ID: <20141113144835.GD6704@x2.net.home> (raw)
In-Reply-To: <alpine.LNX.2.03.1411122044080.18829@iki.fi>

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@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2014-11-13 14:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-10 21:49 [PATCH 0/6] pull: almost working AddressSanitizer support Sami Kerola
2014-11-10 21:49 ` [PATCH 1/6] build-sys: make scanf_cv_alloc_modifier to work [AddressSanitizer] Sami Kerola
2014-11-11  2:10   ` Mike Frysinger
2014-11-11 22:51     ` Sami Kerola
2014-11-10 21:49 ` [PATCH 2/6] tests: fix memory leak [AddressSanitizer] Sami Kerola
2014-11-10 21:49 ` [PATCH 3/6] tests: add mkswap size printout to expected output Sami Kerola
2014-11-10 21:49 ` [PATCH 4/6] libmount: fix memory overflow [AddressSanitizer] Sami Kerola
2014-11-18 12:06   ` Karel Zak
2014-11-10 21:49 ` [PATCH 5/6] tests: skip kill -SEGV test when running AddressSanitizer Sami Kerola
2014-11-10 21:49 ` [PATCH 6/6] tests: mark python libmount tests known to fail with AddressSanitizer Sami Kerola
2014-11-11  2:12   ` Mike Frysinger
2014-11-11 21:16     ` Sami Kerola
2014-11-11  7:17 ` [PATCH 0/6] pull: almost working AddressSanitizer support Boris Egorov
2014-11-11 22:08   ` Sami Kerola
2014-11-11 22:49     ` Sami Kerola
2014-11-12 14:25       ` Karel Zak
2014-11-12 15:02         ` Sami Kerola
2014-11-12 19:51           ` Mike Frysinger
2014-11-12 20:50             ` Sami Kerola
2014-11-13 14:48               ` Karel Zak [this message]
2014-11-12 21:08           ` Bernhard Voelker
2014-11-18 12:01 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141113144835.GD6704@x2.net.home \
    --to=kzak@redhat.com \
    --cc=egorov@linux.com \
    --cc=kerolasa@gmail.com \
    --cc=kerolasa@iki.fi \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.