From 47c620cc0497be335c675aa1916950f11bd94fd7 Mon Sep 17 00:00:00 2001 From: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Date: Fri, 24 Apr 2026 17:47:16 +0100 Subject: [PATCH] fix: Resolve MSVC Debug build failure in JobQueue.h; re-enable _CRTDBG_MAP_ALLOC in CI (#6993) Signed-off-by: Pratik Mankawde <3397372+pratikmankawde@users.noreply.github.com> Co-authored-by: Ed Hennis --- cmake/XrplCompiler.cmake | 2 +- include/xrpl/core/JobQueue.h | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/cmake/XrplCompiler.cmake b/cmake/XrplCompiler.cmake index 9db754eb1d..0b77ff3525 100644 --- a/cmake/XrplCompiler.cmake +++ b/cmake/XrplCompiler.cmake @@ -118,7 +118,7 @@ if(MSVC) NOMINMAX # TODO: Resolve these warnings, don't just silence them _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS - $<$,$,$>>:_CRTDBG_MAP_ALLOC> + $<$,$>:_CRTDBG_MAP_ALLOC> ) target_link_libraries(common INTERFACE -errorreport:none -machine:X64) else() diff --git a/include/xrpl/core/JobQueue.h b/include/xrpl/core/JobQueue.h index 3c1bde89c3..bac616470a 100644 --- a/include/xrpl/core/JobQueue.h +++ b/include/xrpl/core/JobQueue.h @@ -7,8 +7,13 @@ #include #include +// Include only the specific Boost.Coroutine2 headers actually used here. +// Avoid `boost/coroutine2/all.hpp` because it transitively pulls in +// `boost/context/pooled_fixedsize_stack.hpp`, whose `.malloc()` / `.free()` +// member calls on `boost::pool` collide with MSVC's `_CRTDBG_MAP_ALLOC` macros +// in Debug builds (see cmake/XrplCompiler.cmake). #include -#include +#include #include