[PATCH] D150674: [RISCV] Set GenCrashDialog=false for various report_fatal_error calls in lib/Target/RISCV

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 25 18:44:27 PDT 2023


mehdi_amini added a comment.

> As a number of our users of report_fatal_error really indicate an exit with an error message for improper input



In D150674#4346910 <https://reviews.llvm.org/D150674#4346910>, @asb wrote:

> In D150674#4346704 <https://reviews.llvm.org/D150674#4346704>, @MaskRay wrote:
>
>> `report_fatal_error` is a lazy error reporting mechanism that should be avoided. Adding `false` (`exit(1)` instead of `abort()`) just papers over the issue...
>
> Yes, it would be good to have a better error reporting mechanism in many of these cases and excise these uses of report_fatal_error - but AFAIK the infrastructure just isn't there for many of these to report a proper error with context (corrections welcome!).

I'm not really buying the infrastructure argument: seems like a cultural issue in not spending enough design effort for each of these.
For example many of these seems to me like invariants of these components, and as such verification should happen upstream of getting through these code-paths (and thus not validating before become a bug in the tool...)


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

https://reviews.llvm.org/D150674



More information about the llvm-commits mailing list