<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - sanitized build of clang does not work with thinlto"
href="https://bugs.llvm.org/show_bug.cgi?id=37575">37575</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>sanitized build of clang does not work with thinlto
</td>
</tr>
<tr>
<th>Product</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>compiler-rt
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>hiraditya@msn.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>