From 65eddc925c3c032e2bf5540b42568b29e58c7928 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 10 Jun 2026 00:23:38 +0200 Subject: [PATCH] Meta: Enable stack clash protection on Linux Pass -fstack-clash-protection for Linux builds. This asks the compiler to probe large stack allocations incrementally so they cannot skip over stack guard pages. --- Meta/CMake/compile_options.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Meta/CMake/compile_options.cmake b/Meta/CMake/compile_options.cmake index 00f0926236..aa5e581bba 100644 --- a/Meta/CMake/compile_options.cmake +++ b/Meta/CMake/compile_options.cmake @@ -199,6 +199,7 @@ endif() if (LINUX) add_cxx_compile_definitions(_FILE_OFFSET_BITS=64) + add_cxx_compile_options(-fstack-clash-protection) add_cxx_link_option_if_supported(LINKER:-z,relro) add_cxx_link_option_if_supported(LINKER:-z,now) endif()