Sponsored Content
Skip to content

ci: Fix build errors on windows - #6562

Merged
bthomee merged 1 commit into
developfrom
a1q123456/avoid-definiting-crtdbg-map-alloc
Mar 17, 2026
Merged

ci: Fix build errors on windows#6562
bthomee merged 1 commit into
developfrom
a1q123456/avoid-definiting-crtdbg-map-alloc

Conversation

@a1q123456

@a1q123456 a1q123456 commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

High Level Overview of Change

This PR stops defining the macro _CRTDBG_MAP_ALLOC on windows when building in ci.

Context of Change

We're getting some build errors on Windows after we redeployed the windows build runners. https://github.com/XRPLF/rippled/actions/runs/23182100319/job/67376175628

An MSVC update seems to have added crtdbg.h include dependency to <string>. As the result, pooled_fixedsize_stack in boost (https://www.boost.org/doc/libs/1_89_0/boost/context/pooled_fixedsize_stack.hpp) has stopped working on windows because it calls a member function malloc which conflicts with the macro name malloc introduced by crtdbg.h.

The purpose of _CRTDBG_MAP_ALLOC is to use debug malloc and realloc to help debug memory leaks. However, it makes no sense to use it in CI because we don't run the debug builds produced by CI, also, never have we directly included crtdbg.h and used its functionalities.

API Impact

  • Public API: New feature (new methods and/or new fields)
  • Public API: Breaking change (in general, breaking changes should only impact the next api_version)
  • libxrpl change (any change that may affect libxrpl or dependents of libxrpl)
  • Peer protocol change (must be backward compatible or bump the peer protocol version)

Signed-off-by: JCW <a1q123456@users.noreply.github.com>
@a1q123456
a1q123456 requested a review from bthomee March 17, 2026 16:50
@a1q123456 a1q123456 added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Mar 17, 2026
@a1q123456 a1q123456 added the Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. label Mar 17, 2026
@a1q123456 a1q123456 changed the title Fix build errors on windows ci: Fix build errors on windows Mar 17, 2026
@codecov

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.8%. Comparing base (78b2d70) to head (c26bf2c).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##           develop   #6562     +/-   ##
=========================================
- Coverage     79.9%   79.8%   -0.0%     
=========================================
  Files          878     878             
  Lines        67893   67893             
  Branches      7547    7551      +4     
=========================================
- Hits         54217   54209      -8     
- Misses       13676   13684      +8     

see 2 files with indirect coverage changes

Impacted file tree graph

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bthomee
bthomee added this pull request to the merge queue Mar 17, 2026
@bthomee
bthomee removed this pull request from the merge queue due to the queue being cleared Mar 17, 2026
@bthomee
bthomee merged commit 0a9513e into develop Mar 17, 2026
3 checks passed
@bthomee
bthomee deleted the a1q123456/avoid-definiting-crtdbg-map-alloc branch March 17, 2026 17:50
pratikmankawde added a commit that referenced this pull request Apr 22, 2026
PR #6562 disabled `_CRTDBG_MAP_ALLOC` in CI to work around a macro
collision in `boost/context/pooled_fixedsize_stack.hpp`. The previous
commit resolves that collision at the source by narrowing the
Boost.Coroutine2 include so the broken header is no longer pulled in.

With the root cause fixed, restore the original define scope. CI now
exercises the same Debug preprocessor configuration as local MSVC
builds, guarding against regressions of the same bug.
@mvadari mvadari added this to the 3.2.0 milestone May 20, 2026
beartec-jpg pushed a commit to beartec-jpg/FalconLedger that referenced this pull request Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready to merge *PR author* thinks it's ready to merge. Has passed code review. Perf sign-off may still be required. Trivial Simple change with minimal effect, or already tested. Only needs one approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants