[PATCH] libsanitizer: Disable libbacktrace on sanitizer_platform_limits_freebsd.cpp

H.J. Lu hjl.tools@gmail.com
Tue Nov 2 12:26:01 GMT 2021


On Tue, Nov 2, 2021 at 5:11 AM Jakub Jelinek <jakub@redhat.com> wrote:
>
> On Tue, Nov 02, 2021 at 05:02:12AM -0700, H.J. Lu wrote:
> > > On Sat, Oct 30, 2021 at 10:54 PM H.J. Lu via Gcc-patches
> > > <gcc-patches@gcc.gnu.org> wrote:
> > > >
> > > > sanitizer_platform_limits_freebsd.cpp must include <md5.h> from the OS,
> > > > not include/md5.h in GCC source tree which is included by libbacktrace
> > > > support.  Disable libbacktrace on sanitizer_platform_limits_freebsd.cpp
> > > > to avoid include/md5.h to restore bootstrap on FreeBSD.
> > >
> > > Err, but that will just get complaints about disabled libbacktrace backtracking
> > > (from within the sanitizer?)?
> >
> > It disables libbacktrace backtracking only on one file,
> > sanitizer_platform_limits_freebsd.cpp,
> > which contains only data on FreeBSD.  I highly doubt that libbacktrace
> > backtracking is
> > used in it.
>
> include/md5.h is a header we have control over, can't we just add to it
> something like:
> #ifdef USE_SYSTEM_MD5
> #include_next <md5.h>
> #else
> Current header content
> #endif
> and arrange for that macro to be -DUSE_SYSTEM_MD5 when building that
> libsanitizer source file?
>

Gerald, can you try this suggestion?  You can add "#define USE_SYSTEM_MD5"
in sanitizer_platform_limits_freebsd.cpp for testing.


-- 
H.J.


More information about the Gcc-patches mailing list