Open hannob opened 5 years ago
Please consider to provide a pull request to address the problem.
I tried to reproduce this with gcc 7 with ubuntu 18.04 and was not able to reproduce this. Nevertheless I thin the issue is cause by the fact, that the TopicManager gets destroyed during the destruction of the NodeHandle in the main-method but the Publishers in global scope try to access the TopicManager during their destruction. Therefore I moved the Publisher in the main-method here. Now pointers are used to access the publishers in other functions. @hannob could you give it a try and check if the asan-issue is still present?
The work that resulted in this issue was supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components (European Union’s Horizon 2020 research and innovation programme under grant agreement no. 732287).
More information: rosin-project.eu.
I'm testing ROS with Address Sanitizer, a C/C++ memory safety check (part of gcc and clang, enabled with with the -fsanitize=address flag).
When running the test suite for topic_tools I get a report of a use after free error. I'm unfamiliar with the code, so I haven't analyzed it in detail. Stack trace from address sanitizer is below: