Open tylerjw opened 2 years ago
How difficult would it be to add a CI job to rclcpp that runs with ASAN? It would be really nice if users of ROS could use ASAN in their projects.
I would love to add an ASAN job. It wouldn't be too hard to do; it basically requires some changes to the scripts on https://github.com/ros2/ci .
However, we would also need to have someone commit to the initial work of fixing the problems, and then maintaining that job going forward (at least for some period of time). If it is continually failing, it won't provide any value and will just impose costs on the rest of the infrastructure.
we would also need to have someone commit to the initial work of fixing the problems
I don't think I realistically have the time to fix all the ASAN failures in ROS (even though I would love that task), but maybe slowly I can help. I submitted this PR to class_loader to fix the memory lifetime bugs in it and add a GitHub action CI job that tests with ASAN: https://github.com/ros/class_loader/pull/199
It seems that there is already a PR directed towards this bug (or something related). I would appreciate reviews of the class_loader PR by anyone who also wants to see ASAN in the tests and by anyone who has the historical context of why certain decisions were made in class_laoder.
Bug report
Required Info:
Steps to reproduce issue
Here is a minimal project I created with this one source file to demonstrate this problem:
https://github.com/tylerjw/ros2_sanitize Here is a CI run with the failures: https://github.com/tylerjw/ros2_sanitize/actions/runs/2450708458
Expected behavior
No ASAN errors when creating a rclcpp::Node
Actual behavior
ASAN errors. Here is a copy of the CI output from ASAN from rolling-main:
Additional Information
I originally reported this issue here: https://github.com/ros2/rcutils/issues/365 And I was told it is possibly related to this issue: https://github.com/ros2/rclcpp/pull/1324
Additional Requests
How difficult would it be to add a CI job to rclcpp that runs with ASAN? It would be really nice if users of ROS could use ASAN in their projects.