Subject: bug#76393: closed (Re: bug#76393: Warn about -fsanitizer=address builds)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 01 Mar 2025 21:43:01 +0000

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 [email-masked].

-- 
76393: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76393
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#76393: Warn about -fsanitizer=address builds
From: Pip Cet <[email-masked]>
To: Paul Eggert <[email-masked]>
Cc: Eli Zaretskii <[email-masked]>, [email-masked]
Date: Sat, 01 Mar 2025 21:42:27 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

"Paul Eggert" <[email-masked]> writes:

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

Thanks! Pushed, and closing.

Subject: Warn about -fsanitizer=address builds
From: Pip Cet <[email-masked]>
To: [email-masked], Paul Eggert <[email-masked]>
Date: Tue, 18 Feb 2025 12:34:08 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

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.