RD rippled-windows-debug
Open source

Debug rippled on Windows.

Build governor prevents OOM crashes. Verbose crash handlers reveal the real exception behind STATUS_STACK_BUFFER_OVERRUN. Rich-style logging for C++ builds.

Setup

.\scripts\setup-governor.ps1 # All builds are now protected automatically

Build

cmake --build build --parallel 16 # Governor prevents OOM automatically

Crash

Type: std::bad_alloc Message: bad allocation # Not STATUS_STACK_BUFFER_OVERRUN!

The Toolkit

Five tools for building and debugging rippled on Windows.

Build Governor

Monitors commit charge and throttles parallel cl.exe processes. Zero-config — wrappers auto-start on first build.

Crash handlers

Single-header diagnostics that reveal std::bad_alloc hidden as STATUS_STACK_BUFFER_OVERRUN. Full stack traces with symbols.

Rich-style logging

Colored log levels, box-drawing section boundaries, automatic timing, and correlation IDs for C++ terminal output.

Components

All single-header C++ files plus the .NET governor.

File
What it does
crash_handlers.h
Verbose crash diagnostics with exception type, stack trace, and system info
debug_log.h
Rich-style terminal logging with color, timing, and correlation IDs
minidump.h
Automatic crash dump capture with configurable location
build_info.h
Toolkit version, git commit, compiler, OS, CPU, and memory info
build-governor/
.NET service that throttles parallel builds based on commit charge

Quick start

Protect builds

# One-time setup (no admin required)
.\scripts\setup-governor.ps1

# Restart terminal, then build safely
cmake --build build --parallel 16
# Governor prevents OOM automatically

Patch rippled

#if BOOST_OS_WINDOWS
#include "crash_handlers.h"
#endif

int main() {
#if BOOST_OS_WINDOWS
    installVerboseCrashHandlers();
#endif
}

The Problem

Why parallel C++ builds on Windows crash silently.

Memory exhaustion

Each cl.exe uses 1-4 GB RAM. High -j values exhaust commit charge, causing silent failures.

Misleading errors

STATUS_STACK_BUFFER_OVERRUN (0xC0000409) is really std::bad_alloc — the /GS check masks it.

System freezes

When commit charge hits 100%, Windows becomes unresponsive. The governor throttles before that happens.