Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mismatched about calling calloc and delete #1996

Closed
iuhilnehc-ynos opened this issue Aug 18, 2022 · 0 comments · Fixed by #1995
Closed

fix mismatched about calling calloc and delete #1996

iuhilnehc-ynos opened this issue Aug 18, 2022 · 0 comments · Fixed by #1995
Assignees

Comments

@iuhilnehc-ynos
Copy link
Collaborator

Bug report

Required Info:

  • Operating System:
    • Ubuntu20.04
  • Installation type:
    • source
  • Version or commit hash:
  • DDS implementation:
    • all
  • Client library (if applicable):
    • rclcpp, rcl

Steps to reproduce issue

$ valgrind ./test_subscription --gtest_filter="TestSubscription.construction_and_destruction"
log

chenlh rclcpp $ valgrind ./test_subscription --gtest_filter="TestSubscription.construction_and_destruction"
==1247480== Memcheck, a memory error detector
==1247480== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==1247480== Using Valgrind-3.15.0 and LibVEX; rerun with -h for copyright info
==1247480== Command: ./test_subscription --gtest_filter=TestSubscription.construction_and_destruction
==1247480== 
Running main() from /home/chenlh/Projects/ROS2/ros2-master/local_install_test/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
Note: Google Test filter = TestSubscription.construction_and_destruction
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from TestSubscription
[ RUN      ] TestSubscription.construction_and_destruction
==1247480== Mismatched free() / delete / delete []
==1247480==    at 0x4840FBF: operator delete(void*) (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1247480==    by 0x250A27: __gnu_cxx::new_allocator<char>::deallocate(char*, unsigned long) (new_allocator.h:128)
==1247480==    by 0x2448C3: std::allocator_traits<std::allocator<char> >::deallocate(std::allocator<char>&, char*, unsigned long) (alloc_traits.h:469)
==1247480==    by 0x28D00F: void rclcpp::allocator::retyped_deallocate<char, std::allocator<char> >(void*, void*) (allocator_common.hpp:50)
==1247480==    by 0x5691113: rcl_subscription_fini (subscription.c:193)
==1247480==    by 0x54081EE: rclcpp::SubscriptionBase::SubscriptionBase(rclcpp::node_interfaces::NodeBaseInterface*, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_subscription_options_s const&, bool)::{lambda(rcl_subscription_s*)#1}::operator()(rcl_subscription_s*) const (subscription_base.cpp:53)
==1247480==    by 0x540BBCB: std::_Sp_counted_deleter<rcl_subscription_s*, rclcpp::SubscriptionBase::SubscriptionBase(rclcpp::node_interfaces::NodeBaseInterface*, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_subscription_options_s const&, bool)::{lambda(rcl_subscription_s*)#1}, std::allocator<void>, (__gnu_cxx::_Lock_policy)2>::_M_dispose() (shared_ptr_base.h:471)
==1247480==    by 0x239377: std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (shared_ptr_base.h:155)
==1247480==    by 0x231196: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (shared_ptr_base.h:730)
==1247480==    by 0x22F38F: std::__shared_ptr<rcl_subscription_s, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (shared_ptr_base.h:1169)
==1247480==    by 0x22F3AF: std::shared_ptr<rcl_subscription_s>::~shared_ptr() (shared_ptr.h:103)
==1247480==    by 0x54090E8: rclcpp::SubscriptionBase::~SubscriptionBase() (subscription_base.cpp:88)
==1247480==  Address 0xca73b40 is 0 bytes inside a block of size 248 alloc'd
==1247480==    at 0x4841D99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==1247480==    by 0x56C809F: __default_zero_allocate (allocator.c:62)
==1247480==    by 0x56907E7: rcl_subscription_init (subscription.c:94)
==1247480==    by 0x540890A: rclcpp::SubscriptionBase::SubscriptionBase(rclcpp::node_interfaces::NodeBaseInterface*, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rcl_subscription_options_s const&, bool) (subscription_base.cpp:67)
==1247480==    by 0x2907DE: rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >::Subscription(rclcpp::node_interfaces::NodeBaseInterface*, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> >, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > >) (subscription.hpp:147)
==1247480==    by 0x28E429: void __gnu_cxx::new_allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >::construct<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >*, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (new_allocator.h:146)
==1247480==    by 0x28B43B: void std::allocator_traits<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > >::construct<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >&, rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >*, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (alloc_traits.h:483)
==1247480==    by 0x28749E: std::_Sp_counted_ptr_inplace<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (shared_ptr_base.h:548)
==1247480==    by 0x282BD1: std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >*&, std::_Sp_alloc_shared_tag<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (shared_ptr_base.h:679)
==1247480==    by 0x27E833: std::__shared_ptr<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(std::_Sp_alloc_shared_tag<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (shared_ptr_base.h:1344)
==1247480==    by 0x27824B: std::shared_ptr<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >::shared_ptr<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(std::_Sp_alloc_shared_tag<std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (shared_ptr.h:359)
==1247480==    by 0x271618: std::shared_ptr<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > std::allocate_shared<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > >, std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > >, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&>(std::allocator<rclcpp::Subscription<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void>, test_msgs::msg::Empty_<std::allocator<void> >, test_msgs::msg::Empty_<std::allocator<void> >, rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > > const&, rclcpp::node_interfaces::NodeBaseInterface*&, rosidl_message_type_support_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, rclcpp::QoS const&, rclcpp::AnySubscriptionCallback<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > const&, rclcpp::SubscriptionOptionsWithAllocator<std::allocator<void> > const&, std::shared_ptr<rclcpp::message_memory_strategy::MessageMemoryStrategy<test_msgs::msg::Empty_<std::allocator<void> >, std::allocator<void> > > const&, std::shared_ptr<rclcpp::topic_statistics::SubscriptionTopicStatistics<test_msgs::msg::Empty_<std::allocator<void> > > > const&) (shared_ptr.h:702)
==1247480== 
[       OK ] TestSubscription.construction_and_destruction (4899 ms)
[----------] 1 test from TestSubscription (4906 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (7427 ms total)
[  PASSED  ] 1 test.
==1247480== 
==1247480== HEAP SUMMARY:
==1247480==     in use at exit: 53,590 bytes in 170 blocks
==1247480==   total heap usage: 22,240 allocs, 22,070 frees, 5,509,800 bytes allocated
==1247480== 
==1247480== LEAK SUMMARY:
==1247480==    definitely lost: 0 bytes in 0 blocks
==1247480==    indirectly lost: 0 bytes in 0 blocks
==1247480==      possibly lost: 0 bytes in 0 blocks
==1247480==    still reachable: 53,590 bytes in 170 blocks
==1247480==         suppressed: 0 bytes in 0 blocks
==1247480== Rerun with --leak-check=full to see details of leaked memory
==1247480== 
==1247480== For lists of detected and suppressed errors, rerun with: -s
==1247480== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 0 from 0)

Expected behavior

valgrind is happy.

Actual behavior

valgrind report mismatched issue, please see the log above.

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 a pull request may close this issue.

1 participant