You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build with ASAN and run test_server_goal_handle.
In my environment, I got the following error.
$ ./build-asan/rclcpp_action/test_server_goal_handle
Running main() from /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/src/gtest_main.cc
[==========] Running 6 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 6 tests from TestServerGoalHandle
[ RUN ] TestServerGoalHandle.construct_destruct
[ OK ] TestServerGoalHandle.construct_destruct (1 ms)
[ RUN ] TestServerGoalHandle.cancel
[ OK ] TestServerGoalHandle.cancel (0 ms)
[ RUN ] TestServerGoalHandle.abort
[ OK ] TestServerGoalHandle.abort (1 ms)
[ RUN ] TestServerGoalHandle.succeed
[ OK ] TestServerGoalHandle.succeed (0 ms)
[ RUN ] TestServerGoalHandle.execute
[ OK ] TestServerGoalHandle.execute (0 ms)
[ RUN ] TestServerGoalHandle.rcl_action_goal_handle_get_status_error
[ OK ] TestServerGoalHandle.rcl_action_goal_handle_get_status_error (0 ms)
[----------] 6 tests from TestServerGoalHandle (2 ms total)
[----------] Global test environment tear-down
[==========] 6 tests from 1 test suite ran. (2 ms total)
[ PASSED ] 6 tests.
=================================================================
==4185==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 432 byte(s) in 6 object(s) allocated from:
#0 0x7f78696f1bc8 in malloc (/lib/x86_64-linux-gnu/libasan.so.5+0x10dbc8)
#1 0x7f78694a52e6 in __default_allocate /src/ros2_rolling_asan/src/ros2/rcutils/src/allocator.c:37
#2 0x7f78694f5656 in rcl_action_goal_handle_init /src/ros2_rolling_asan/src/ros2/rcl/rcl_action/src/rcl_action/goal_handle.c:59
#3 0x5559f88fe502 in TestServerGoalHandle::SetUp() (/src/ros2_rolling_asan/build-asan/rclcpp_action/test_server_goal_handle+0x36502)
#4 0x5559f89981ab in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2433
#5 0x5559f898820a in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2469
#6 0x5559f892ffcd in testing::Test::Run() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2503
#7 0x5559f8931502 in testing::TestInfo::Run() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2684
#8 0x5559f8932214 in testing::TestSuite::Run() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2816
#9 0x5559f894ea9f in testing::internal::UnitTestImpl::RunAllTests() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:5338
#10 0x5559f899b6cf in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2433
#11 0x5559f898ab43 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:2469
#12 0x5559f894b58f in testing::UnitTest::Run() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/./src/gtest.cc:4925
#13 0x5559f891c236 in RUN_ALL_TESTS() /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/include/gtest/gtest.h:2473
#14 0x5559f891c111 in main /src/ros2_rolling_asan/install-asan/gtest_vendor/src/gtest_vendor/src/gtest_main.cc:45
#15 0x7f78690ad0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2)
SUMMARY: AddressSanitizer: 432 byte(s) leaked in 6 allocation(s).
Expected behavior
No leak.
Actual behavior
See above.
Additional information
By trace #3, it looks that rcl_handle is not finalized by rcl_action_goal_handle_fini.
This looks a purely test code issue.
class TestServerGoalHandle : public ::testing::Test
{
void SetUp()
{
std::shared_ptr<rcl_action_goal_handle_t> rcl_handle =
std::make_shared<rcl_action_goal_handle_t>();
// snip. zero_initialize and init rcl_handle but not fini
}
}
The text was updated successfully, but these errors were encountered:
Bug report
Required Info:
Steps to reproduce issue
Build with ASAN and run
test_server_goal_handle
.In my environment, I got the following error.
Expected behavior
No leak.
Actual behavior
See above.
Additional information
By trace
#3
, it looks that rcl_handle is not finalized byrcl_action_goal_handle_fini
.This looks a purely test code issue.
The text was updated successfully, but these errors were encountered: