From 7dd376e6ba9fb1b1c1b052deabccf901bd937fa5 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Mon, 6 Dec 2021 09:33:47 +0100 Subject: [Backport] Handle long SIGSTKSZ in glibc > 2.33 Note that, this change is still under review and might not be the final version. `SIGSTKSZ` is no longer constant in glibc > 2.33 but a function returning a long. Cast before taking `max`. See https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD Change-Id: I2010b698fab25b65e5652c763ed71aba696a8e22 Review-URL: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3261335 Reviewed-by: Allan Sandfeld Jensen (cherry picked from commit 735b1a398df409a98e84ed0eb1afb0bafdd9dff9) (cherry picked from commit 2918e073086af29bd3e4176cd2403dffa789fdc0) Reviewed-by: Peter Varga --- .../breakpad/breakpad/src/client/linux/handler/exception_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc index b895f6d7ada..875b2abb744 100644 --- a/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc +++ b/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc @@ -138,7 +138,7 @@ void InstallAlternateStackLocked() { // SIGSTKSZ may be too small to prevent the signal handlers from overrunning // the alternative stack. Ensure that the size of the alternative stack is // large enough. - static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + static const unsigned kSigStackSize = std::max(16384U, (unsigned)SIGSTKSZ); // Only set an alternative stack if there isn't already one, or if the current // one is too small. -- cgit v1.2.3