Skip to content

fix: Use default rcl allocator if allocator is std::allocator#3069

Merged
ahcorde merged 1 commit intoros2:jazzyfrom
cellumation:alloc_fix
Feb 18, 2026
Merged

fix: Use default rcl allocator if allocator is std::allocator#3069
ahcorde merged 1 commit intoros2:jazzyfrom
cellumation:alloc_fix

Conversation

@jmachowinski
Copy link
Collaborator

This fixes a bunch of warnings if using ASAN / valgrind on newer OS versions. It also fixed a real bug, as giving the wrong size on deallocate is undefined behavior according to the C++ standard.

This version of the patch keeps the behavior for users that specified an own allocator the same and in therefore back portable.

Backport of #3058

@jmachowinski
Copy link
Collaborator Author

Pulls: #3069
Gist: https://gist.githubusercontent.com/jmachowinski/e1a11affc55cc964dd3b14cd06ae4a96/raw/82d3acb2e6763c734735fbb7e549865860b89dde/ros2.repos
BUILD args:
TEST args:
ROS Distro: jazzy
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/18221

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

This fixes a bunch of warnings if using ASAN / valgrind on newer
OS versions. It also fixed a real bug, as giving the wrong size
on deallocate is undefined behavior according to the C++ standard.

This version of the patch keeps the behavior for users that
specified an own allocator the same and in therefore back portable.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Copy link
Collaborator

@fujitatomoya fujitatomoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with green CI.

@ahcorde ahcorde merged commit dc4a1db into ros2:jazzy Feb 18, 2026
3 checks passed
@jmachowinski
Copy link
Collaborator Author

https://github.com/Mergifyio backport kilted

@mergify
Copy link
Contributor

mergify bot commented Feb 18, 2026

backport kilted

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Feb 18, 2026
This fixes a bunch of warnings if using ASAN / valgrind on newer
OS versions. It also fixed a real bug, as giving the wrong size
on deallocate is undefined behavior according to the C++ standard.

This version of the patch keeps the behavior for users that
specified an own allocator the same and in therefore back portable.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <j.machowinski@cellumation.com>
(cherry picked from commit dc4a1db)
@jmachowinski
Copy link
Collaborator Author

https://github.com/Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Feb 18, 2026

backport humble

✅ Backports have been created

Details

mergify bot pushed a commit that referenced this pull request Feb 18, 2026
This fixes a bunch of warnings if using ASAN / valgrind on newer
OS versions. It also fixed a real bug, as giving the wrong size
on deallocate is undefined behavior according to the C++ standard.

This version of the patch keeps the behavior for users that
specified an own allocator the same and in therefore back portable.

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <j.machowinski@cellumation.com>
(cherry picked from commit dc4a1db)
jmachowinski added a commit that referenced this pull request Feb 18, 2026
…#3071)

This fixes a bunch of warnings if using ASAN / valgrind on newer
OS versions. It also fixed a real bug, as giving the wrong size
on deallocate is undefined behavior according to the C++ standard.

This version of the patch keeps the behavior for users that
specified an own allocator the same and in therefore back portable.



(cherry picked from commit dc4a1db)

Signed-off-by: Janosch Machowinski <J.Machowinski@cellumation.com>
Co-authored-by: Janosch Machowinski <jmachowinski@users.noreply.github.com>
Co-authored-by: Janosch Machowinski <j.machowinski@cellumation.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments