[PATCH] D126550: Make report_fatal_error respect its GenCrashDiag argument so it doesn't generate a backtrace

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 27 08:14:13 PDT 2022


nlopes created this revision.
nlopes added reviewers: nikic, fhahn, aeubanks, MaskRay, bkramer, RKSimon, craig.topper.
Herald added subscribers: ormris, StephenFan, bollu, hiraditya.
Herald added a project: All.
nlopes requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

There are a few places where we use `report_fatal_error` when the input is broken. Currently, this function always crashes LLVM with an abort signal, which then triggers the backtrace printing code.
I think this is excessive, as wrong input shouldn't give a link to LLVM's github issue URL and tell users to file a bug report. We shouldn't print a stack trace either.

This patch changes `report_fatal_error` so it uses exit() rather than abort() when its argument GenCrashDiag=true.

As a side-effect, and the motivation for my change, this fixes 5 Alive2 reports, as our test driver doesn't propagate signal data.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126550

Files:
  llvm/lib/Support/ErrorHandling.cpp
  llvm/lib/Transforms/IPO/BlockExtractor.cpp
  llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp
  llvm/test/Transforms/BlockExtractor/invalid-block.ll
  llvm/test/Transforms/BlockExtractor/invalid-function.ll
  llvm/test/Transforms/BlockExtractor/invalid-line.ll
  llvm/test/Transforms/GCOVProfiling/version.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126550.432565.patch
Type: text/x-patch
Size: 5275 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220527/04952f0f/attachment.bin>


More information about the llvm-commits mailing list