DynamoRIO / DynamoRIO/drmemory

Improve leak scan heuristics to handle dbghelp!DiaAllocString

Open
#987 0 comments 0 reactions 0 assignees View on GitHub
Migrated Priority-Medium Type-Feature
Dominant language
C
Stars
2.7k
Forks
290
PR merge metrics
No merged PRs in 30d

Description

_From [rnk@google.com](https://code.google.com/u/rnk@google.com/) on August 24, 2012 13:47:09_

I started doing some local full runs again, now that we've made some memory management changes to support the component build.

Running net_unittests I see this a bunch after the app prints a stack trace:

POSSIBLE LEAK 58 direct bytes 0x019b0148-0x019b0182 + 0 indirect bytes
#0 KERNELBASE.dll!LocalAlloc
#1 dbghelp.dll!DiaAllocString
#2 dbghelp.dll!DiaBSTR::operator=
#3 dbghelp.dll!SrcFileRowImage::set_filename
#4 dbghelp.dll!GetData::getFileInfo
#5 dbghelp.dll!CDiaSession::findFileById
#6 dbghelp.dll!CDiaLineNumber::get_sourceFile
#7 dbghelp.dll!diaGetLineFromAddr
#8 dbghelp.dll!GetLineFromAddr
#9 dbghelp.dll!SymGetLineFromAddrW64
#10 dbghelp.dll!SymGetLineFromAddr64
#11 base.dll!base::debug::`anonymous namespace'::SymbolContext::OutputTraceToStream [d:\src\src\base\debug\stack_trace_win.cc:90]
\#12 base.dll!base::debug::StackTrace::OutputToStream [d:\src\src\base\debug\stack_trace_win.cc:208]
\#13 base.dll!logging::LogMessage::~LogMessage [d:\src\src\base\logging.cc:565]
\#14 net.dll!net::PriorityQueue::Erase [d:\src\src\net\base\priority_queue.h:147]
\#15 net.dll!net::PrioritizedDispatcher::Cancel [d:\src\src\net\base\prioritized_dispatcher.cc:49]
\#16 net::`anonymous namespace'::PrioritizedDispatcherTest_CancelMissing_Test::TestBody [d:\src\src\net\base\prioritized_dispatcher_unittest.cc:342]
#17 testing::internal::HandleExceptionsInMethodIfSupportedtesting::Test,void [d:\src\src\testing\gtest\src\gtest.cc:2126]

I'm betting that DiaAllocString does something interesting, like C++ . It's worth looking at to see if we can improve our reachability scan heuristics. I used dumpbin to disas this func, but the calls aren't symbolized. I need to get this in windbg. Filing now since I'm context switching to something else.

_Original issue: http://code.google.com/p/drmemory/issues/detail?id=987_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.