简体   繁体   English

UMDH不提供呼叫堆栈

[英]UMDH not giving call stack

I'm using UMDH(x64) to test memory leak. 我正在使用UMDH(x64)测试内存泄漏。 My code is neither FPO optimized nor using customized allocators. 我的代码既没有经过FPO优化,也没有使用自定义的分配器。 It uses just "new" operator. 它仅使用“新”运算符。

"Create User Mode stack trace Database" is enabled in the Gflags(x64) for the image that's being tested. 在Gflags(x64)中为要测试的图像启用了“创建用户模式堆栈跟踪数据库”。

I have tracked my application using UMDH both in non-leaky case and leaky case and obtained the logs in both the cases. 在非泄漏情况和泄漏情况下,我都使用UMDH跟踪了我的应用程序,并获得了两种情况下的日志。

And compared the logs with UMDH. 并将日志与UMDH进行比较。 It has picked the right pdb as evident from its comment lines in the top. 从顶部的注释行可以明显看出,它选择了正确的pdb。

Problem: 问题:

The call stack doesn't show my code's stack. 调用堆栈不显示我的代码堆栈。 It just traces generic windows functions names. 它只是跟踪通用的Windows函数名称。 I have tried with both debug and release versions in x64. 我曾尝试使用x64中的调试和发行版本。 Am I missing something? 我想念什么吗?

The code and diff trace obtained are below: 获得的代码和差异跟踪如下:

// code:
#include <iostream>
using namespace std;

void myFunc()
{
   int k;
   cin >> k;
   int* ii = new int[1998];

   if (k == 0) delete[] ii;
}

int main()
{
   myFunc();
   return 0;
}


// stack trace obtained:
+     390 (   390 -     0)      1 allocs    BackTraceAC905E8D
+       1 (     1 -     0)  BackTraceAC905E8D   allocations

ntdll!RtlpCallInterceptRoutine+0000003F
ntdll!RtlpAllocateHeapInternal+0000069F
ntdll!TppWorkerThread+00000ADB
KERNEL32!BaseThreadInitThunk+00000022
ntdll!RtlUserThreadStart+00000034
.....
.....
...

As described in Using UMDH to Find a User-Mode Memory Leak (MSDN) , you need to define the environment variable _NT_SYMBOL_PATH before using UMDH. 使用UMDH查找用户模式内存泄漏(MSDN)中所述 ,需要在使用UMDH之前定义环境变量_NT_SYMBOL_PATH

If you run it from command line, use 如果从命令行运行,请使用

set _NT_SYMBOL_PATH=c:\mysymbols;srv*c:\mycache*https://msdl.microsoft.com/download/symbols 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM