From b0200a04855960f99981f9a79532d8b763bd711b Mon Sep 17 00:00:00 2001 From: Marshall Mohror Date: Mon, 20 Sep 2021 22:28:48 -0500 Subject: [PATCH] Fix `signal_stack_size` for glibc 2.34 `SIGSTKSZ` is now defined as `sysconf(_SC_SIGSTKSZ)` which is not constexpr, and returns a long which throws off the `std::max` template deduction. Signed-off-by: Enrico Belleri --- src/backend/x64/exception_handler_posix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/x64/exception_handler_posix.cpp b/src/backend/x64/exception_handler_posix.cpp index e1a3b190..a74b6b02 100644 --- a/src/backend/x64/exception_handler_posix.cpp +++ b/src/backend/x64/exception_handler_posix.cpp @@ -60,7 +60,7 @@ private: SigHandler sig_handler; SigHandler::SigHandler() { - constexpr size_t signal_stack_size = std::max(SIGSTKSZ, 2 * 1024 * 1024); + const size_t signal_stack_size = std::max(SIGSTKSZ, 2 * 1024 * 1024); stack_t signal_stack; signal_stack.ss_sp = std::malloc(signal_stack_size);