It seems I have found a limitation with this tool.
I have a large application that loads lots of DLLs (via LoadLibrary). When it shutdown it unloads those DLLs (FreeLibrary). The problem is that some of the memory leaks went through those modules that were unloaded. Bummer. As a result, VLD is unable to decipher the stack frames that went through those modules. For example:
---------- Block 177895 at 0x0000000037D8F970: 3 bytes ---------- Call Stack: e:\app\3dswin\src\util\tstr.cpp (761): CStr::operator= e:\app\3dswin\src\core\actiontable.cpp (55): ActionItemImp::ActionItemImp e:\app\3dswin\src\core\actiontable.cpp (509): ActionTable::BuildActionTable e:\app\3dswin\src\core\actiontable.cpp (532): ActionTable::ActionTable 0x00000000471E283E (File and line number not available): (Function name unavailable) 0x00000000471E30BC (File and line number not available): (Function name unavailable) e:\app\3dswin\src\app\actionman.cpp (1295): ActionManager::LoadActionTables e:\app\3dswin\src\app\app.cpp (2588): App::init e:\app\3dswin\src\app\foo.cpp (1356): WinMain
The problem is in:
VOID CallStack::dump (BOOL showinternalframes) const
Which calls this code:
// Try to get the name of the function containing this program
// counter address.
if (SymFromAddrW(currentprocess, (*this)[frame], &displacement64, functioninfo)) {
functionname = functioninfo->Name;
}
else {
functionname = L"(Function name unavailable)";
}
GetLastError informs me that it cannot find the specified module. I'm taking it that it can't find the module at all (because it's unloaded). The symbols for the module are all right next to their modules. So I'm not having a problem with symbols.
So it seems that doing the symbol resolution after I've unloaded my modules is big problem. Does anyone see any alternatives?
Thanks
Chris Johnson
I have a large application that loads lots of DLLs (via LoadLibrary). When it shutdown it unloads those DLLs (FreeLibrary). The problem is that some of the memory leaks went through those modules that were unloaded. Bummer. As a result, VLD is unable to decipher the stack frames that went through those modules. For example:
---------- Block 177895 at 0x0000000037D8F970: 3 bytes ---------- Call Stack: e:\app\3dswin\src\util\tstr.cpp (761): CStr::operator= e:\app\3dswin\src\core\actiontable.cpp (55): ActionItemImp::ActionItemImp e:\app\3dswin\src\core\actiontable.cpp (509): ActionTable::BuildActionTable e:\app\3dswin\src\core\actiontable.cpp (532): ActionTable::ActionTable 0x00000000471E283E (File and line number not available): (Function name unavailable) 0x00000000471E30BC (File and line number not available): (Function name unavailable) e:\app\3dswin\src\app\actionman.cpp (1295): ActionManager::LoadActionTables e:\app\3dswin\src\app\app.cpp (2588): App::init e:\app\3dswin\src\app\foo.cpp (1356): WinMain
The problem is in:
VOID CallStack::dump (BOOL showinternalframes) const
Which calls this code:
// Try to get the name of the function containing this program
// counter address.
if (SymFromAddrW(currentprocess, (*this)[frame], &displacement64, functioninfo)) {
functionname = functioninfo->Name;
}
else {
functionname = L"(Function name unavailable)";
}
GetLastError informs me that it cannot find the specified module. I'm taking it that it can't find the module at all (because it's unloaded). The symbols for the module are all right next to their modules. So I'm not having a problem with symbols.
So it seems that doing the symbol resolution after I've unloaded my modules is big problem. Does anyone see any alternatives?
Thanks
Chris Johnson