1 major finding · 3 minor findings · 2 suggestions
Findings
[major] · Two CI jobs use compilers that cannot build the tree
Both jobs fail during compilation, so their functional and previous-release tests do not run.
Location: CMakeLists.txt:84 (head).
Details and suggested fix
The previous releases job selects GCC 12, and the No wallet job selects Clang 17 with libc++. GCC 12 rejects the non-dependent static_assert(false, ...) in src/logging/timer.h and its libstdc++ lacks std::views::zip. Clang 17 cannot deduce class template arguments through the util::Unexpected alias used in src/util/bip32.cpp. Update the jobs and their minimum-version comments: use GCC 13 with a newer image than Ubuntu 22.04 for previous releases, and Clang 19 with libc++ 19 for No wallet.
[minor] · The documented compiler minimums cannot build this revision
Builders following the documented minimums will select toolchains that fail to compile the tree.
Location: doc/release-notes-36033.md:4 (head).
Details and suggested fix
The release note says only that a C++23 compiler is required, while doc/dependencies.md still lists Clang 17.0 and GCC 12.1. GCC 12 fails on static_assert(false) and std::views::zip; Clang 17 fails on CTAD through the util::Unexpected alias. The standard library also matters: Clang 19 with libstdc++ 12, as on Debian Bookworm, still lacks std::views::zip. Update the compiler table to list GCC 13 and Clang 19, specify that Clang with libstdc++ requires libstdc++ 13 or later, and include these versions in the release note.
[minor] · The Cap'n Proto and Clang incompatibility check is skipped in C++23 mode
Affected builds now fail in Cap'n Proto headers instead of receiving the targeted configure error.
Location: CMakeLists.txt:84 (head).
Details and suggested fix
The libmultiprocess subdirectory inherits C++23, but its check for Cap'n Proto 0.9.x or 0.10.x with Clang 16 or later runs only when CMAKE_CXX_STANDARD equals 20. C++23 does not avoid the underlying P2468R2 incompatibility, which applies in C++20 and later (https://github.com/bitcoin-core/libmultiprocess/issues/199). With IPC enabled, affected users, including Clang 19 users with system Cap'n Proto on Debian Bookworm, get an invalid operands to binary expression error in capnp/blob.h instead of the fatal error suggesting an upgrade, GCC, or -DENABLE_IPC=OFF. Change the condition to accept C++20 or later, reword the diagnostic accordingly, and include that upstream change in the subtree.
[minor] · Block import constructs a non-empty span from a nullable lengths pointer
A documented API input that the old loop handled safely now causes undefined behavior; production impact is unconfirmed.
Location: src/kernel/bitcoinkernel.cpp:1345 (head).
Details and suggested fix
btck_chainstate_manager_import_blocks documents block_file_paths_lens as nullable. Previously, a positive count, an all-null path array, and a null lengths pointer did not access the lengths array. The new loop constructs a span from the lengths pointer before checking paths. Constructing a non-empty span from a null pointer violates the constructor's precondition and is undefined behavior. Keep the indexed loop, or change the API contract to require both arrays to be non-null when the count is nonzero. The checked-in C++ wrapper passes matching vectors, and no caller passing a null lengths array with a positive count was identified, so production impact is unconfirmed.
Optional improvements
[suggestion] · Configure does not detect all required C++23 features
Some unsupported compiler and standard-library combinations pass configuration and fail later with less actionable build errors.
Location: CMakeLists.txt:84 (head).
Details and suggested fix
CMAKE_CXX_STANDARD_REQUIRED checks that CMake knows a C++23 flag, while check_cxx_features() probes only CTAD for aggregates. The tree also requires CTAD through an alias template, static_assert(false) in a discarded if constexpr branch, and std::views::zip. Add compile probes for these features to check_cxx_features(), which already reports a fatal error pointing to doc/dependencies.md#compiler. Probing the features would also detect incompatible compiler and standard-library pairings that version checks miss.
[suggestion] · The std::expected alias removes always-on wrong-state access checks
Wrong-state access through *, ->, or error() changes from an abort to undefined behavior in release builds, though no current caller does this.
Location: src/util/expected.h:14 (head).
Details and suggested fix
Previously, error() used Assert, and operator* and operator-> called value(), which throws on the wrong state; because those operators are noexcept, the failure aborted or reached std::terminate. std::expected treats these accesses as preconditions, so violating them is undefined behavior unless standard-library assertions are enabled. Release builds enable neither _GLIBCXX_ASSERTIONS nor a libc++ hardening mode. Current callers checked do not access the wrong state, so this is lost hardening rather than a live bug. If the checks were intended, retain a thin wrapper whose accessors use Assert; otherwise, document that access is now unchecked, as with std::optional.