Skip to content

Fix a leak and an undefined shift in rclcpp tests - #3459

Merged
skyegalaxy merged 2 commits into
ros2:rollingfrom
mjcarroll:fix-test-utilities-leak
Dec 1, 2026
Merged

skyegalaxy merged 2 commits into
ros2:rollingfrom
mjcarroll:fix-test-utilities-leak

Conversation

@mjcarroll

Copy link
Copy Markdown
Member

Description

Two test problems found with the sanitizers:

  • test_utilities: remove_ros_arguments_rcl_parse_arguments_failed used inject_on_return, so the real rcl_parse_arguments ran, allocated, and then reported an error that remove_ros_arguments does not clean up after. A real parse failure cleans up after itself, so use patch_and_return. LSan leak.
  • test_intra_process_manager: the mock publisher builds its GID by shifting a std::uintptr_t by i * 8 for every byte of the GID, which is up to 184 bits. Shifting by the width or more is undefined behavior (UBSan). Zero the bytes past the end of the pointer.

Is this user-facing behavior change?

No.

Did you use Generative AI?

Yes, Claude Code (Claude Sonnet 5.5) wrote the changes. I reviewed them and ran both tests under ASan and UBSan.

Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
Signed-off-by: Michael Carroll <mjcarroll.oss@gmail.com>
@github-actions

Copy link
Copy Markdown

ABI Compliance Check

✅ Verdict: compatible

Library Verdict Summary
libcomponent_manager.so ✅ compatible No ABI changes detected.
librclcpp.so ✅ compatible No ABI changes detected.
librclcpp_action.so ✅ compatible No ABI changes detected.
librclcpp_lifecycle.so ✅ compatible No ABI changes detected.
✅ libcomponent_manager.so — full abidiff report

Compared:

  • Base: lib-base/libcomponent_manager.so
  • Head: lib-pr/libcomponent_manager.so @ 85232ee
(empty report — no differences printed by abidiff)
✅ librclcpp.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp.so
  • Head: lib-pr/librclcpp.so @ 85232ee
(empty report — no differences printed by abidiff)
✅ librclcpp_action.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_action.so
  • Head: lib-pr/librclcpp_action.so @ 85232ee
(empty report — no differences printed by abidiff)
✅ librclcpp_lifecycle.so — full abidiff report

Compared:

  • Base: lib-base/librclcpp_lifecycle.so
  • Head: lib-pr/librclcpp_lifecycle.so @ 85232ee
(empty report — no differences printed by abidiff)

Updated for commit 85232ee · check run · suppressions: /home/runner/work/_temp/ros2-abi-suppressions.txt

@ahcorde

ahcorde commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Pulls: #3459
Gist: https://gist.githubusercontent.com/ahcorde/c10adee4d66b4fe71e9764738eaf7bc8/raw/28bbb28304504fe30c1dad858709cc704f020550/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp
ROS Distro: rolling
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/21415

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@skyegalaxy
skyegalaxy merged commit c1fd393 into ros2:rolling Dec 1, 2026
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants