From fe307ced1f0010cfb5b6d25e17613626b763fcbb Mon Sep 17 00:00:00 2001 From: Chris Kennelly Date: Tue, 21 Apr 2026 10:08:53 -0700 Subject: [PATCH] Replace ABSL_INTERNAL_LOG with ABSL_RAW_LOG in ReadMonotonicClockNanos. This method is in the transitive callgraph of TCMalloc via absl::base_internal::CycleClock::Frequency(). ABSL_RAW_LOG avoids a potential reentrancy/deadlock issue when TCMalloc invokes `Frequency` while holding one of its locks. PiperOrigin-RevId: 903293020 Change-Id: I4c8310fa32c1e12d049296377c5a9bf069ef513b --- absl/base/internal/sysinfo.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc index a62dd31c..cd08e51f 100644 --- a/absl/base/internal/sysinfo.cc +++ b/absl/base/internal/sysinfo.cc @@ -244,8 +244,7 @@ static int64_t ReadMonotonicClockNanos() { int rc = clock_gettime(CLOCK_MONOTONIC, &t); #endif if (rc != 0) { - ABSL_INTERNAL_LOG( - FATAL, "clock_gettime() failed: (" + std::to_string(errno) + ")"); + ABSL_RAW_LOG(FATAL, "clock_gettime() failed: (%d)", errno); } return int64_t{t.tv_sec} * 1000000000 + t.tv_nsec; }