Project

General

Profile

Bug #18250

Memory leak in ceph_test_rados_api_list

Added by Brad Hubbard 8 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
librados
Target version:
-
Start date:
12/14/2016
Due date:
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Release:
Needs Doc:
No

Description

Valgrind reports the following leak in ceph_test_rados_api_list

27742 1,408 bytes in 11 blocks are definitely lost in loss record 78 of 79
27742 at 0x98641FC: operator new(unsigned long) (vg_replace_malloc.c:334)
27742 by 0x2FD022: rados_object_list_end (librados.cc:4082)
27742 by 0x2E91D7: LibRadosList_EnumerateObjects_Test::TestBody() (list.cc:695)
27742 by 0x3852C3: HandleSehExceptionsInMethodIfSupported<testing::Test, void> (gtest.cc:2402)
27742 by 0x3852C3: void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) (gtest.cc:2438)
27742 by 0x37C289: testing::Test::Run() (gtest.cc:2475)
27742 by 0x37C3D7: testing::TestInfo::Run() (gtest.cc:2656)
27742 by 0x37C4B4: testing::TestCase::Run() (gtest.cc:2774)
27742 by 0x37C796: testing::internal::UnitTestImpl::RunAllTests() (gtest.cc:4649)
27742 by 0x385773: HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool> (gtest.cc:2402)
27742 by 0x385773: bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) (gtest.cc:2438)
27742 by 0x37CAB3: testing::UnitTest::Run() (gtest.cc:4257)
27742 by 0x2D1DA8: RUN_ALL_TESTS (gtest.h:2233)
27742 by 0x2D1DA8: main (unit.cc:51)

It's the use of the temporary returned from rados_object_list_end here.

691 while(!rados_object_list_is_end(ioctx, c))
692 {
693 rados_object_list_item results12;
694 memset(results, 0, sizeof(rados_object_list_item) * 12);
695 int r = rados_object_list(ioctx,
696 c, rados_object_list_end(ioctx), <------HERE
697 12, NULL, 0, results, &c);
698 ASSERT_GE(r, 0);

History

#2 Updated by Brad Hubbard 8 months ago

  • Status changed from In Progress to Resolved

Also available in: Atom PDF