diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-08-16 20:08:34 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-08-16 20:08:34 +0000 |
commit | 833db5481f1f86745979d3ceda580c2d8fdd24a8 (patch) | |
tree | b7aca64ec232f5fd51b5a4c84187b9fb10e8ce7e /winsup/cygwin/fhandler_process.cc | |
parent | 9d3b795b47430b4518e5fafb6fb29a96d4bb8f0c (diff) | |
download | cygnal-833db5481f1f86745979d3ceda580c2d8fdd24a8.tar.gz cygnal-833db5481f1f86745979d3ceda580c2d8fdd24a8.tar.bz2 cygnal-833db5481f1f86745979d3ceda580c2d8fdd24a8.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/fhandler_process.cc')
-rw-r--r-- | winsup/cygwin/fhandler_process.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_process.cc b/winsup/cygwin/fhandler_process.cc index eb36d9d56..36270d1ba 100644 --- a/winsup/cygwin/fhandler_process.cc +++ b/winsup/cygwin/fhandler_process.cc @@ -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); |