[Patch] Make errors and crashes distinct even with LLVM_DISABLE_CRASH_REPORT

Rafael EspĂ­ndola rafael.espindola at gmail.com
Thu Jul 25 08:41:56 PDT 2013


It looks like we went a bit too far with LLVM_DISABLE_CRASH_REPORT on
windows. Some failures, like an assert(0) not only disable the crash
reporting, they also make the program exit as if it was a regular
error.

This creates problems for enabling pipefail, as some tests would need
"not --crash" on unix and just "not" on windows.

The attached patch removes CRTReportHook. I don't claim to fully
understand this, but the behavior looks like what we want:

* check-all is clean
* Without  LLVM_DISABLE_CRASH_REPORT  clang -cc1 will open the crash
dialog when it crashes (#pragma clang __debug crash).
* With  LLVM_DISABLE_CRASH_REPORT we will print a backtrace and no
crash report shows up.
* "not --crash" returns zero when it runs a crashing clang.

Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 1594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130725/0b1b794e/attachment.obj>


More information about the llvm-commits mailing list