From 9a62a6d429755f6c6dfe5a41fd074d993a24f3bb Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Thu, 19 Feb 2026 15:36:03 +0000 Subject: [PATCH] compilation fix Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> --- include/xrpl/beast/test/yield_to.h | 9 +++++++-- include/xrpl/core/Coro.ipp | 11 +++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/include/xrpl/beast/test/yield_to.h b/include/xrpl/beast/test/yield_to.h index 7defeaad67..b6c5bca3e3 100644 --- a/include/xrpl/beast/test/yield_to.h +++ b/include/xrpl/beast/test/yield_to.h @@ -21,9 +21,14 @@ namespace test { // Sanitizers significantly increase stack frame sizes // (TSAN ~3-5x, ASAN ~2-3x), requiring larger coroutine stacks. -#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__) || \ - (defined(__has_feature) && (__has_feature(thread_sanitizer) || __has_feature(address_sanitizer))) +#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__) inline constexpr std::size_t yieldStackSize = 8 * 1024 * 1024; +#elif defined(__has_feature) +#if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer) +inline constexpr std::size_t yieldStackSize = 8 * 1024 * 1024; +#else +inline constexpr std::size_t yieldStackSize = 2 * 1024 * 1024; +#endif #else inline constexpr std::size_t yieldStackSize = 2 * 1024 * 1024; #endif diff --git a/include/xrpl/core/Coro.ipp b/include/xrpl/core/Coro.ipp index 6da0f8c2f1..6f472251cc 100644 --- a/include/xrpl/core/Coro.ipp +++ b/include/xrpl/core/Coro.ipp @@ -2,13 +2,20 @@ #include +#include + namespace xrpl { // Sanitizers significantly increase stack frame sizes // (TSAN ~3-5x, ASAN ~2-3x), requiring larger coroutine stacks. -#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__) || \ - (defined(__has_feature) && (__has_feature(thread_sanitizer) || __has_feature(address_sanitizer))) +#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__) inline constexpr std::size_t coroStackSize = megabytes(8); +#elif defined(__has_feature) +#if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer) +inline constexpr std::size_t coroStackSize = megabytes(8); +#else +inline constexpr std::size_t coroStackSize = megabytes(1); +#endif #else inline constexpr std::size_t coroStackSize = megabytes(1); #endif