Fix stringop-overread compile issues #381
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When compiling ROS2 Rolling on Ubuntu Noble 24.04 using GCC 13.2.0, there are many instances of the following compiler error:
This seems similar to a previously encountered compiler bug in GCC 12
But I do not see any open bug tickets about this issue in either Eigen or GCC. This issue may be entirely harmless; I'm really not sure.
However, every instance seems to occur when an Eigen Fixed-sized object is being assigned to an Eigen Dynamic-sized object. E.g. some code along the lines of:
A vast majority of these assignments occur in unit tests, so fixing those is trivial. I have no concerns about runtime at all:
There are a couple of places in actual library code where I update what type of Eigen object is being created, in
sensor_proc.hpp
andunicycle_2d_ignition.cpp
. Both of those files are in thefuse_models
package. I do not expect a meaningful performance impact from either of these changes.And one instance in
normal_delta_orientation_3d_cost_functor.hpp
in thefuse_constraints
package. That one should probably be classified as a bug. The size is known at compile-time; theEigen::Map
should never have be configured for a dynamic size.Also, the CI build tests are going to fail. There is an API change to the
rclcpp::Waitable
class that is being fixed here: #379