https://bugs.winehq.org/show_bug.cgi?id=54274
Bug ID: 54274 Summary: NtMapViewOfSection + MEM_IMAGE + BaseAddress broken in multiple ways Product: Wine Version: 7.22 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: novae.harpist06@icloud.com Distribution: ---
Created attachment 73838 --> https://bugs.winehq.org/attachment.cgi?id=73838 Reproducer
See reproducer (attached).
Windows output:
nt_path: ??\C:\Users\user\repro.exe NtOpenFile status: 00000000 NtCreateSection status: 00000000 #1 NtMapViewOfSection status: 40000036 #1 base: 00000BADF00D0000 #1 ImageBase: 00000BADF00D0000 #2 NtMapViewOfSection status: 40000003 #2 base: 00000BADBEEF0000 #2 ImageBase: 00007FF6122E0000
Wine output:
LdrFindEntryForAddress status: 00000000 RtlDosPathNameToNtPathName_U_WithStatus status: 00000000 nt_path: ??\Z:\home\user\repro.exe NtOpenFile status: 00000000 NtCreateSection status: 00000000 #1 NtMapViewOfSection status: 40000003 #1 base: 0000000000B80000 #1 ImageBase: 0000000140000000 #2 NtMapViewOfSection status: 40000003 #2 base: 0000000000C10000 #2 ImageBase: 0000000140000000
In case #1 the base is completely ignored, and the flag telling to relocate is ignored. Win7 returns STATUS_INVALID_ARGUMENT (as it does not support the flag), while Win8+ correctly relocates to the new base. Wine does not return an error status, but also does not relocate.
In case #2 the base is completely ignored. Relocation does not happen, but this is expected. The returned status is correct.
https://bugs.winehq.org/show_bug.cgi?id=54274
novae.harpist06@icloud.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source, testcase