<div dir="ltr">That was done because on some platforms (like the PS4. Possibly (some) Windows people would like it too) symbolize_vs_style=true is the default.<div>This build configuration wouldn't allow anyone to test the sanitizer libraries *and* ship the binary they tested with.</div><div><br></div><div>Making sure that the platform's defaults are ok is a matter of creating a test which only runs on that platform and matches whatever defaults are different from "the usual defaults".</div><div><br></div><div>Having the tests depend on the user remembering to set the proper ASAN_OPTIONS for testing is much more fragile and prone to problems (and a hidden dependency on the testing environment). And it would still require all tests that set ASAN_OPTIONS to something also set it to ASAN_OPTIONS=$ASAN_OPTIONS:... anyway.</div><div><br></div><div>  Filipe<br><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 21, 2015 at 5:36 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">samsonov added a comment.<br>
<span class=""><br>
In <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D7203-23209394&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Id8xC99dji0XJWVx5L1g7yW6GDpuzA5myUNTXUDISRg&s=j--GBmFuyduZJbx63FSFJCiB9UUbR6CgIe2UMQeqpjw&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D7203#209394</a>, @filcab wrote:<br>
<br>
> Hi all,<br>
>  Sorry for not replying earlier.<br>
><br>
> Kostya:<br>
>  It encourages changes if needed, yes.<br>
>  Like when a platform needs to change something related to other platforms<br>
>  where ASan runs, and would require lots of changes to tests.<br>
><br>
> We also clear away ASAN_OPTIONS (and the others) when we run tests, which<br>
>  allows us to make minimum assumptions when running them. This specific<br>
>  change seems to be strictly on the "positive" side. Without it we could<br>
>  simply fail some tests because the user happened to have a specific option<br>
>  turned on by default and ran the ASan tests.<br>
><br>
> By having ASAN_OPTIONS be reset by lit, and then having each test that<br>
>  cares about it adding or replacing it, we can test the options themselves,<br>
>  their absence, and have "proper" defaults for the tests.<br>
>  It also allows us to "easily" have platforms specify their own defaults for<br>
>  flags, like what Kuba wants to do.<br>
<br>
<br>
</span>Could you remind me why we set `ASAN_OPTIONS=symbolize_vs_style=false` in lit config, if we discard<br>
ASAN_OPTIONS from system environment anyway, and `symbolize_vs_style=false` *is* the default?<br>
<br>
That is, clearing ASAN_OPTIONS is fine, what worries us is adding default ASAN_OPTIONS for all<br>
tests that would not match the default configuration we're shipping to users.<br>
<div class="HOEnZb"><div class="h5"><br>
> About this specific change:<br>
<br>
>  It's surprising (to me) to have ASan, by default, exit() the process, as if<br>
<br>
>  "no error" had happened (by which I mean: The process exited in a "normal"<br>
<br>
>  way, even though it exited with a failure exit code). This doesn't affect<br>
<br>
>  me much, as an exit() on my platform is also "weird". But on Mac OS X it<br>
<br>
>  feels weird to not have it crash.<br>
<br>
><br>
<br>
> Regards,<br>
<br>
><br>
<br>
>   Filipe<br>
<br>
<br>
<br>
<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__reviews.llvm.org_D7203&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=Id8xC99dji0XJWVx5L1g7yW6GDpuzA5myUNTXUDISRg&s=GzLs90-Yz8p9aGdqkeN8_rTPVIDV-3Os39ef2H3Slyc&e=" rel="noreferrer" target="_blank">http://reviews.llvm.org/D7203</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br></div></div></div></div>