[PATCH] dbghelp: Only check process architecture if we are actually given a process.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45407 Signed-off-by: Zebediah Figura <z.figura12(a)gmail.com> --- dlls/dbghelp/dbghelp.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index a085cd140e..92ef86f24c 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -308,16 +308,10 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP return TRUE; } - IsWow64Process(GetCurrentProcess(), &wow64); - - if (!IsWow64Process(hProcess, &child_wow64)) - return FALSE; - pcs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pcs)); if (!pcs) return FALSE; pcs->handle = hProcess; - pcs->is_64bit = (sizeof(void *) == 8 || wow64) && !child_wow64; if (UserSearchPath) { @@ -361,6 +355,14 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP if (check_live_target(pcs)) { + IsWow64Process(GetCurrentProcess(), &wow64); + if (!IsWow64Process(pcs->handle, &child_wow64)) + { + SymCleanup(pcs->handle); + return FALSE; + } + pcs->is_64bit = (sizeof(void *) == 8 || wow64) && !child_wow64; + if (fInvadeProcess) EnumerateLoadedModulesW64(hProcess, process_invade_cb, hProcess); elf_synchronize_module_list(pcs); -- 2.14.1
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44598 Your paranoid android. === debian9 (64 bit WoW report) === dbghelp: dbghelp.c:89: Test failed: StackWalk64() failed: 487 dbghelp.c:96: Test failed: got bad return address 0 dbghelp.c:124: Test failed: didn't find stack_walk_thread frame
participants (2)
-
Marvin -
Zebediah Figura