[PATCH] [compiler-rt] Turn abort_on_error=1 by default on OS X (part 1/2)

Kostya Serebryany kcc at google.com
Fri Mar 6 09:19:07 PST 2015


In http://reviews.llvm.org/D7203#135567, @zaks.anna wrote:

> Kostya,
>
> Our goal is to have abort_on_error=1 as the default on OS X in all scenarios. Here is the reasoning.
>
> There are several workflows in which one would run an ASanified process:
>
> 1. Executable launched from command line. Here, the output from stdout/stderr is expected.
> 2. A finger launched application or a daemon launched indirectly (via launchd). The current behavior is puzzling to developers - the app just quits and a daemon relaunches. Also, in these cases, stdout/stderr is lost by default. The developers expect to get notified about the program misbehavior through CrashReporter (or syslog). CrashReporter will not work if the executable just exits on error. This is the case that we are trying to address. Unfortunately, the current behavior is not acceptable for this workflow based on the user feedback we’ve received. I don’t think we have a way to handle this in a special way since people just build their apps/daemons, install, and run them in all kind of setups.


We have various ways to alter the default behavior at link-time. 
We can have a separate tool like that for abort_on_error. 
E.g. a function that will check if we are in #2

> 3. Various development settings: lldb, IDE… It is not necessary to discuss these as one should be able to alter the default settings here.

> 

>   Given that we need abort_on_error=1 for #2, I would try to keep as much consistency as possible and have the same default for #1. I don’t know if there is a reason to not crash when running from command line. Apart from breaking existing workflows, is there a reason you prefer exit on error?


Existing workflows is an important concern.
Not just our own workflows (where we can easily override the defaults) but also workflows of some unknown users.

> We understand that you might not want this behavior and/or it might be breaking existing workflows, so we are fine with keeping this on our branch (either indefinitely or until you change your mind:)). What about allowing the patch that sets the default ASAN_OPTIONS variable in lit (http://reviews.llvm.org/D7204)? This would simplify things for us.


That thing I dislike even more. Such a change in lit will mean that tests running under lit and manually will behave differently
and that tests that use ASAN_OPTIONS=foo will have to be changed to ASAN_OPTIONS=$ASAN_OPTIONS=foo 
What is "generating crashlogs"  and can that be disabled separately?


http://reviews.llvm.org/D7203

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list