Skip to content

Fix compilation with newer gcc

Steve Lhomme requested to merge robUx4/breakpad:gcc10-fix into master

Backported from https://chromium.googlesource.com/breakpad/breakpad/+/605c51ed96ad44b34c457bbca320e74e194c317e%5E%21/src/client/linux/handler/exception_handler.cc

On glibc > 2.33, SIGSTKSZ might not be constant (in which case it expands to a call to sysconf which returns a long int); see https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html

Pass unsigned explicitly to std::max, to avoid relying on template argument deduction. This works both with the old-style constant SIGSTKSZ and the new configurable one.

Initially based on https://chromium-review.googlesource.com/c/2776379

Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721 Reviewed-by: Mark Mentovai mark@chromium.org

Merge request reports