[RFC] asan ld builds without detect_leaks=0

Sam James sam@gentoo.org
Mon Jan 20 21:48:00 GMT 2025


Alan Modra <amodra@gmail.com> writes:

> On Mon, Jan 20, 2025 at 05:39:16PM +0000, Sam James wrote:
>> Alan Modra <amodra@gmail.com> writes:
>> 
>> > I found that building binutils with -fsanitize=address,undefined
>> > results in much of the testsuite not being run.  The problem is that
>> > running gcc results in linker plugin memory leaks which of course are
>> > errors, so the testsuite sees this as lack of compiler support.
>> >
>> > Does this seem a reasonable hack?
>> 
>> I would prefer -fno-sanitize=leak *but* I suspect it's going to be a bit
>> harder to pipe it in everywhere and will end up being roughly as
>> invasive as this patch is, so it looks fine. Thanks.
>
> It is the already built ld that requires memory leak errors to be
> suppressed when the testsuite checks compiler capabilities.

Thanks, doh.


More information about the Binutils mailing list