[Patch] Make errors and crashes distinct even with LLVM_DISABLE_CRASH_REPORT
Reid Kleckner
rnk at google.com
Thu Jul 25 09:58:05 PDT 2013
Changing to exit(-3) sounds good to me.
There's more work here to be done here, though.
I complicated things by adding yet another env var called
LLVM_ENABLE_CRT_REPORT, which tries to suppress the "abort, retry, ignore"
dialog raised by assertion failures when using the Visual CRT. I think
both of these vars are basically trying to achieve the same behavior of
suppressing dialogs and slow system forensics gathering, so they could be
merged.
Currently, LLVM_DISABLE_CRASH_REPORTING turns off stack dumping on Windows
but not on Mac. This seems unintentional to me, and it means we don't get
crash stack traces from 'check-clang' on Windows. It'd be nice to get
those without a dialog.
On Thu, Jul 25, 2013 at 9:40 AM, Rafael EspĂndola <
rafael.espindola at gmail.com> wrote:
> On 25 July 2013 11:54, Aaron Ballman <aaron at aaronballman.com> wrote:
> > Wow, this code is pretty old (r82537 by ddunbar)! I'm not certain
> > removing it is the correct approach though -- the point to that is to
> > disable crash reporting, and by removing it, the crash dialogs will
> > appear again on system with post mortem debuggers installed.
>
> ah, so that is why I was not getting a dialog. Does MSVC ship with a
> post mortem debugger? Do I have to do something to enable it?
>
> > On Windows, crashing really does exit much like exiting with a regular
> > error, IIRC. The resulting code (checked with %ERRORLEVEL%) is
> > usually the exception code, but there's nothing magical about process
> > return values except for 0.
>
> I have attached a log showing the difference I get in one problematic
> test (badpch.c). The lest invasive fix would probably be to change
>
> _exit(3);
>
> to
> _exit(-3);
>
> but we would still be trowing away a bit of information.
>
> > I'm CCing in some folks who may have an opinion.
> >
> > ~Aaron
>
> Cheers,
> Rafael
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130725/f4b10aee/attachment.html>
More information about the llvm-commits
mailing list