[PATCH] D7203: [asan] Set abort_on_error=1 by default on OS X
filcab+llvm.phabricator at gmail.com
Tue Jul 21 18:11:34 PDT 2015
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.
This build configuration wouldn't allow anyone to test the sanitizer
libraries *and* ship the binary they tested with.
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".
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
On Tue, Jul 21, 2015 at 5:36 PM, Alexey Samsonov <vonosmas at gmail.com> wrote:
> samsonov added a comment.
> In http://reviews.llvm.org/D7203#209394, @filcab wrote:
> > Hi all,
> > Sorry for not replying earlier.
> > Kostya:
> > It encourages changes if needed, yes.
> > Like when a platform needs to change something related to other
> > where ASan runs, and would require lots of changes to tests.
> > We also clear away ASAN_OPTIONS (and the others) when we run tests, which
> > allows us to make minimum assumptions when running them. This specific
> > change seems to be strictly on the "positive" side. Without it we could
> > simply fail some tests because the user happened to have a specific
> > turned on by default and ran the ASan tests.
> > By having ASAN_OPTIONS be reset by lit, and then having each test that
> > cares about it adding or replacing it, we can test the options
> > their absence, and have "proper" defaults for the tests.
> > It also allows us to "easily" have platforms specify their own defaults
> > flags, like what Kuba wants to do.
> Could you remind me why we set `ASAN_OPTIONS=symbolize_vs_style=false` in
> lit config, if we discard
> ASAN_OPTIONS from system environment anyway, and
> `symbolize_vs_style=false` *is* the default?
> That is, clearing ASAN_OPTIONS is fine, what worries us is adding default
> ASAN_OPTIONS for all
> tests that would not match the default configuration we're shipping to
> > About this specific change:
> > It's surprising (to me) to have ASan, by default, exit() the process,
> as if
> > "no error" had happened (by which I mean: The process exited in a
> > way, even though it exited with a failure exit code). This doesn't
> > me much, as an exit() on my platform is also "weird". But on Mac OS X it
> > feels weird to not have it crash.
> > Regards,
> > Filipe
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits