In https://bugs.freebsd.org/215125 I was notified that some configure
scripts attempt to test for the Linux-specific mallinfo and mallopt
functions by compiling and linking small programs which references the
functions, and observing whether that results in errors.
On FreeBSD there are neither mallinfo nor mallopt functions, so
normally these tests would fail, but when sanitizers are enabled, they
incorrectly succeed, because the sanitizers define interceptors for
these functions.
Fix this by not intercepting mallinfo and mallopt for FreeBSD, in
all of the sanitizers.
Not like this.
Please add
#define SANITIZER_INTERCEPT_MALLOPT_AND_MALLINFO (!SANITIZER_FREEBSD)
to lib/sanitizer_common/sanitizer_platform_interceptors.h
then use it here.