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
diff --git a/absl/base/internal/sysinfo.cc b/absl/base/internal/sysinfo.cc index a62dd31..cd08e51 100644 --- a/absl/base/internal/sysinfo.cc +++ b/absl/base/internal/sysinfo.cc
@@ -244,8 +244,7 @@ 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; }