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
This commit is contained in:
Chris Kennelly
2026-04-21 10:08:53 -07:00
committed by Copybara-Service
parent d4d92a7009
commit fe307ced1f

View File

@@ -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;
}