<div dir="ltr">I can live with test case churn.<div>I'll do it soon and submit the patches for:</div><div> - test churn</div><div> - default to vs-style if defined(_MSC_VER)</div><div class="gmail_extra"><br></div><div class="gmail_extra">Thanks,</div><div class="gmail_extra"><br></div><div class="gmail_extra"> Filipe</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 4:35 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"><br><div class="gmail_quote"><div><div class="h5">On Thu, Jun 4, 2015 at 4:25 PM, Filipe Cabecinhas <span dir="ltr"><<a href="mailto:filcab+llvm.phabricator@gmail.com" target="_blank">filcab+llvm.phabricator@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>On Thu, Jun 4, 2015 at 4:16 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"><br><div class="gmail_quote"><span>On Thu, Jun 4, 2015 at 3:57 PM, Filipe Cabecinhas <span dir="ltr"><<a href="mailto:filcab+llvm.phabricator@gmail.com" target="_blank">filcab+llvm.phabricator@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">Sounds good to me. But there's a detail to be dealt with.<div><br></div><div>For out of the box _testing_, having the VS style output be the default will force us to, either:</div><div> - use a script to run the commands (doable, but ugly (except if you need the script anyway, for remote testing. I'm ok with this))</div><div> - or change all the tests to expect one of the output styles (I don't really like this :-) )</div><div><br></div><div>I would like to avoid both of those solutions.</div><div><br></div><div>What do you think about doing something like this:</div><div><br></div><div>Have options get their values in this order:</div><div> - Compiled-in defaults</div><div> - $SANITIZER_OPTIONS (new)</div><div><div> - __tool_default_options() (asan, ubsan, etc)</div></div><div> - $TOOL_OPTIONS (ASAN, UBSAN, etc)</div><div><br></div><div>The rationale is:</div><div> - Compiled-in defaults should be sensible defaults for the platform.</div><div> - $SANITIZER_OPTIONS could set common flags (only, no tool-specific options) for the user/machine</div><div> - __tool_default_options() can be used in a program to override some flags because the test/program expects this</div><div> - $TOOL_OPTIONS is a final chance for the current user, running the program, to override.</div><div><br></div><div>I'm ok with not doing this, and simply waiting until it's more necessary.</div><div>For the PS4, I can just work around it and "hack" our remote run script to always add symbolize_vs_style=false to *_OPTIONS env vars when testing. But it wouldn't be nice for local Windows testing (non-remote), since we would default to vs-style (if _MSC_VER was defined) in some cases.</div></div></blockquote><div><br></div></span><div>I'd like to avoid it if possible :) I feel that there are far too many overrides already, which occasionally confuse users. It would be really untrivial to explain why one environment variable kicks off before linked-in defaults,</div><div>and all the rest env vars kicks off afterwards.</div></div></div></div></blockquote><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"><div>As for testing, we can adjust ASAN_OPTIONS, UBSAN_OPTIONS etc. in lit config and add "symbolize_vs_style=false" there. Then we can write all test expectations for POSIX style (and have a couple of lit tests overriding this value and testing VS-style output).<br></div></div></div></div></blockquote></span><div>You can't simply do this. A bunch of tests will, in their run commands, define ASAN_OPTIONS and UBSAN_OPTIONS. This will override anything that lit might be setting, throwing our override out the window. Unless I'm missing something.</div></div></div></div></blockquote><div><br></div></div></div><div>Well, you can fix those tests to call "env ASAN_OPTIONS=$ASAN_OPTIONS:my_override=false" so that you preserve global ASAN_OPTIONS specified in lit config. Note that after your recent change we won't pick up ASAN_OPTIONS from the actual environment.</div><div><div class="h5"><div> </div><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><font color="#888888"><div><br></div><div> Filipe</div></font></span><div><div><div> </div><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"><div></div><span><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div> </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div>Any ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div> Filipe</div><div><div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 4, 2015 at 2:57 PM, 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">REPOSITORY<br>
  rL LLVM<br>
<span><br>
================<br>
Comment at: lib/sanitizer_common/sanitizer_flags.inc:149<br>
@@ -148,1 +148,3 @@<br>
             "Print inlined frames in stacktraces. Defaults to true.")<br>
+COMMON_FLAG(bool, symbolize_vs_style, false,<br>
+            "Print file locations in Visual Studio style (e.g: "<br>
----------------<br>
</span><span>samsonov wrote:<br>
> filcab wrote:<br>
> > This should probably default to SANITIZER_WINDOWS instead of false.<br>
> > I think it would be the option that better matches what a user of that platform would expect, no?<br>
> I'd let Reid comment on this. I don't have strong preference about Windows defaults.<br>
</span>Let's default this to `defined(_MSC_VER)`. Thankfully it is very easy to override the default sanitizer options with __asan_default_options(), so I'd rather optimize for first time users of visual studio rather than people like us with big cross-platform projects.<br>
<div><div><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D10113&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=TcU_6mpAWCNXphafV_pXb3btffVnmV_S5fvilDE6TtU&s=E0CVauXjv-SpWGokReK-6LNuGF6M36sN-btJiBRPCSo&e=" target="_blank">http://reviews.llvm.org/D10113</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_settings_panel_emailpreferences_&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=TcU_6mpAWCNXphafV_pXb3btffVnmV_S5fvilDE6TtU&s=qPMYMxKaizot1cpVsA4mjc9OTQGfhli_lK5iG2hkQ3U&e=" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</div></div></blockquote></div><br></div></div></div></div></div>
</blockquote></span></div><span><font color="#888888"><br><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></div></div><br></div></div>
</blockquote></div></div></div><span class="HOEnZb"><font color="#888888"><br><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></div>