[all-commits] [llvm/llvm-project] 7b5a45: [RISCV] Just reporting an error shouldn't generate...

Paul Bowen-Huggett via All-commits all-commits at lists.llvm.org
Tue Apr 15 08:52:21 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b5a459611212b650e863c0ad6a9fa49c07e29df
      https://github.com/llvm/llvm-project/commit/7b5a459611212b650e863c0ad6a9fa49c07e29df
  Author: Paul Bowen-Huggett <paulhuggett at mac.com>
  Date:   2025-04-15 (Tue, 15 Apr 2025)

  Changed paths:
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVBaseInfo.cpp
    M llvm/test/MC/RISCV/target-abi-invalid.s

  Log Message:
  -----------
  [RISCV] Just reporting an error shouldn't generate a crash diagnostic (#134040)

Wanting to examine some of generated code, I tried MCA with the command:
~~~bash
llvm-mca -mtriple=riscv32-unknown-unknown -mcpu=rocket -iterations=300
core_list_join.s
~~~
I was greeted with the following error message:
~~~
LLVM ERROR: RV32 target requires an RV32 CPU
PLEASE submit a bug report to
https://github.com/llvm/llvm-project/issues/ and include the crash
backtrace.
Stack dump:
…
~~~
On beginning to investigate the “bug”, I discovered that the code was
simply attempting to report a user error. It used report_fatal_error()
to do so but with the “bool GenCrashDiag” argument enabled (the
default). This tiny change adds a wrapper function which calls
report_fatal_error() as before but with GenCrashDiag disabled.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list