Repository navigation
Audit fixes: 3 P1 + P2/P3 + perf + dead-code (full stack) - #9
Conversation
080556a to
85104da
Compare
Review: blocking correctness bug + a systemic test gapThanks for the thorough audit-fix stack -- it builds clean (0 warnings) on jazzy/kilted/rolling and most fixes are well-reasoned. One change must be corrected before merge, plus a process gap worth addressing. Blocking
After the new authoritative re-query (287-298) fails, a true miss does The reference Strongly recommended (not blocking the merge by itself)No tests added across the whole bundle ( Non-blocking, worth a look
Happy to re-review once the |
… input cannot cross extern "C"
…nter aliasing and leaks
…nse cannot find the client
… a NULL-named node
…mes_with_enclaves
…s and guard graph node->data
… race in rmw_wait
…y read-then-write-back
…n-flight round-trip
…is not dropped until the next change
…ad of NULL array elements
…ure_socket_dir in rmw_init
…orrect stale comments
…dle its warn_unused_result (build fix for P2-4)
A client that times out and shuts down before a slow handler responds leaves a true client-gone miss. Returning RMW_RET_ERROR there makes rclcpp throw inside the executor; rmw_cyclonedds returns OK on client GONE for exactly this reason. Drop the response and return OK, with a debug log. Adds a regression test that sends a response with no matching client and asserts RMW_RET_OK.
85104da to
6964ae5
Compare
Full set of fixes from a multi-agent code audit of
rmw_unix_socket_cpp(method + findings inAUDIT_FINAL.md). Each fix was drafted by three independent agents and reconciled by a selector. The complete stack builds cleanly: from-scratchcolcon build --packages-select rmw_unix_socket_cpp→ 0 errors, 0 warnings.This PR is the integration of the whole stack (base
main). The three P1 + two P2 shortlist bugs also have dedicated focused PRs for individual review/CI:serialize()exception boundary — fix(serialization): contain fastcdr/std exceptions in serialize() [P1] #4security_optionsdouble-free — fix(init): deep-copy security_options in rmw_init_options_copy [P1] #6rmw_take_sequencewrite cursor — fix(subscription): write rmw_take_sequence output at the taken cursor [P2] #7rmw_waittimeout overflow — fix(wait): compute rmw_wait timeout in int64 to preserve infinite blocking [P2] #8Additional fixes in this PR (24)
P2
deserialize()catch tostd::exception(oversize-length input can't crossextern "C")discovery_optionsto stop aliasing/leaks (incl. build-fix:rmw_discovery_options_copyneeds a non-const allocator)RMW_CHECK_TYPE_IDENTIFIERS_MATCHon all service/client entry pointsRMW_RET_OK) whenrmw_send_responsecan't find the clientrmw_create_nodeonstrdupfailurestatic_assertthe on-wire/shm layout (regression guard)P3
cleanup_stalereclaim · P3-3 identifier checks (subscription/graph/node) · P3-4 retryepoll_waiton EINTR · P3-6 atomiclast_registry_generation· P3-8 null-check guard condition · P3-9 single eventfd read per wait · P3-11 skip a corrupt request/response datagram · P3-12 pre-scan generation cache · P3-13 graphstrdupchecks · P3-15 init identifier/double-init guards · P3-17 guardnode->contextin destroy paths · P3-18size_tserialize length · P3-23 append QoS-incompatibility reasonsperf / cleanup
RMW_GID_STORAGE_SIZEDeferred (need a build-iteration loop or a design decision — not in this PR)
PERF-1/2/3/4/5/6/8,
rcpputilsdependency removal, write-only struct fields / dead generation block, the decision-required findings (TRANSIENT_LOCAL wait-path replay, service/client queue-cap policy,serialization_formatstring,is_shutdownenforcement, …), and the missing-test additions (P2-15..18).