summaryrefslogtreecommitdiff
path: root/absl/debugging
diff options
context:
space:
mode:
authorGravatar Abseil Team <absl-team@google.com>2023-01-28 13:41:47 -0800
committerGravatar Copybara-Service <copybara-worker@google.com>2023-01-28 13:42:33 -0800
commit0c3df2f5a7d3918b9e5762cd8f143a6004b76cda (patch)
tree05bae0e3d6fb8db2258d55c94506aa70ee6232cb /absl/debugging
parent75d2525117c8da93840ab256f07b191086fd7cbb (diff)
The type of MINSIGSTKSZ is not guaranteed; avoid potential implicit sign conversion.
On some glibcs, this is defined as a call to sysconf(), which returns a long. PiperOrigin-RevId: 505380003 Change-Id: I53207846d733d3a529630a6aff9bca425cf90a21
Diffstat (limited to 'absl/debugging')
-rw-r--r--absl/debugging/internal/stack_consumption.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/absl/debugging/internal/stack_consumption.cc b/absl/debugging/internal/stack_consumption.cc
index 51348649..6d974992 100644
--- a/absl/debugging/internal/stack_consumption.cc
+++ b/absl/debugging/internal/stack_consumption.cc
@@ -162,7 +162,7 @@ int GetSignalHandlerStackConsumption(void (*signal_handler)(int)) {
// versions of musl have a bug that rejects ss_size==0. Work around this by
// setting ss_size to MINSIGSTKSZ, which should be ignored by the kernel
// when SS_DISABLE is set.
- old_sigstk.ss_size = MINSIGSTKSZ;
+ old_sigstk.ss_size = static_cast<size_t>(MINSIGSTKSZ);
}
ABSL_RAW_CHECK(sigaltstack(&old_sigstk, nullptr) == 0,
"sigaltstack() failed");