google / lmctfy

lmctfy is the open source version of Google’s container stack, which provides Linux application containers.
Other
3.41k stars 237 forks source link

Fix memory leak in logging.cc #36

Closed nipun-sehrawat closed 10 years ago

nipun-sehrawat commented 10 years ago

The change in my CL solves the memory leak problem, but introduces a data race in the following function of logging.cc: Mutex InitLogSilencerMutex() { static Mutex m = new Mutex(); // Without C++11, this statement has a data race. return m; }

The memory leak reported by tcmalloc: Leak of 336 bytes in 6 objects allocated from: @ 4c6065 internal::InitLogSilencerCountOnce @ 4c5e8e internal::LogMessage::Finish @ 495523 orion::LmctfyContainerManager::Destroy @ 40fa39 DestroyExisting @ 40f95f TearDown @ 7b46b6 testing::internal::HandleSehExceptionsInMethodIfSupported @ 7b056e testing::internal::HandleExceptionsInMethodIfSupported @ 798ff6 testing::Test::Run @ 799716 testing::TestInfo::Run @ 799d32 testing::TestCase::Run @ 7a03f6 testing::internal::UnitTestImpl::RunAllTests @ 7b53b3 testing::internal::HandleSehExceptionsInMethodIfSupported @ 7b120e testing::int

lmctfy-bot commented 10 years ago

Can one of the admins verify this patch?