ros2 / rcl_logging

Logging implementations for ROS 2.
Apache License 2.0
22 stars 35 forks source link

Check allocator validity in some rcl_logging functions #116

Closed cottsay closed 9 months ago

cottsay commented 9 months ago

If the allocator is zero-initialized, it may cause a segfault when it is used later in the function. Right now, we're relying on other rcutils_* functions which use the allocator to fail before we attempt to use it directly, but just because the allocator is passed to these functions doesn't always mean that it is used, especially when the program flow can change based on things like environment variables.

cottsay commented 9 months ago
clalancette commented 9 months ago

The one thing I'm going to suggest here is that we run tests --packages-above rcl_logging_interface rcl_logging_spdlog. While my look above suggested that we won't have a problem, I think we should double check via CI before merging.

cottsay commented 9 months ago