!heap -x -v和!heap -flt s之间存在矛盾 [英] contradiction between !heap -x -v and !heap -flt s
问题描述
我正在分析一个显示奇怪的转储:!heap -x -v hexadecimal_address
和!heap -flt s size_of_block
I'm analyzing a dump which shows something strange: there seem to be a contradiciton between the command !heap -x -v hexadecimal_address
and !heap -flt s size_of_block
我正在询问悬空指针. 在此转储中,该悬挂指针恰好是:0x0bdd00c0
I'm inquiring about dangling pointers. In this dump, this dangling pointer happened to be: 0x0bdd00c0
要检索有关堆内存块的信息,请使用!heap -x -v 0bdd00c0
返回
To retrieve info about the heap memory block I use !heap -x -v 0bdd00c0
which returns
Entry User Heap Segment Size PrevSize Unused Flags
-----------------------------------------------------------------------------
0bdd00b8 0bdd00c0 003b0000 0bc00000 98 20 8 busy
在这种情况下,这表明:
Which shows namely that in this case:
- 内存块处于
busy
模式(大多数情况下,我的其他转储中的内存在这里都是空闲的) - 内存块大了
0x98
个字节 - 内存块是在堆
003b0000
中管理的.
- the memory block is in
busy
mode (most of the time in my other dumps the memory is free here) - the memory block is
0x98
bytes big - the memory block is managed inside the heap
003b0000
.
什么让我感到困惑:
当我启动!heap -flt s 98
时(只是想观察具有相同大小的其他对象)
我得到的结果不显示我调查的指针0bdd00c0
When I launch !heap -flt s 98
(just wanting to observe other objects that would have the same size)
I get this result which doesn't display the pointer 0bdd00c0 of my investigation
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
_HEAP @ 3b0000
14b24fa8 0014 0014 [01] 14b24fb0 00098 - (busy)
0bc645a8 0014 0014 [01] 0bc645b0 00098 - (busy)
0bc66398 0014 0014 [01] 0bc663a0 00098 - (busy)
0bcbedf8 0014 0014 [01] 0bcbee00 00098 - (busy)
0bce2cc8 0014 0014 [01] 0bce2cd0 00098 - (busy)
0bceff88 0014 0014 [00] 0bceff90 00098 - (free)
0bdf2f78 0014 0014 [01] 0bdf2f80 00098 - (busy)
0be28c50 0014 0014 [01] 0be28c58 00098 - (busy)
0be57470 0014 0014 [00] 0be57478 00098 - (free)
0beed050 0014 0014 [01] 0beed058 00098 - (busy)
0bf1aaf0 0014 0014 [00] 0bf1aaf8 00098 - (free)
0bf214c0 0014 0014 [00] 0bf214c8 00098 - (free)
0bf99bf0 0014 0014 [00] 0bf99bf8 00098 - (free)
(我只给了您3b0000堆相关的摘录)
所以我得出的结论是似乎存在矛盾.
So I came to the conclusion that there seem to be a contradiction.
我在做/假设有什么问题吗?我该怎么做才能了解问题所在?
Am I doing/assuming something wrong ? What could I do to understand what's wrong ?
推荐答案
您忽略了8个未使用的字节,请尝试
You have overlooked the 8 unused bytes, try
!heap -flt s 90
来自我的测试"编
0:000> !heap -x -v 0x003dc710
Entry User Heap Segment Size PrevSize Unused Flags
-----------------------------------------------------------------------------
003dc708 003dc710 003d0000 003d0000 1310 40 d busy
0:000> ? 1310-d
Evaluate expression: 4867 = 00001303
0:000> !heap -flt s 1303
_HEAP @ 3d0000
HEAP_ENTRY Size Prev Flags UserPtr UserSize - state
003dc708 0262 0000 [00] 003dc710 01303 - (busy)
此处分配的更多详细信息:
More detail of the allocation here:
0:000> !heap -i 3d0000
Heap context set to the heap 0x003d0000
0:000> !heap -i 003dc708
Detailed information for block entry 003dc708
Assumed heap : 0x003d0000 (Use !heap -i NewHeapHandle to change)
Header content : 0x6334FAFC 0x0D00FD4A (decoded : 0x61010262 0x0D000008)
Owning segment : 0x003d0000 (offset 0)
Block flags : 0x1 (busy )
Total block size : 0x262 units (0x1310 bytes)
Requested size : 0x1303 bytes (unused 0xd bytes)
Previous block size: 0x8 units (0x40 bytes)
Block CRC : OK - 0x61
Previous block : 0x003dc6c8
Next block : 0x003dda18
这篇关于!heap -x -v和!heap -flt s之间存在矛盾的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!