<div dir="ltr">I implemented Reid's suggestion in 258545. I tested that the test runs and passes when the DIA SDK is around (this is usually the case), and doesn't run when it isn't.</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jan 21, 2016 at 2:09 PM, Alexey Samsonov <span dir="ltr"><<a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Jan 21, 2016 at 10:58 AM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Jan 21, 2016 at 10:47 AM, Nico Weber <span dir="ltr"><<a href="mailto:thakis@chromium.org" target="_blank">thakis@chromium.org</a>></span> wrote:<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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span><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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Oh, ok, let's not depend on lld then. So, we need to either determine if DIA SDK is available at compiler-rt configure time, or teach llvm-symbolizer.exe to tell us that (as we support standalone compiler-rt build)...</div></div></div></div></blockquote><div><br></div></span><div>Maybe the lit config file could compile a small program with clang-cl and then run it through llvm-symbolizer and see if a symbol is returned?</div></div></div></div></blockquote><div><br></div></span><div>I'd rather duplicate this check in compiler-rt than add auto-conf style tests to check-asan startup:</div><div>  # See if the DIA SDK is available and usable.</div><div>  set(MSVC_DIA_SDK_DIR "$ENV{VSINSTALLDIR}DIA SDK")</div><div>  if (IS_DIRECTORY ${MSVC_DIA_SDK_DIR})</div><div>    set(HAVE_DIA_SDK 1)</div><div>  else()</div><div>    set(HAVE_DIA_SDK 0)</div><div>  endif()</div></div></div></div></blockquote><div><br></div></span><div>Yes. It's not 100% correct, but probably fine to assume that if we failed to find DIA SDK at configure time, so did llvm-symbolizer when it was built.</div><span class=""><div> </div><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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>It is also possible to change LLVMSymbolizer::SymbolizePC to return false when llvm-symbolizer returns no useful information.</div></div></div></div></blockquote><div><br></div></span><div>Do we want LLVMSymbolizer::SymbolizePC to succeed if we fetched file/line info, but not function name?</div><div>Also, there may well be another issue that will be hard to debug. It makes sense to store information about what features of llvm-symbolizer we expect to work explicitly.</div><span class=""><div> </div><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 dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> This will cause the sanitizers to try calling into dbghelp, which will probably work. It doesn't return PDB column info or work with dwarf, which is why we try llvm-symbolizer first. I think I made this change at one point, but I was asked to revert it or there were minor issues that didn't seem worth fixing.</div></div></div></div>
</blockquote></span></div><span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</font></span></div></div>
</blockquote></div><br></div>