<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div>
<blockquote type="cite" class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div class="gmail_extra">
<div class="gmail_quote"><br class="">
<blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;">
<div style="word-wrap: break-word;" class="">Thus I tried to compile a complete LLVM/Clang stack (with compiler-rt, libcxx, libcxxabi, libomp) using -DLLVM_USE_SANITIZER=MemoryWithOrigins. However, this did not work either, as apparently during the compilation
 process the memory sanitizer already comes to life and complains about use-of-unitialized values… Thus this approach seems to be a dead end.<span class="HOEnZb"><font color="#888888" class="">
<div class=""><br class="">
</div>
</font></span>
<div class=""><span class="HOEnZb"><font color="#888888" class="">Michael</font></span>
<div class="">
<div class="h5"><br class="">
<div class="">
<blockquote type="cite" class="">
<div class="">On 24 Nov 2015, at 15:28 , Michael Schlottke-Lakemper <<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" target="_blank" class="">m.schlottke-lakemper@aia.rwth-aachen.de</a>> wrote:</div>
<br class="">
<div class="">
<div style="word-wrap: break-word;" class="">Hi folks,
<div class=""><br class="">
</div>
<div class="">When running our msan-instrumented simulation program, instead of a proper output I get the following error:</div>
<div class=""><br class="">
</div>
<div class="">==12089==WARNING: MemorySanitizer: use-of-uninitialized-value</div>
<div class="">
<div class="">==12089==WARNING: Can't read from symbolizer at fd 14</div>
<div class="">/pds/opt/llvm/bin/llvm-symbolizer: symbol lookup error: /pds/opt/libcxx-20151121-r253770-clang-msan/lib/libc++abi.so.1: undefined symbol: __msan_origin_tls</div>
<div class="">==12089==WARNING: external symbolizer didn't start up correctly!</div>
</div>
<div class=""><br class="">
</div>
<div class="">My setup for using the memory sanitizer is as follows:</div>
<div class="">- compile libc++/libc++abi with -fsanitize=memory</div>
<div class="">- compile test program with normal (=uninstrumented) LLVM/Clang installation using -fsanitize=memory</div>
<div class="">- put instrumented libcxx/libcxxabi library dirs into LD_LIBRARY_PATH</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div class="">Can you pass -Wl,-rpath when you link your executable, to specify the path to instrumented libc++/libc++abi?</div>
</div>
</div>
</div>
</blockquote>
<br class="">
</div>
<div>Yes, and if I do that together with setting LD_LIBRARY_PATH=“”, it works, thanks. The problem with this approach, however,  is that on our cluster installation, LD_LIBRARY_PATH by default includes LLVM’s lib dir. If I want the MemorySanitizer to work for
 all users, I somehow need to find another way that may involve *adding* paths to LD_LIBRARY_PATH, but not removing them. Any idea how I could achieve this?</div>
<div><br class="">
</div>
<div>Thanks,</div>
<div><br class="">
</div>
<div>Michael</div>
</body>
</html>