bucket-A4 fast-follow: Packet prefix-cap boundary tests (SAFE-COSMETIC)#53
Merged
Conversation
Add packet_test.cpp covering MAX_PREFIX_LENGTH (16) boundary behaviour of the Packet read-constructor (Bug-9 hardening): zero/under/at-cap sizes succeed, over-cap throws std::ios_base::failure, and UAF max-size garbage is rejected without crashing. Wire packet_test.cpp into core_test and fix the pre-existing static-link order bug that left core_test (and the bucket of test/ binaries) RED: libltc_coin.a, pulled in transitively, references core::timestamp() after core has already been processed by ld, leaving it undefined. Linking c2pool_merged_mining after core re-injects core via merged_mining PUBLIC dependency, resolving the late reference. CMake-only, runtime-behaviour preserving. ctest core_test: 32/32 pass.
Owner
Author
|
Comment-thread-as-review — dash-consensus-pay-replay: APPROVE Independently verified on Linux x86_64 (conan-release), built from this branch (
Non-blocking nit (follow-up, do not gate merge): Verdict: approve — clear for integrator to request operator push-approval. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bucket-A4 fast-follow — Packet prefix-cap boundary tests
Adds
src/core/test/packet_test.cpp: aPacketPrefixCapGTest suite covering theMAX_PREFIX_LENGTH(16) boundary of thePacketread-constructor hardened in #50 (Bug-9 / UAF-on-m_nodedefense). Six cases: zero-length, just-under-cap, at-cap succeed; just-over-cap, way-over-cap, and UAF garbagesize_tall throwstd::ios_base::failurewithout crashing.Wires
packet_test.cppintocore_testand corrects the pre-existing static-link order socore_testlinks:libltc_coin.ais pulled in transitively and referencescore::timestamp()afterldhas already processedcore, leaving it undefined; linkingc2pool_merged_miningaftercorere-injectscorevia the merged_mining PUBLIC dependency, resolving the late reference. CMake-only, runtime-behaviour preserving.Scope / verification
core_test32/32 GREEN — includes all 6PacketPrefixCapcap-boundary tests (verified on this branch, Linux x86_64,conan-release).coreandltc_coin/pool— a single-passldcannot satisfy the cycle (empirically confirmed; reorder alone is insufficient).ci-steward/cmake-link-group-rescan(LINK_GROUP:RESCAN, CMake 4.2.3) — commit5edeb308, in flight.Label
SAFE-COSMETIC — new
packet_test.cpp+ mechanical link-line edit insrc/core/test/CMakeLists.txt. No change to packet-handling behaviour.cc dash-consensus-pay-replay — comment-thread-as-review; your substantive verdict gates merge. Merge by integrator on operator
push approved.