https://bugs.winehq.org/show_bug.cgi?id=47242
Bug ID: 47242 Summary: ReactOS installer can't find file because NtQueryInformationProcess doesn't handle ProcessImageFileName properly Product: Wine Version: 4.8 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: dark.shadow4@web.de Distribution: ---
Created attachment 64527 --> https://bugs.winehq.org/attachment.cgi?id=64527 Test program
As in the title. Also attaching a small test program to reproduce the issue.
https://bugs.winehq.org/show_bug.cgi?id=47242
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://jira.reactos.org/br | |owse/CORE-16043 Keywords| |source
https://bugs.winehq.org/show_bug.cgi?id=47242
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, Installer URL| |https://web.archive.org/web | |/20190102014839/https://iso | |.reactos.org/bootcd/reactos | |-bootcd-0.4.11-dev-603-g4bf | |9f6f-x86-msvc-win-dbg.7z Summary|ReactOS installer can't |ReactOS 0.4.11-dev-603+ |find file because |installer can't find file |NtQueryInformationProcess |because |doesn't handle |NtQueryInformationProcess |ProcessImageFileName |doesn't handle |properly |ProcessImageFileName | |properly CC| |focht@gmx.net
--- Comment #1 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
I've added a download link for the installer ISO:
https://web.archive.org/web/20190102014839/https://iso.reactos.org/bootcd/re...
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/process.c#l536
--- snip --- 193 /****************************************************************************** 194 * NtQueryInformationProcess [NTDLL.@] 195 * ZwQueryInformationProcess [NTDLL.@] 196 * 197 */ 198 NTSTATUS WINAPI NtQueryInformationProcess( 199 IN HANDLE ProcessHandle, 200 IN PROCESSINFOCLASS ProcessInformationClass, 201 OUT PVOID ProcessInformation, 202 IN ULONG ProcessInformationLength, 203 OUT PULONG ReturnLength) 204 { 205 NTSTATUS ret = STATUS_SUCCESS; 206 ULONG len = 0; 207 208 TRACE("(%p,0x%08x,%p,0x%08x,%p)\n", 209 ProcessHandle,ProcessInformationClass, 210 ProcessInformation,ProcessInformationLength, 211 ReturnLength); 212 213 switch (ProcessInformationClass) 214 { ... 536 case ProcessImageFileName: 537 /* FIXME: Should return a device path */ 538 case ProcessImageFileNameWin32: 539 SERVER_START_REQ(get_dll_info) 540 { 541 UNICODE_STRING *image_file_name_str = ProcessInformation; 542 543 req->handle = wine_server_obj_handle( ProcessHandle ); 544 req->base_address = 0; /* main module */ 545 wine_server_set_reply( req, image_file_name_str ? image_file_name_str + 1 : NULL, 546 ProcessInformationLength > sizeof(UNICODE_STRING) ? ProcessInformationLength - sizeof(UNICODE_STRING) : 0 ); 547 ret = wine_server_call( req ); 548 if (ret == STATUS_BUFFER_TOO_SMALL) ret = STATUS_INFO_LENGTH_MISMATCH; 549 550 len = sizeof(UNICODE_STRING) + reply->filename_len; 551 if (ret == STATUS_SUCCESS) 552 { 553 image_file_name_str->MaximumLength = image_file_name_str->Length = reply->filename_len; 554 image_file_name_str->Buffer = (PWSTR)(image_file_name_str + 1); 555 } 556 } 557 SERVER_END_REQ; 558 break; --- snip --
$ sha1sum reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.* bcb4c544c61ddf899ccd0266cdc8f40cc8dfa96d reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.7z bc0293827c84f6402cbcb39c1628f38ff16ef651 reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.iso
$ du -sh reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.* 55M reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.7z 73M reactos-bootcd-0.4.11-dev-603-g4bf9f6f-x86-msvc-win-dbg.iso
$ wine --version wine-4.8-296-g6a610a3258
Regards
https://bugs.winehq.org/show_bug.cgi?id=47242
--- Comment #2 from Anastasius Focht focht@gmx.net --- Hello folks,
I've created bug 47246 to track 'ntdll.DbgPrint' not supporting unicode format string '%wZ' (was mentioned along the lines and is a valid bug too).
Regards
https://bugs.winehq.org/show_bug.cgi?id=47242
pattietreutel katyaberezyaka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |katyaberezyaka@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=47242
--- Comment #3 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
--- snip --- $ WINEDEBUG=+seh,+relay,+server,+ntdll,+debugstr wine ./reactos.exe >>log.txt 2>&1 ... 0024:Call ntdll.NtQueryInformationProcess(ffffffff,0000001b,0032f954,00000210,00000000) ret=00409074 0024: get_process_image_name( handle=ffffffff, win32=0 ) 0024: get_process_image_name() = 0 { len=110, name=L"\??\Z:\home\focht\Downloads\reactos\reactos\reactos.exe" } 0024:Ret ntdll.NtQueryInformationProcess() retval=00000000 ret=00409074 0024:Call msvcrt.wcsrchr(0032f95c L"\??\Z:\home\focht\Downloads\reactos\reactos\reactos.exe",0000005c) ret=004090a7 0024:Ret msvcrt.wcsrchr() retval=0032f9b2 ret=004090a7 0024:Call msvcrt.wcslen(0032f95c L"\??\Z:\home\focht\Downloads\reactos\reactos") ret=004090c7 0024:Ret msvcrt.wcslen() retval=0000002b ret=004090c7 0024:Call ntdll.NtOpenSymbolicLinkObject(0032fd88,00000001,0032fd6c) ret=0040910b 0024: open_symlink( access=00000001, attributes=00000040, rootdir=0000, name=L"\SystemRoot" ) 0024: open_symlink() = OBJECT_NAME_NOT_FOUND { handle=0000 } 0024:Ret ntdll.NtOpenSymbolicLinkObject() retval=c0000034 ret=0040910b 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\lib\setuplib.c:454) NtOpenSymbolicLinkObject(Z) failed with Status 0x0032fd8c 0024:Call ntdll.RtlCreateUnicodeString(00444edc,0032f95c L"\??\Z:\home\focht\Downloads\reactos\reactos") ret=004091db 0024:Ret ntdll.RtlCreateUnicodeString() retval=004cbd01 ret=004091db 0024:Call msvcrt.wcsrchr(0032f95c L"\??\Z:\home\focht\Downloads\reactos\reactos",0000005c) ret=004091e9 0024:Ret msvcrt.wcsrchr() retval=0032f9a2 ret=004091e9 0024:Call ntdll.RtlCreateUnicodeString(00444ed4,0032f9a2 L"\reactos") ret=00409203 0024:Ret ntdll.RtlCreateUnicodeString() retval=004cbe01 ret=00409203 0024:Call ntdll.RtlCreateUnicodeString(00444ecc,0032f95c L"\??\Z:\home\focht\Downloads\reactos") ret=0040922d 0024:Ret ntdll.RtlCreateUnicodeString() retval=004cbe01 ret=0040922d 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:986) SourcePath: 'Z' 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:987) SourceRootPath: 'Z' 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:988) SourceRootDir: 'Z' ... 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:901) Testing 'C:' --> '\Device\HarddiskVolume1' 0024:Call msvcrt.wcslen(0032f540 L"\Device\HarddiskVolume1\") ret=00401872 0024:Ret msvcrt.wcslen() retval=00000018 ret=00401872 0024:Call msvcrt._wcsnicmp(0032f540 L"\Device\HarddiskVolume1\",0032fb80 L"\??\Z:\home\focht\Downloads\reactos\reactos\txtsetup.sif",00000018) ret=00401887 ... 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:901) Testing 'D:' --> '\Device\CdRom0' 0024:Call msvcrt.wcslen(0032f540 L"\Device\CdRom0\") ret=00401872 0024:Ret msvcrt.wcslen() retval=0000000f ret=00401872 0024:Call msvcrt._wcsnicmp(0032f540 L"\Device\CdRom0\",0032fb80 L"\??\Z:\home\focht\Downloads\reactos\reactos\txtsetup.sif",0000000f) ret=00401887 ... 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:901) Testing 'E:' --> '\Device\CdRom1' 0024:Call msvcrt.wcslen(0032f540 L"\Device\CdRom1\") ret=00401872 0024:Ret msvcrt.wcslen() retval=0000000f ret=00401872 0024:Call msvcrt._wcsnicmp(0032f540 L"\Device\CdRom1\",0032fb80 L"\??\Z:\home\focht\Downloads\reactos\reactos\txtsetup.sif",0000000f) ret=00401887 ... 0024:warn:debugstr:vDbgPrintExWithPrefix 00000000:00000001: (base\setup\reactos\reactos.c:901) Testing 'Z:' --> '\Device\HarddiskVolume2' 0024:Call msvcrt.wcslen(0032f540 L"\Device\HarddiskVolume2\") ret=00401872 0024:Ret msvcrt.wcslen() retval=00000018 ret=00401872 0024:Call msvcrt._wcsnicmp(0032f540 L"\Device\HarddiskVolume2\",0032fb80 L"\??\Z:\home\focht\Downloads\reactos\reactos\txtsetup.sif",00000018) ret=00401887 ... 0024:Call user32.MessageBoxW(00000000,0032f920 L"Unable to find 'txtsetup.sif'\nSetup is unable to continue",0032fd20 L"ReactOS Setup",00000010) ret=00401c23 --- snip ---
$ wine --version wine-7.0-rc4
Regards