micro-ROS / rmw_microxrcedds

RMW implementation using Micro XRCE-DDS middleware.
Apache License 2.0
32 stars 25 forks source link

segmentation fault on exit #14

Closed iluetkeb closed 5 years ago

iluetkeb commented 5 years ago

When doing the massif benchmark with examples_rclcpp_minimal_publisher/publisher_lambda, I get a segfault in the benchmarked program at the end:

==32659== 
==32659== Process terminating with default action of signal 11 (SIGSEGV): dumping core
==32659==  Access not within mapped region at address 0x0
==32659==    at 0x5EA6D76: __strcmp_ssse3 (strcmp.S:173)
==32659==    by 0x6336EFD: rmw_shutdown (rmw_microxrcedds.c:634)
==32659==    by 0x516DAE1: rcl_shutdown (init.c:171)
==32659==    by 0x4EADFA8: rclcpp::Context::shutdown(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (context.cpp:141)
==32659==    by 0x4F1CCDC: rclcpp::SignalHandler::deferred_signal_handler() (signal_handler.cpp:246)
==32659==    by 0x585957E: ??? (in /usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.25)
==32659==    by 0x65476DA: start_thread (pthread_create.c:463)
==32659==    by 0x5E5E88E: clone (clone.S:95)
BorjaOuterelo commented 5 years ago

11 solves this issue.

In the same PR, I have added a tests for this issue.