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

Anna Zaks zaks.anna at gmail.com
Fri Mar 6 08:30:13 PST 2015


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.
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?

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.



More information about the llvm-commits mailing list