r205948 - Avoid crashing when failing to emit a thunk

Reid Kleckner rnk at google.com
Tue Apr 22 16:14:21 PDT 2014


On Tue, Apr 22, 2014 at 4:03 PM, Nick Lewycky <nlewycky at google.com> wrote:

> On 9 April 2014 18:40, Reid Kleckner <reid at kleckner.net> wrote:
>
>> Author: rnk
>> Date: Wed Apr  9 20:40:15 2014
>> New Revision: 205948
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=205948&view=rev
>> Log:
>> Avoid crashing when failing to emit a thunk
>>
>> If we crash, we raise a crash handler dialog, and that's really
>> annoying.  Even though we can't emit correct IR until we have musttail,
>> don't crash.
>>
>
> Two questions, does report_fatal_error raise the dialog? And what happened
> to running the tests under KillTheDoctor to prevent this?
>

No, we were dereferencing null here.

I wasn't running tests, I was running clang with fallback, so KillTheDoctor
is no help.  We have *another* mechanism to suppress the dialogs, which is
to add LLVM_DISABLE_CRASH_REPORT to the environment.  I can't use that
because Chromium's build system resets all environment variables when
running the compiler.


> Third question, you say "don't crash" but then what *does* it do?
>

We've already emitted an error.  This code will generate bogus IR that will
fail verification.  If you review musttail, I can delete it.  ;)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140422/e2a56333/attachment.html>


More information about the cfe-commits mailing list