Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 07 Dec 2016 19:21:29 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 215125] clang: Turning on sanitizer options causes the test for non-existent function mallinfo() to pass
Message-ID:  <bug-215125-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D215125

            Bug ID: 215125
           Summary: clang: Turning on sanitizer options causes the test
                    for non-existent function mallinfo() to pass
           Product: Base System
           Version: 11.0-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: yuri@rawbw.com

Created attachment 177764
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D177764&action=
=3Dedit
C test program: conftest.c

It fails without the sanitizer options:
> cc -o conftest -O2 -pipe -fno-omit-frame-pointer  -fstack-protector -fno-=
strict-aliasing -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 -Qunused-arguments =
-fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=3D1=
 -fPIE -fasynchronous-unwind-tables -fno-omit-frame-pointer -I${top_srcdir}=
/src/common  -Wl,-rpath,/usr/local/lib -fstack-protector -pie -Wl,-z,relro =
-Wl,-z,now -rdynamic conftest.c -lpthread -lexecinfo

It succeeds with the sanitizer options:
> cc -o conftest -O2 -pipe -fno-omit-frame-pointer  -fstack-protector -fno-=
strict-aliasing -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3D2 -Qunused-arguments =
-fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=3D1=
 -fPIE -fsanitize=3Daddress -fsanitize=3Dundefined -fno-omit-frame-pointer =
-fasynchronous-unwind-tables -fno-omit-frame-pointer -I${top_srcdir}/src/co=
mmon  -Wl,-rpath,/usr/local/lib -fstack-protector -pie -Wl,-z,relro -Wl,-z,=
now -rdynamic conftest.c -lpthread -lexecinfo

I found this during security/tor build on FreeBSD 11 amd64.

Sanitizer options shouldn't make such difference, and the test should always
fail because there is no such function.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-215125-8>