Commit 0c3df2f5 by Abseil Team Committed by Copybara-Service

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
parent 75d25251
...@@ -162,7 +162,7 @@ int GetSignalHandlerStackConsumption(void (*signal_handler)(int)) { ...@@ -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 // 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 // setting ss_size to MINSIGSTKSZ, which should be ignored by the kernel
// when SS_DISABLE is set. // 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, ABSL_RAW_CHECK(sigaltstack(&old_sigstk, nullptr) == 0,
"sigaltstack() failed"); "sigaltstack() failed");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment