* dlfcn.cc (dlopen): Reimplement RTLD_NODELETE for Windows 2000 using
internal datastructures. Explain the code. * ntdll.h (struct _LDR_DATA_TABLE_ENTRY): Define. (struct _PEB_LDR_DATA): Define. (struct _PEB): Change PVOID LoaderData to PPEB_LDR_DATA Ldr. * fhandler_process.cc (format_process_maps): Call NtQueryVirtualMemory with valid return length pointer. Explain why.
This commit is contained in:
@ -960,12 +960,16 @@ format_process_maps (void *data, char *&destbuf)
|
||||
// if a new allocation, figure out what kind it is
|
||||
if (newbase && !last_pass && mb.State != MEM_FREE)
|
||||
{
|
||||
/* If the return length pointer is missing, NtQueryVirtualMemory
|
||||
returns with STATUS_ACCESS_VIOLATION on Windows 2000. */
|
||||
ULONG ret_len = 0;
|
||||
|
||||
st.st_dev = 0;
|
||||
st.st_ino = 0;
|
||||
if ((mb.Type & (MEM_MAPPED | MEM_IMAGE))
|
||||
&& NT_SUCCESS (NtQueryVirtualMemory (proc, cur.abase,
|
||||
&& NT_SUCCESS (status = NtQueryVirtualMemory (proc, cur.abase,
|
||||
MemorySectionName,
|
||||
msi, 65536, NULL)))
|
||||
msi, 65536, &ret_len)))
|
||||
{
|
||||
PWCHAR dosname =
|
||||
drive_maps.fixup_if_match (msi->SectionFileName.Buffer);
|
||||
|
Reference in New Issue
Block a user