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

Aiden Grossman via libc-commits libc-commits at lists.llvm.org
Tue Nov 17 22:55:51 PST 2026


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

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


>From 5773b9eee3566e96d3616f50385b5cb20ac53684 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Wed, 18 Nov 2026 06:55:39 +0000
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.7
---
 libc/benchmarks/LibcBenchmark.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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.");
 }



More information about the libc-commits mailing list