mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
fix: Resolve CI levelization and rename check failures
- Revert yield_to.h to use inline preprocessor blocks instead of including sanitizers.h, avoiding a levelization loop between xrpl.basics and xrpl.beast. - Restructure XRPL_SANITIZER_ACTIVE fallback in sanitizers.h to avoid the #ifndef/#define pattern that the rename check misdetects as an include guard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
#elif defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer)
|
||||
#define XRPL_SANITIZER_ACTIVE 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef XRPL_SANITIZER_ACTIVE
|
||||
#else
|
||||
#define XRPL_SANITIZER_ACTIVE 0
|
||||
#endif
|
||||
#else
|
||||
#define XRPL_SANITIZER_ACTIVE 0
|
||||
#endif
|
||||
|
||||
@@ -4,8 +4,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <xrpl/basics/sanitizers.h>
|
||||
|
||||
#include <boost/asio/executor_work_guard.hpp>
|
||||
#include <boost/asio/io_context.hpp>
|
||||
#include <boost/asio/spawn.hpp>
|
||||
@@ -23,8 +21,19 @@ namespace test {
|
||||
|
||||
// Sanitizers significantly increase stack frame sizes
|
||||
// (TSAN ~3-5x, ASAN ~2-3x), requiring larger coroutine stacks.
|
||||
inline constexpr std::size_t yieldStackSize =
|
||||
XRPL_SANITIZER_ACTIVE ? 4 * 1024 * 1024 : 2 * 1024 * 1024;
|
||||
// Note: This duplicates the detection logic from xrpl/basics/sanitizers.h
|
||||
// because xrpl.beast cannot depend on xrpl.basics (levelization constraint).
|
||||
#if defined(__SANITIZE_THREAD__) || defined(__SANITIZE_ADDRESS__)
|
||||
inline constexpr std::size_t yieldStackSize = 4 * 1024 * 1024;
|
||||
#elif defined(__has_feature)
|
||||
#if __has_feature(thread_sanitizer) || __has_feature(address_sanitizer)
|
||||
inline constexpr std::size_t yieldStackSize = 4 * 1024 * 1024;
|
||||
#else
|
||||
inline constexpr std::size_t yieldStackSize = 2 * 1024 * 1024;
|
||||
#endif
|
||||
#else
|
||||
inline constexpr std::size_t yieldStackSize = 2 * 1024 * 1024;
|
||||
#endif
|
||||
|
||||
/** Mix-in to support tests using asio coroutines.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user