Re: LLVM Address Sanitizer (ASAN) and valgrind support

From: Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
To: Andres Freund <andres(at)anarazel(dot)de>, Greg Stark <stark(at)mit(dot)edu>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LLVM Address Sanitizer (ASAN) and valgrind support
Date: 2016-09-28 06:40:45
Message-ID: AM4PR03MB1586E08C2093B37B8DF1950EF2CF0@AM4PR03MB1586.eurprd03.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2016-09-28 00:02, Andres Freund wrote:
> On 2015-09-07 17:05:10 +0100, Greg Stark wrote:
>> I feel like I remember hearing about this before but I can't find any
>> mention of it in my mail archives. It seems pretty simple to add
>> support for LLVM's Address Sanitizer (asan) by using the hooks we
>> already have for valgrind.
>
> Any plans to pick this up again?

Not remembering the context, I was initially confused about what exactly
supposedly needs to be done in order to have ASan support, especially
since I've been using it for a couple of years without any kind of
modifications. Having read the whole thread now, I assume the discussion
is now about getting MSan support, since apparently it's been already
concluded that not much is needed for getting ASan support:

>> I don't even see any need offhand for a configure flag or autoconf
>> test. We could have a configure flag just to be consistent with
>> valgrind but it seems pointless. If you're compiling with asan I don't
>> see any reason to not use it. I'm building this to see if it works
>> now.
>
> I agree. A flag guards Valgrind client requests, because we'd otherwise have
> no idea whether the user plans to run the binary under Valgrind. For ASAN,
> all relevant decisions happen at build time.

Please correct me if I'm wrong.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2016-09-28 06:40:52 Re: Tracking wait event for latches
Previous Message Tsunakawa, Takayuki 2016-09-28 06:32:15 Re: Supporting huge pages on Windows