rclcpp icon indicating copy to clipboard operation
rclcpp copied to clipboard

Make get_rcl_allocator a function family (try 2)

Open tylerjw opened this issue 3 years ago • 6 comments

This is a rebase of

  • https://github.com/ros2/rclcpp/pull/1324

I don't understand this code but would really like to be able to use asan in my tests.

If someone could explain this it might be helpful. My best guess from reading the other PR is that C++ allocators just don't work for some reason (or this implementation of them does not) and instead we are using some struct from rcl anyway.

tylerjw avatar Nov 12 '22 17:11 tylerjw

@clalancette could you review this and let me know if this was what you were expecting in a rebase of this? Do you understand why we have custom allocators? This seems like really error-prone code to be writing without sanitizers in CI.

tylerjw avatar Nov 12 '22 17:11 tylerjw

Thanks for reviving this pr, but I was recently investigating the efficacy of the original pr and I think it actually has a bug in it too (doesn't correctly solve the issue). I've been working on a branch that may address this correctly in some work related to space-ros, but I haven't gotten to testing it properly. I hope to open that pr after the Thanksgiving break.

wjwwood avatar Nov 22 '22 21:11 wjwwood

@wjwwood have you had a chance to post your work somewhere?

tylerjw avatar Jan 11 '23 12:01 tylerjw

Any news on this? @wjwwood

roncapat avatar Nov 28 '23 15:11 roncapat

I know that pings on PRs can be quite annoying, but I'd also love to see this fixed! @wjwwood could you maybe explain what the issue with the original code would be? It seems to be fairly straightforward in using the default rcl allocator. Is there a problem with that?

haudren-woven avatar Jan 23 '24 06:01 haudren-woven

We currently have to maintain a branch with these fixed to allow using asan with rclcpp. These fixes work for us. @wjwwood, sorry again for a ping on this, but what are the issues you are seeing? Is there something we could attempt to fix to allow a merge here?

Pleune avatar Jun 04 '24 19:06 Pleune