[PATCH] D67847: [Support] make report_fatal_error `abort` instead of `exit`

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 15 12:32:54 PST 2020


jyknight added a comment.

In D67847#1693694 <https://reviews.llvm.org/D67847#1693694>, @rnk wrote:

> In D67847#1691898 <https://reviews.llvm.org/D67847#1691898>, @jyknight wrote:
>
> > The `abort()` function raises SIGABRT, for which the default behavior is to trigger a coredump. Do we actually want that behavior?
> >
> > Either `_exit()` (long available extension, which lld already uses) or `quick_exit()` (the new C standard way) seem possibly preferable?
>
>
> It's easy to crash LLVM even without this change, so anyone running LLVM better have core dumps configured the way they like. Failed asserts raise SIGABRT already, for example, and we have tons of those. The only difference is that now end users, who may have never configured this stuff, may see more crashes. If it's a problem, I'd consider it QoI: we should fix the report_fatal_error to use proper diagnostics anyway so end users don't see them as often, just as we would treat any other user-visible crash.


That may be, but right now we do report a bunch of errors via report_fatal_error, even if we should not. Coredumps seem unlikely to be of use in diagnosing the issue involved (unlike, perhaps, with a segfault), so I don't see why we'd _want_ to call abort vs quick_exit/_exit.

I express this as my opinion, but do not veto acceptance given by others.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67847/new/

https://reviews.llvm.org/D67847





More information about the llvm-commits mailing list