mirror of
https://github.com/XRPLF/rippled.git
synced 2026-03-14 16:52:24 +00:00
- Fix signed integer overflow UB in negation operations by performing
negation in unsigned domain before casting back to signed. Applies to
IOUAmount, XRPAmount, MPTAmount, and throughout STAmount (operator+,
set, canonicalize, xrp/iou/mpt accessors, constructors).
- Fix post-decrement loop patterns that cause unsigned integer overflow
(e.g. `while(n--)`) by replacing with `while(n > 0) { --n; ... }` or
`for` loops in DecayingSample.h, varint.h, base64.cpp, BasicApp.cpp,
and yield_to.h.
- Add Counts::adjustCounter() helper in PeerFinder to safely adjust
size_t counters by signed values without triggering UBSan.
- Fix uninitialized member in ValidatorSite_test and remove
overflow-dependent initialization in LexicalCast_test.
- Drastically reduce ubsan.supp by removing broad per-file suppressions
now that the underlying issues are fixed. Keep only targeted
suppressions for external libraries (RocksDB, protobuf, gRPC, nudb,
snappy, abseil) and intentional unsigned wraps in rippled (STAmount
arithmetic, nft::cipheredTaxon).
- Remove UBSAN_OPTIONS runtime suppressions file from CI workflow.
- Enable UBSan builds for gcc-13 in addition to clang-20 in CI matrix.
- Add fPIC handling in conanfile.py when Address sanitizer is active.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>