GNU bug report logs -
#76393
Warn about -fsanitizer=address builds
Previous Next
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
Message #20 received at 76393 <at> debbugs.gnu.org (full text, mbox):
> Date: Tue, 18 Feb 2025 17:24:26 +0000
> From: Pip Cet <pipcet <at> protonmail.com>
> Cc: eggert <at> cs.ucla.edu, 76393 <at> debbugs.gnu.org
>
> "Eli Zaretskii" <eliz <at> gnu.org> writes:
>
> > When you say "bugs in compiled code", do you mean the code in the
> > Emacs executable, or do you mean the bytecode or native code emitted
>
> The code put by GCC -fanalyzer into the Emacs executable does buggy
> things unless an environment variable is set to make it not do those
> things.
>
> > by compiling Lisp? If the former, isn't that a GCC bug? And if so,
>
> It is, yes: GCC violates the unwritten contract by which conservative GC
> works when compiling with -fanalyze=address, by moving stack structs to the
> heap.
>
> > perhaps there are some -fSOMETHING switches which avoid hitting those
> > bugs?
>
> -fno-analyze=address? Ideally, GCC should be passed by Emacs an option
> to ensure it won't break conservative GC, but I'm not aware of such an
> option.
I'm not familiar with -fanalyze=address. Does disabling it still
allow to use address sanitization? if so, perhaps we should recommend
using -fno-analyze=address when building for ASAN?
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.