Issue metadata
Sign in to add a comment
|
Memory leak in cryptohome |
||||||||||||||||||||||||
Issue descriptionhttps://build.chromium.org/p/chromiumos/builders/amd64-generic-asan/builds/23252 cryptohome-0.0.1-r2444: * ================================================================= cryptohome-0.0.1-r2444: * ==17==ERROR: LeakSanitizer: detected memory leaks cryptohome-0.0.1-r2444: * cryptohome-0.0.1-r2444: * Direct leak of 32 byte(s) in 1 object(s) allocated from: cryptohome-0.0.1-r2444: * #0 0x7f37d5386902 in operator new(unsigned long) ??:0:0 cryptohome-0.0.1-r2444: * #1 0x7f37d6786bfd in cryptohome::SignInHashTree::SignInHashTree(unsigned int, unsigned char, base::FilePath) /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2444/work/cryptohome-0.0.1/platform2/cryptohome/sign_in_hash_tree.cc:28:12 cryptohome-0.0.1-r2444: * #2 0x7f37d6329cec in cryptohome::SignInHashTreeUnitTest_GetAuxiliaryLabelsTest_Test::TestBody() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2444/work/cryptohome-0.0.1/platform2/cryptohome/sign_in_hash_tree_unittest.cc:85:18 cryptohome-0.0.1-r2444: * #3 0x7f37d406c678 in void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2402:10 cryptohome-0.0.1-r2444: * #4 0x7f37d406c678 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2438:0 cryptohome-0.0.1-r2444: * #5 0x7f37d4050cf8 in testing::Test::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2474:5 cryptohome-0.0.1-r2444: * #6 0x7f37d4051ffc in testing::TestInfo::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2656:11 cryptohome-0.0.1-r2444: * #7 0x7f37d4052896 in testing::TestCase::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2774:28 cryptohome-0.0.1-r2444: * #8 0x7f37d405baa6 in testing::internal::UnitTestImpl::RunAllTests() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:4649:43 cryptohome-0.0.1-r2444: * #9 0x7f37d406d3e8 in bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2402:10 cryptohome-0.0.1-r2444: * #10 0x7f37d406d3e8 in bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>(testing::internal::UnitTestImpl*, bool (testing::internal::UnitTestImpl::*)(), char const*) /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:2438:0 cryptohome-0.0.1-r2444: * #11 0x7f37d405b73e in testing::UnitTest::Run() /build/amd64-generic/tmp/portage/dev-cpp/gtest-1.8.0-r1/work/googletest-release-1.8.0/googletest-abi_x86_64.amd64/./src/gtest.cc:4257:10 cryptohome-0.0.1-r2444: * #12 0x7f37d63e55d7 in RUN_ALL_TESTS() /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../usr/include/gtest/gtest.h:2233:46 cryptohome-0.0.1-r2444: * #13 0x7f37d63e55d7 in main /build/amd64-generic/var/cache/portage/chromeos-base/cryptohome/out/Default/../../../../../../../tmp/portage/chromeos-base/cryptohome-0.0.1-r2444/work/cryptohome-0.0.1/platform2/common-mk/testrunner.cc:16:0 cryptohome-0.0.1-r2444: * #14 0x7f37d14e3735 in __libc_start_main /var/tmp/portage/cross-x86_64-cros-linux-gnu/glibc-2.23-r15/work/glibc-2.23/csu/../csu/libc-start.c:289:0 cryptohome-0.0.1-r2444: * #15 0x7f37d52b96b8 in _start ??:0:0
,
Feb 7 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/e3a544c899e46689eef7267c3c1a4929551a3538 commit e3a544c899e46689eef7267c3c1a4929551a3538 Author: Manoj Gupta <manojgupta@google.com> Date: Wed Feb 07 02:19:02 2018 cryptohome: Fix a memory leak. Fix a memory leak reported by asan. Track the memory allocated by new Platform() in a unique_ptr so that it is auto deallocated. BUG= chromium:809566 TEST=USE="asan" FEATURES=test" emerge-amd64-generic cryptohome passed. Change-Id: I3de778c7b93de54bcb7c7853884f055020164e54 Reviewed-on: https://chromium-review.googlesource.com/904802 Commit-Ready: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Eric Caruso <ejcaruso@chromium.org> [modify] https://crrev.com/e3a544c899e46689eef7267c3c1a4929551a3538/cryptohome/sign_in_hash_tree.cc [modify] https://crrev.com/e3a544c899e46689eef7267c3c1a4929551a3538/cryptohome/sign_in_hash_tree.h
,
Feb 7 2018
All asan unit tests passed at https://build.chromium.org/p/chromiumos/builders/amd64-generic-asan/builds/23262
,
Feb 7 2018
,
Mar 15 2018
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by ejcaruso@chromium.org
, Feb 6 2018