张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
C/C++本地代码调试
张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
single
2013-09-29, 23:24 下午
WIN8环境下,首先我使用
1 gflags /i test.exe +ust
2 用WINDBG启动test。exe 运行后输出
: {104} client block at 0x01418238, subtype 0, 1111 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
显示内存泄露,然后用命令
0:000> !heap -p -a 0x01418238
address 01418238 found in
_HEAP @ 1410000
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
01418210 0093 0000 [00] 01418218 0047b - (busy)
请教下为什么就是打印不出调用栈的?
TEST.EXE 和 windbg 都是X86的
谢谢
0:000> g
Detected memory leaks!
Dumping objects ->
c:\users\aaa\desktop\consoleapplication1\consoleapplication1.cpp(19) : {104} client block at 0x01418238, subtype 0, 1111 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
eax=00000000 ebx=77bac0c0 ecx=00000002 edx=00000000 esi=00000000 edi=00000000
eip=77b01028 esp=00f7f9a4 ebp=00f7f9bc iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000202
ntdll!ZwTerminateProcess+0xc:
77b01028 c20800 ret 8
0:000> !heap -p -a 0x01418238
address 01418238 found in
_HEAP @ 1410000
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
01418210 0093 0000 [00] 01418218 0047b - (busy)
Re: 张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
格蠹老雷
2013-09-30, 09:21 上午
!heap -a -v
-k
02da0000
Re: 张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
single
2013-09-30, 13:57 下午
谢谢您,我试了下 还是没有显示
0:000> g
Detected memory leaks!
Dumping objects ->
{266} normal block at 0x008198A8, 112 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
0:000> !heap -a -v -k 0x008198A8
Index Address Name Debugging options enabled
0:000> !heap -p -a 0x008198A8
address 008198a8 found in
_HEAP @ 800000
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
00819880 0016 0000 [00] 00819888 00094 - (busy)
0:000> !heap -a -v -k 00819880
Index Address Name Debugging options enabled
Re: 张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
格蠹老雷
2013-09-30, 22:58 下午
!heap -a -v -k
00819880
800000
最后一个参数应该是堆的句柄(起始地址)
Re: 张老师,想问下关于WIN8 下!heap 检查内存泄露不显示调用栈问题,谢谢您
single
2013-10-07, 20:03 下午
好的,谢谢您