GNU bug report logs - #76393
Warn about -fsanitizer=address builds

Previous Next

Package: emacs;

Reported by: Pip Cet <pipcet <at> protonmail.com>

Date: Tue, 18 Feb 2025 12:35:02 UTC

Severity: wishlist

Done: Pip Cet <pipcet <at> protonmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Pip Cet <pipcet <at> protonmail.com>
Subject: bug#76393: closed (Re: bug#76393: Warn about -fsanitizer=address
 builds)
Date: Sat, 01 Mar 2025 21:43:01 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#76393: Warn about -fsanitizer=address builds

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 76393 <at> debbugs.gnu.org.

-- 
76393: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76393
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Pip Cet <pipcet <at> protonmail.com>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 76393-done <at> debbugs.gnu.org
Subject: Re: bug#76393: Warn about -fsanitizer=address builds
Date: Sat, 01 Mar 2025 21:42:27 +0000
"Paul Eggert" <eggert <at> cs.ucla.edu> writes:

> On 2025-03-01 05:57, Pip Cet wrote:
>> Is this sufficiently diplomatic?
>
> Thanks, looks good.

Thanks! Pushed, and closing.


[Message part 3 (message/rfc822, inline)]
From: Pip Cet <pipcet <at> protonmail.com>
To: bug-gnu-emacs <at> gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: Warn about -fsanitizer=address builds
Date: Tue, 18 Feb 2025 12:34:08 +0000
Building with current GCC and -fsanitizer=address results in certain
(large) stack allocations being performed on a "fake stack", using
__asan_stack_malloc_N.  This "fake stack" is invisible to GC and thus
breaks conservative GC scanning (bug#76327).

It seems to be possible to work around this by setting

ASAN_OPTIONS=detect_stack_use_after_return=0

Even with that option, a "sanitized" build reports bogus errors.

ASAN_OPTIONS=detect_stack_use_after_return=0,detect_leaks=0

seems to work, at least, but is it really worth it to keep adding
options (inconveniently using environment variables) to work around such
ASAN bugs?

I think it would be preferrable to warn about builds with
-fsanitizer=address, which generates broken code, or disable them
entirely.




This bug report was last modified 76 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.