[PATCH] D33960: ErrorHandling: report_fatal_error: call abort() instead of exit()

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 7 17:24:50 PDT 2017


rnk added a comment.

Oh yeah, the reason I added @filcab: People have been "fixing" AFL and other fuzzer bugs by adding turning asserts into `if (X) report_fatal_error("invalid input");`. See https://reviews.llvm.org/rL238272, https://reviews.llvm.org/rL238269, https://reviews.llvm.org/rL238268, etc. If you call abort, these will be treated as fuzzer bugs. Maybe that's what you want (for people to actually handle errors), but that's not the status quo.

Another way of looking at it is, does LLVM really need an assert that doesn't compile out in release builds? That's kind of what it will become with this patch.

Re: stopping in the debugger, just do `catch syscall exit + exit_group`. gdb's behavior of disposing of the inferior after it exits always struck me as weird.


Repository:
  rL LLVM

https://reviews.llvm.org/D33960





More information about the llvm-commits mailing list