[llvm-bugs] [Bug 37575] New: sanitized build of clang does not work with thinlto
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 23 21:18:24 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37575
Bug ID: 37575
Summary: sanitized build of clang does not work with thinlto
Product: compiler-rt
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: hiraditya at msn.com
CC: llvm-bugs at lists.llvm.org
Steps to repro:
1. Build clang with address sanitizer on.
cmake -DCMAKE_BUILD_TYPE:STRING=Debug
-DCMAKE_C_FLAGS_DEBUG:STRING=-g -fsanitize=address
-DCMAKE_CXX_FLAGS_DEBUG:STRING=-g -fsanitize=address
2. clang -flto=thin a.c b.c -Oz
==73085==ERROR: Interceptors are not working. This may be because
AddressSanitizer is loaded too late (e.g. via dlopen). Please launch the
executable with:
DYLD_INSERT_LIBRARIES=/Applications/Xcode_9.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
$ cat a.c
void foo() {
}
$ cat b.c
void foo();
int main() {
foo();
return 0;
}
Even exporting the dylib before the launch does not work.
export
DYLD_INSERT_LIBRARIES=/Applications/Xcode_9.3.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.1.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
--
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/20180524/224041fe/attachment-0001.html>
More information about the llvm-bugs
mailing list