<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 25, 2015 at 4:12 AM, Schlottke-Lakemper, Michael <span dir="ltr"><<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" target="_blank">m.schlottke-lakemper@aia.rwth-aachen.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word"><span class="">
<div>
<blockquote type="cite">
<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;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div class="gmail_extra">
<div class="gmail_quote"><br>
<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">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><font color="#888888">
<div><br>
</div>
</font></span>
<div><span><font color="#888888">Michael</font></span>
<div>
<div><br>
<div>
<blockquote type="cite">
<div>On 24 Nov 2015, at 15:28 , Michael Schlottke-Lakemper <<a href="mailto:m.schlottke-lakemper@aia.rwth-aachen.de" target="_blank">m.schlottke-lakemper@aia.rwth-aachen.de</a>> wrote:</div>
<br>
<div>
<div style="word-wrap:break-word">Hi folks,
<div><br>
</div>
<div>When running our msan-instrumented simulation program, instead of a proper output I get the following error:</div>
<div><br>
</div>
<div>==12089==WARNING: MemorySanitizer: use-of-uninitialized-value</div>
<div>
<div>==12089==WARNING: Can't read from symbolizer at fd 14</div>
<div>/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>==12089==WARNING: external symbolizer didn't start up correctly!</div>
</div>
<div><br>
</div>
<div>My setup for using the memory sanitizer is as follows:</div>
<div>- compile libc++/libc++abi with -fsanitize=memory</div>
<div>- compile test program with normal (=uninstrumented) LLVM/Clang installation using -fsanitize=memory</div>
<div>- put instrumented libcxx/libcxxabi library dirs into LD_LIBRARY_PATH</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div>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>
</div>
</span><div>Yes, and if I do that together with setting LD_LIBRARY_PATH=“”, it works, thanks.</div></div></blockquote><div><br></div><div>Why do you need to clear LD_LIBRARY_PATH to run MSan?</div><div>What libraries from LLVM lib dir harm running the MSan-ified executalbe? I thought that if you set rpath to correct path with instrumented libraries it should be enough...</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div> 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>
</div>
<div>Thanks,</div>
<div><br>
</div>
<div>Michael</div>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div></div>