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: Eli Zaretskii <eliz <at> gnu.org>
To: Pip Cet <pipcet <at> protonmail.com>
Cc: 76393 <at> debbugs.gnu.org, eggert <at> cs.ucla.edu
Subject: bug#76393: Warn about -fsanitizer=address builds
Date: Tue, 18 Feb 2025 17:25:32 +0200
> Date: Tue, 18 Feb 2025 12:34:08 +0000
> From:  Pip Cet via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs <at> 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.

If what we have in etc/DEBUG about building with address sanitization
is not enough or outdated, please consider updating and expanding that
section.




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.