[libc-commits] [libc] [libc] Do not core dump when failing to meet benchmark reqs (PR #243750)

via libc-commits libc-commits at lists.llvm.org
Tue Nov 17 22:56:50 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

Prefer reportFatalUsageError which doesn't core dump and just cleanly
exits.


---
Full diff: https://github.com/llvm/llvm-project/pull/243750.diff


1 Files Affected:

- (modified) libc/benchmarks/LibcBenchmark.cpp (+1-1) 


``````````diff
diff --git a/libc/benchmarks/LibcBenchmark.cpp b/libc/benchmarks/LibcBenchmark.cpp
index 7d2e4828624e05..9f74ee637a80a8 100644
--- a/libc/benchmarks/LibcBenchmark.cpp
+++ b/libc/benchmarks/LibcBenchmark.cpp
@@ -18,7 +18,7 @@ namespace libc_benchmarks {
 void checkRequirements() {
   const auto &CpuInfo = benchmark::CPUInfo::Get();
   if (CpuInfo.scaling == benchmark::CPUInfo::ENABLED)
-    report_fatal_error(
+    reportFatalUsageError(
         "CPU scaling is enabled, the benchmark real time measurements may be "
         "noisy and will incur extra overhead.");
 }

``````````

</details>


https://github.com/llvm/llvm-project/pull/243750


More information about the libc-commits mailing list