autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: sanitizer macro: request for comments


From: Zbigniew Jędrzejewski-Szmek
Subject: Re: sanitizer macro: request for comments
Date: Sun, 16 Oct 2016 13:31:25 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

On Sun, Oct 16, 2016 at 01:09:44PM +0200, Michael Stapelberg wrote:
> [cc: people who contributed sanitizer-related changes to configure.ac in
> sudo, systemd and NetworkManager]
> 
> Hey,
> 
> I wrote an m4 macro (attached to this email) for enabling sanitizers, e.g.
> AddressSanitizer, MemorySanitizer, UndefinedSanitizer, also known as ASAN,
> MSAN and UBSAN, respectively, see also https://github.com/google/sanitizers
> for more details.

Hi,

I think this is useful — less repeated work is always better.

I think your macro should AC_DEFINE standardized variables
(HAVE_YYYYY_SANITIZEr, HAVE_XXXX_SANITIZER or something)
with the result. In the documentation you describe an example how to
do it by hand, but it's useful to have this automatically. For example
AC_CHECK_FUNCS does that which makes it easy to use.

> I decided to write a macro because I saw ad-hoc configure code to that
> effect in at least systemd, sudo and NetworkManager, so I figured
> centralizing that code into AX_SANITIZERS might make sense. Do you agree
> with that assessment, or is there anything that would prevent you from
> using AX_SANITIZERS in your project?
> 
> There are two open questions with the macro, though:
> 
> • Please see the TODO in the code about having to specify -Wc, for libtool
> — any pointers/insights as to how to approach that?

If libtool is being used, usually LT_INIT is being called.
Maybe you should require your macro to called after LT_INIT and
check something that LT_INIT defines (LIBTOOL_DEPS ?).

> • Please see the TODO in the code about specifying -O1 — does that make
> sense? Any ideas about how to accomplish that?
> 
> Thanks for any feedback!

Did you convert systemd to use your macro?

Zbyszek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]