UMDH不提供呼叫堆栈 [英] UMDH not giving call stack

查看:137
本文介绍了UMDH不提供呼叫堆栈的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用UMDH(x64)测试内存泄漏.我的代码既没有经过FPO优化,也没有使用自定义的分配器.它仅使用新"运算符.

I'm using UMDH(x64) to test memory leak. My code is neither FPO optimized nor using customized allocators. It uses just "new" operator.

在Gflags(x64)中为要测试的图像启用了创建用户模式堆栈跟踪数据库".

"Create User Mode stack trace Database" is enabled in the Gflags(x64) for the image that's being tested.

在非泄漏和泄漏情况下,我都使用UMDH跟踪了我的应用程序,并获得了两种情况下的日志.

I have tracked my application using UMDH both in non-leaky case and leaky case and obtained the logs in both the cases.

并将日志与UMDH进行比较.从顶部的注释行可以明显看出,它选择了正确的pdb.

And compared the logs with UMDH. It has picked the right pdb as evident from its comment lines in the top.

问题:

调用堆栈未显示我的代码堆栈.它只是跟踪通用的Windows函数名称.我已经尝试过在x64中使用调试版本和发行版本. 我想念什么吗?

The call stack doesn't show my code's stack. It just traces generic windows functions names. I have tried with both debug and release versions in 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.

如果从命令行运行它,请使用

If you run it from command line, use

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

这篇关于UMDH不提供呼叫堆栈的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆