[LLVMbugs] [Bug 18211] New: -fsanitize=undefined links parts of libsanitizer into DSOs on Linux
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Dec 11 04:35:54 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=18211
Bug ID: 18211
Summary: -fsanitize=undefined links parts of libsanitizer into
DSOs on Linux
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Keywords: Sanitizer
Severity: normal
Priority: P
Component: Driver
Assignee: unassignedclangbugs at nondot.org
Reporter: glider at google.com
CC: eugeni.stepanov at gmail.com, kcc at google.com,
llvmbugs at cs.uiuc.edu, nlewycky at google.com
Classification: Unclassified
$ cat t.c
int foo() { return 2; }
$ cat a.c
extern int foo();
int main() { return foo(); }
$ TOOLS="-fsanitize=address -fsanitize=undefined"
$ clang t.c -shared -o t.so -fPIC $TOOLS
$ clang a.c -o a t.so $TOOLS
/usr/bin/ld: a: hidden symbol `pthread_self2' in
/usr/local/google/asan/llvm/llvm_cmake_build/bin/../lib/clang/3.5/lib/linux/libclang_rt.asan-x86_64.a(sanitizer_linux.cc.o)
is referenced by DSO
/usr/bin/ld: final link failed: Bad value
clang-3.4: error: linker command failed with exit code 1 (use -v to see
invocation)
If TOOLS is set to either "-fsanitize=address" or "-fsanitize=undefined" the
linking succeeds.
--
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/20131211/026dc783/attachment.html>
More information about the llvm-bugs
mailing list