<div dir="ltr">Hi Marko,<div><br></div><div>Uninstrumented code under ASan leads to false negatives. Under MSan, uninstrumented code leads to false positives. MSan is thus not suitable to be used as a preloaded DSO.</div><div><br></div><div>If you're really, really, extremely dedicated and willing to <a href="https://clang.llvm.org/docs/MemorySanitizer.html#blacklist">annotate</a> <i>every</i> instance where memory that's initialized in uninstrumented code flows to instrumented code, then you might be able to find some bugs. But it's worth bearing in mind that usage of MSan in this way is warranty-voiding.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 7, 2021 at 12:01 PM Marko Stanojlovic via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hello llvm developers,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Is there a way to use Memory Sanitizer when there is a third-party executable which cannot be recompiled,<br>
but it loads shared libraries that can be recompiled and we want to test them with MSan? In other words could be MSan used as dso?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Similar to ASan usage described on its wiki page - <a href="https://github.com/google/sanitizers/wiki/AddressSanitizerAsDso" id="gmail-m_-2048485037648791402LPlnk" target="_blank">https://github.com/google/sanitizers/wiki/AddressSanitizerAsDso</a>. </div>
<div></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Kind regards and thanks<span style="background-color:rgb(255,255,255);display:inline"><span> </span>in advance</span> for response,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Marko Stanojlović</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
<span style="color:rgb(68,68,68);font-family:Roboto,sans-serif;font-weight:300;letter-spacing:1px;text-align:center;background-color:rgb(255,255,255);display:inline">SYRMIA LLC @ Belgrade Office Park</span><br>
<span style="color:rgb(68,68,68);font-family:Roboto,sans-serif;font-weight:300;letter-spacing:1px;text-align:center;background-color:rgb(255,255,255);display:inline">Djordja Stanojevica 12,</span><br style="box-sizing:border-box;color:rgb(68,68,68);font-family:Roboto,sans-serif;font-weight:300;letter-spacing:1px;text-align:center;background-color:rgb(255,255,255)">
<span style="color:rgb(68,68,68);font-family:Roboto,sans-serif;font-weight:300;letter-spacing:1px;text-align:center;background-color:rgb(255,255,255);display:inline">Beograd 11070</span><br>
</div>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>