Disable fetching heap info on 64 bit XP/2003

* fhandler_process.cc (heap_info::heap_info): Disable fetching heap info
        on 64 bit XP/2003.  Explain why.
        * wincap.h (wincaps::has_broken_rtl_query_process_debug_information):
        New element.
        * wincap.cc: Implement above element throughout.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2015-07-05 12:51:52 +02:00
parent f0464fbf9d
commit e426213a88
5 changed files with 27 additions and 1 deletions

View File

@ -592,7 +592,11 @@ struct heap_info
NTSTATUS status;
PDEBUG_HEAP_ARRAY harray;
buf = RtlCreateQueryDebugBuffer (0, FALSE);
/* FIXME? RtlQueryProcessDebugInformation/CreateToolhelp32Snapshot both
crash the target process on 64 bit XP/2003 in native 64 bit mode. */
if (wincap.has_broken_rtl_query_process_debug_information ())
return;
buf = RtlCreateQueryDebugBuffer (16 * 65536, FALSE);
if (!buf)
return;
status = RtlQueryProcessDebugInformation (pid, PDI_HEAPS | PDI_HEAP_BLOCKS,