- Add Doxygen documentation to new methods, members, constants, and
macros introduced by the TSAN/ASAN PR (Database::startReadThreads,
BasicApp::DeferStart, ResourceManager::start, XRPL_SANITIZER_ACTIVE,
coroStackSize, yieldStackSize)
- Add @note thread-safety tags where atomics were introduced
- Update Database constructor docs to reflect deferred thread startup
- Remove temporary CI filter that restricted builds to sanitizer-only
variants (must run full matrix before merge)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clang doesn't have the 2GB shadow memory collision that GCC has,
so keep ASAN+UBSAN and TSAN+UBSAN combined for Clang-20. Only GCC-13
needs separate ASAN, TSAN, and UBSAN jobs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Combined ASAN+UBSAN instrumentation inflates data sections past 2GB,
colliding with ASAN's fixed shadow memory layout at 0x7fff8000+.
Split into independent ASAN, TSAN, and UBSAN jobs per compiler to
keep each binary within the shadow memory limit.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change -mcmodel=large to -mcmodel=medium for GCC ASAN builds. The large
model inflates code size with 64-bit absolute addresses, pushing the
binary past the 2GB limit where GCC's pre-compiled CRT startup code
(crtstuff.c) can't reach data sections with 32-bit relocations.
Medium model keeps code compact (CRT-compatible) while allowing data
beyond 2GB.
- Add nproc_subtract=20 for TSAN builds to reduce build parallelism.
TSAN instrumentation significantly increases per-compilation-unit memory
usage, causing OOM on CI runners with high parallelism.
- Plumb nproc_subtract from the CI matrix through to the build workflow
so individual configurations can control their parallelism.
- Temporarily restrict CI matrix to only the two previously-failing
configs (gcc-13 asan-ubsan, clang-20 tsan-ubsan) to validate fixes
without burning CI resources on passing configs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix BasicApp::startIOThreads() member corruption: replace
while(numberOfThreads_--) with a for loop to preserve the member value.
- Fix Coro.ipp non-sanitizer stack size: increase default from 1MB to 2MB
to match yield_to.h and prevent stack overflows in deep call chains.
- Remove stale "TSAN deactivated" comment and dead activate_tsan variable
from CI matrix generator.
- Clarify Application.cpp setup() comment to distinguish io_context threads
from subsystem-specific threads.
- Use explicit load(std::memory_order_relaxed) at all SHAMap::ledgerSeq_
read sites for consistency with the atomic store.
- Extract sanitizer detection into XRPL_SANITIZER_ACTIVE macro in
sanitizers.h, replacing duplicated preprocessor blocks in Coro.ipp
and yield_to.h.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Make Journal::Sink::thresh_ atomic to fix data race between
concurrent log threshold reads (hot path) and writes (RPC/startup)
- Make SHAMap::ledgerSeq_ atomic to fix data race between concurrent
node fetch reads and ledger acquisition writes
- Suppress known lock-order-inversion between getMasterMutex() and
RCLConsensus::mutex_ (requires larger lock-ordering redesign)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This change moves the sanitizer runtime options out to dedicated files, such that they can be used in multiple places (CI, local runs) without any need to rewrite them.
ASAN wasn't able to keep track of `boost::coroutine` context switches, and would lead to many false positives being detected. By switching to `boost::coroutine2` and `ucontext`, ASAN is able to know about the context switches advertised by the `boost::fiber` class, which in turn leads to more cleaner ASAN analysis.
This change deletes the `SecretKey` equality/inequality operators from the public library header and moves the comparison logic into test-only code.
Specifically, the `operator==` and `operator!=` free functions on `SecretKey` have been removed from `include/xrpl/protocol/SecretKey.h` and have been replaced with explicitly deleted member functions to prevent accidental use in production code. A named `test::equal()` helper has also been added in `src/test/unit_test/utils.h` for test assertions that need to compare secret keys.