Subject: Warn about -fsanitizer=address builds

From: Pip Cet <[email-masked]>
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.