[LLVMbugs] [Bug 22268] New: Undefined references with -fsanitize=undefined (vptr)

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Jan 20 10:06:08 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22268

            Bug ID: 22268
           Summary: Undefined references with -fsanitize=undefined (vptr)
           Product: clang
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: oliverst at online.de
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

When trying to link a project, that uses several libraries (static and
dynamic), that were compiled with -fsanitize=undefined it might fail with
undefined references. Shuffling around the order of the libraries fixes some of
them, but causes others. So I guess using the library grouping for the linker
might be a wrokaround.

It appears to be related to the vptr sanitizer since using

-fsanitize=array-bounds,bool,enum,float-cast-overflow,float-divide-by-zero,integer-divide-by-zero,null,object-size,return,shift,signed-integer-overflow,unreachable,vla-bound

work fine, but if I add "vptr" to the list the linking fails. The list is
bascially everything in "undefined" sans "vptr", "null" and "object-size". I am
using clang++ as the linker.

Unfortunately there's too much code involved to get this reduced easily, but I
reckon, that it should be reproducible with other projects.

I am using the official 3.5 binaries on ubuntu 14.10.

clang version 3.5.0 (tags/RELEASE_350/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.7.3
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.2
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.9.1
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Candidate multilib: .;@m64
Selected multilib: .;@m64

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150120/886c76a6/attachment.html>


More information about the llvm-bugs mailing list