From f62f2eb25ed5592e4432dd59fe903fccfe0b165a Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Fri, 13 Dec 2019 17:20:06 +0100 Subject: [PATCH] Boost Coroutines: Increase the default stack size from 64 to 256KB refs #7532 --- lib/base/io-engine.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/base/io-engine.hpp b/lib/base/io-engine.hpp index b9e4ee6c3..9e1bb3504 100644 --- a/lib/base/io-engine.hpp +++ b/lib/base/io-engine.hpp @@ -107,7 +107,10 @@ public: // Rationale: Low cost Windows agent only & https://github.com/Icinga/icinga2/issues/7431 return 8 * 1024 * 1024; #else /* _WIN32 */ - return boost::coroutines::stack_allocator::traits_type::default_size(); // Default 64 KB + // Increase the stack size for Linux/Unix coroutines for many JSON objects on the stack. + // This may help mitigate possible stack overflows. https://github.com/Icinga/icinga2/issues/7532 + return 256 * 1024; + //return boost::coroutines::stack_allocator::traits_type::default_size(); // Default 64 KB #endif /* _WIN32 */ }