https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215125

            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: [email protected]
          Reporter: [email protected]

Created attachment 177764
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=177764&action=edit
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=2 -Qunused-arguments 
> -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 
> -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=2 -Qunused-arguments 
> -fstack-protector-all -Wstack-protector -fwrapv --param ssp-buffer-size=1 
> -fPIE -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer 
> -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

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "[email protected]"

Reply via email to