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: [email protected]
Reporter: [email protected]
CC: [email protected]
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs