Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Jan 12, 2026

Description

node_name, node_namespace and topic_type may be nullptr. This will result in initializing a std::string with nullptr, which will cause an exception during construction. This issue is mentioned here ros2/rosbag2#2293.

explicit TopicEndpointInfo(const rcl_topic_endpoint_info_t & info)
: node_name_(info.node_name),
node_namespace_(info.node_namespace),
topic_type_(info.topic_type),

Is this user-facing behavior change?

No

Did you use Generative AI?

No

Additional Information

N/A


This is an automatic backport of pull request #3013 done by [Mergify](https://mergify.com).

* Improve the robustness of the TopicEndpointInfo constructor

Signed-off-by: Barry Xu <barry.xu@sony.com>

* Improve TopicEndpointInfo constructor to validate input parameters

Signed-off-by: Barry Xu <barry.xu@sony.com>

---------

Signed-off-by: Barry Xu <barry.xu@sony.com>
(cherry picked from commit 7f783cb)

# Conflicts:
#	rclcpp/include/rclcpp/node_interfaces/node_graph_interface.hpp
@mergify mergify bot added the conflicts label Jan 12, 2026
@mergify
Copy link
Contributor Author

mergify bot commented Jan 12, 2026

Cherry-pick of 7f783cb has failed:

On branch mergify/bp/humble/pr-3013
Your branch is up to date with 'origin/humble'.

You are currently cherry-picking commit 7f783cb.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   rclcpp/include/rclcpp/node_interfaces/node_graph_interface.hpp

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

Signed-off-by: Alejandro Hernandez Cordero <ahcorde@gmail.com>
@ahcorde
Copy link
Contributor

ahcorde commented Jan 12, 2026

Pulls: #3016
Gist: https://gist.githubusercontent.com/ahcorde/572dc03a7ca5bb3d634930cc5fa36c70/raw/66c646e17e369b802ae2a78f68579c24afcb1ea9/ros2.repos
BUILD args: --packages-above-and-dependencies rclcpp
TEST args: --packages-above rclcpp
ROS Distro: humble
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17914

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

@Barry-Xu-2018
Copy link
Collaborator

  • Linux-rhel
    • The failed tests are not related to this PR.

@ahcorde ahcorde merged commit 66dbc78 into humble Jan 13, 2026
3 checks passed
@ahcorde ahcorde deleted the mergify/bp/humble/pr-3013 branch January 13, 2026 11:34
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.

5 participants