[PATCH] [compiler-rt] Turn abort_on_error=1 by default on OS X (part 1/2)
zaks.anna at gmail.com
Fri Mar 6 13:49:31 PST 2015
> 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
What do you mean by altering the behavior at link time?
It's not how you build the binaries that differs. It's how you run them. You can have the same process that can be launched from command line and through launchd. I don't know how to restrict the set of these at link time. People can build with make, ninja, or xcodebuild, it should not matter. In all cases, we want to trigger the CrashReporter on OS X.
> 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.
True. However, crashing on error is the right thing to do on OS X (in my opinion). It might be worth doing the switch and the sooner you do this the better (less people rely on the existing behavior). Also, it should be relatively easy for people to work around this. However, this most likely will break someone and this is a policy decision, so I can only offer an opinion.
> 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
True. Dmitri G. suggested providing a different substitution for lit's "not" on darwin. Specifically, we would use "not crash" instead of "not". Kuba, I don't think we've explored this option before.
> What is "generating crashlogs" and can that be disabled separately?
CrashReporter is activated when a program receives a fatal termination signal. It cannot be disabled on per process/application bases and is enabled by default on Mac. Crashlogs are the reports generated by CrashReporter, which is the standard facility for logging information about crashed processes on OS X. It works for command line tools as well as daemons, apps automatically. CrashReporter will not work on processes that do not crash. This is why we believe, an ASan report should trigger CrashReporter and generate a crashlog. This is the first place Mac developers look at when there is a malfunction anywhere in the system.
More information about the llvm-commits