https://bugs.winehq.org/show_bug.cgi?id=45703
Bug ID: 45703 Summary: Microsoft Office 365 applications crash on WINE 3.14 Product: Wine Version: 3.14 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: alexander-winehq@xmine128.tk Distribution: ---
Created attachment 62130 --> https://bugs.winehq.org/attachment.cgi?id=62130 Full crash log
In the current version of WINE (3.14) all Office 365 Professional Plus apps (tested Word, Excel & PowerPoint) crash with the following error:
… 005c:fixme:ole:NdrCorrelationFree (0x267f764): stub 0009:fixme:ole:NdrCorrelationFree (0x32e864): stub wine: Unhandled page fault on read access to 0x6809b474 at address 0x7bc4015d (thread 0009), starting debugger... 0009:err:seh:raise_exception Unhandled exception code c0000005 flags 0 addr 0x7bc4015d
There is no indication what this could be when comparing with the same (working) binaries on WINE 3.0.
https://bugs.winehq.org/show_bug.cgi?id=45703
alasky@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alasky@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=45703
Fabian Maurer dark.shadow4@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dark.shadow4@web.de
--- Comment #1 from Fabian Maurer dark.shadow4@web.de --- If it's still working with older wine - Can you do a regression test to find out which change broke it?
https://bugs.winehq.org/show_bug.cgi?id=45703
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression Ever confirmed|0 |1 Status|UNCONFIRMED |NEW CC| |xerox.xerox2000x@gmail.com
--- Comment #2 from Louis Lenders xerox.xerox2000x@gmail.com --- I can confirm this crash, but I also have problems installing this. Followed instrucrtions in appdb, but the intstaller keeps hanging at 58%/64%.
Instructions at appdb outdated?
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #3 from Louis Lenders xerox.xerox2000x@gmail.com --- I try to do regression test, but actually Word starts in version wine-3.14-220-gf6695aea20 where i`m now at, whereas this bugreport states 3.14 doens`t work (????)
@Reporter of bug: Are you sure you used version wine-3.14?
https://bugs.winehq.org/show_bug.cgi?id=45703
Louis Lenders xerox.xerox2000x@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=46165
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #4 from Nikolay Sivov bunglehead@gmail.com --- If it used to work with 3.0 it does not mean it will work now, because Office is constantly updating. So if you're relying on online installer it's better to always use latest development release.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #5 from Louis Lenders xerox.xerox2000x@gmail.com --- Looks like regression test turns out into red herring...
I stopped at somewhere inside wine-3.20, in all versions from 3.14 upwards WINWORD just started fine ....
While testing I compiled with :
./configure CFLAGS="-O0" --disable-win64
My current wine (yesterdays git that crashes)
../wine/configure CFLAGS="-O0" --enable-win64
cd /home/louis/sda2/wine32-build/
PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/ ../wine/configure CFLAGS="-O0" --with-wine64=../wine64-build
For now I guess there must be something resulting different from the compiler options (????)
I`ll compile current git with CFLAGS="-O0" --disable-win64, see if it starts then
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #6 from Louis Lenders xerox.xerox2000x@gmail.com --- So current git compiled with CFLAGS="-O0" --disable-win64 starts WINWORD just fine. (Currently stuck at crashing activation window) Don`t know what to do further.
Note: also tried Staging 3.20 (installed pre-compiled package) , doesn`t start WINWORD either, throws up Messagebox "IOPL not enabled"
https://bugs.winehq.org/show_bug.cgi?id=45703
code_exec@outlook.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |code_exec@outlook.com
--- Comment #7 from code_exec@outlook.com --- After upgrading from WINE 3.0.3 to WINE Staging 3.20, I get a different error, "IOPL not enabled".
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #8 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to code_exec from comment #7)
After upgrading from WINE 3.0.3 to WINE Staging 3.20, I get a different error, "IOPL not enabled".
Yes I get that too with Staging. In a purely 32-bit compiled wine the apps like winword and excel start however. Don`t know why... (./configure --disable-win64 && make)
https://bugs.winehq.org/show_bug.cgi?id=45703
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |http://officecdn.microsoft. | |com.edgesuite.net/db/492350 | |F6-3A01-4F97-B9C0-C7C6DDF67 | |D60/media/en-US/WordRetail. | |img Summary|Microsoft Office 365 |Microsoft Office 365 |applications crash on WINE |applications crash on |3.14 |startup (Microsoft AppV ISV | |virtual filesystem | |technology requires several | |native and core API to be | |hot-patchable) Component|-unknown |ntdll Keywords|regression |obfuscation CC| |focht@gmx.net
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
confirming.
The main problem here is Microsoft Application Packaging and Virtualization technology "App-V". It relies on hooking of native API and other core dlls to implement virtual filesystems.
Download links for testing:
https://www.ryadel.com/en/ms-office-2016-365-official-iso-img-images-for-dow...
Example of virtualized filesystem within MS Office 2016 (365) installation, with redirection target directory structure:
--- snip --- $ tree --charset=ANSI -L 2 -d .wine/drive_c/Program\ Files/Microsoft\ Office/root/vfs/
.wine/drive_c/Program Files/Microsoft Office/root/vfs/ |-- Common AppData | |-- Microsoft | `-- Microsoft Help |-- Common Programs | `-- Microsoft Office 2016 Tools |-- Fonts | `-- private |-- ProgramFilesCommonX86 | |-- DESIGNER | |-- Microsoft Shared | `-- ODBC |-- ProgramFilesX86 | `-- Microsoft Office |-- SystemX86 `-- Windows |-- Installer `-- PCHEALTH
17 directories --- snip ---
The crash from initial bug report in debugger:
--- snip --- Unhandled exception: page fault on read access to 0x6809f184 in 32-bit code (0x7bc3f58d). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:7bc3f58d ESP:0033cf50 EBP:0033d378 EFLAGS:00010206( R- -- I - -P- ) EAX:680956f0 EBX:0033d400 ECX:0033d388 EDX:10082601 ESI:00000000 EDI:00000000 ... Backtrace: =>0 0x7bc3f58d NtQueryDirectoryFile+0x7d(handle=<couldn't compute location>, event=<couldn't compute location>, apc_routine=<couldn't compute location>, apc_context=<couldn't compute location>, io=<couldn't compute location>, buffer=<couldn't compute location>, length=<couldn't compute location>, info_class=<couldn't compute location>, single_entry=<couldn't compute location>, mask=<couldn't compute location>, restart_scan=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/ntdll/directory.c:1949] in ntdll (0x0033d378) 1 0x100a3f7e in appvisvsubsystems32 (+0xa3f7d) (0x0033d3c0) 2 0x1008272e in appvisvsubsystems32 (+0x8272d) (0x0033d454) 3 0x1008362c in appvisvsubsystems32 (+0x8362b) (0x0033d488) 4 0x7bc28d01 lookup_manifest_file+0x160(dir=0x98, ai=0x33f5cc) [/home/focht/projects/wine/mainline-src/dlls/ntdll/actctx.c:3100] in ntdll (0x0033f538) 5 0x7bc3462d RtlCreateActivationContext+0x67c(handle=<couldn't compute location>, ptr=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/ntdll/actctx.c:3199] in ntdll (0x0033f608) 6 0x7bc579f0 fixup_imports+0xcbf(wm=0x17fa70, load_path="C:\Program Files\Microsoft Office\root\Office16;C:\windows\system32") [/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:810] in ntdll (0x0033f718) 7 0x7bc581cd load_native_dll+0x71c(load_path="C:\Program Files\Microsoft Office\root\Office16;C:\windows\system32", name=<is not available>, file=<is not available>) [/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:2070] in ntdll (0x0033f968) 8 0x7bc589c4 load_dll+0x5d3(load_path="C:\Program Files\Microsoft Office\root\Office16;C:\windows\system32", libname="wwlib.dll", flags=0x1000) [/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:2570] in ntdll (0x0033fb18) 9 0x7bc59223 LdrLoadDll+0x5d(path_name=<couldn't compute location>, flags=<couldn't compute location>, libname=<couldn't compute location>, hModule=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:2603] in ntdll (0x0033fb68) 10 0x7b45a4ec load_library+0xdb(libname=0x33fc08, flags=0x1000) [/home/focht/projects/wine/mainline-src/dlls/kernel32/module.c:975] in kernel32 (0x0033fbe8) 11 0x7b45ac01 LoadLibraryExW+0xdb() [/home/focht/projects/wine/mainline-src/dlls/kernel32/module.c:1035] in kernel32 (0x0033fc28) 12 0x0040178f in winword (+0x178e) (0x0033fe74) 13 0x00401163 in winword (+0x1162) (0x0033fec0) 14 0x7b461b82 call_process_entry+0x11() in kernel32 (0x0033fed8) 15 0x7b463d00 start_process+0x14f(entry=<couldn't compute location>, peb=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:1273] in kernel32 (0x0033ffd8) 16 0x7b461b8e start_process_wrapper+0x9() in kernel32 (0x0033ffec) 0x7bc3f58d NtQueryDirectoryFile+0x7d [/home/focht/projects/wine/mainline-src/dlls/ntdll/directory.c:1949] in ntdll: testb $0x8,0x9a94(%eax) 1949 TRACE("(%p %p %p %p %p %p 0x%08x 0x%08x 0x%08x %s 0x%08x\n", --- snip ---
Wine calls native API in internal function 'lookup_manifest_file':
--- snip --- ... 7BC28CD0 8985 BCDFFFFF MOV DWORD PTR SS:[LOCAL.2065],EAX 7BC28CD6 6A 01 PUSH 1 7BC28CD8 56 PUSH ESI 7BC28CD9 6A 00 PUSH 0 7BC28CDB 6A 03 PUSH 3 7BC28CDD 68 00200000 PUSH 2000 7BC28CE2 50 PUSH EAX 7BC28CE3 8D85 E0DFFFFF LEA EAX,[LOCAL.2056] 7BC28CE9 50 PUSH EAX 7BC28CEA 6A 00 PUSH 0 7BC28CEC 6A 00 PUSH 0 7BC28CEE 6A 00 PUSH 0 7BC28CF0 FFB5 B0DFFFFF PUSH DWORD PTR SS:[LOCAL.2068] 7BC28CF6 8985 A4DFFFFF MOV DWORD PTR SS:[LOCAL.2071],EAX 7BC28CFC E8 0F680100 CALL NtQueryDirectoryFile ... --- snip ---
ntdll.dll NtQueryDirectoryFile (hooked):
--- snip --- 7BC3F510 E9 DB404494 JMP 100835F0 7BC3F515 05 EB4A0A00 ADD EAX,0A4AEB ; base pointer to GOT 7BC3F51A 8D4C24 04 LEA ECX,[ESP+4] 7BC3F51E 83E4 F0 AND ESP,FFFFFFF0 7BC3F521 FF71 FC PUSH DWORD PTR DS:[ECX-4] 7BC3F524 55 PUSH EBP 7BC3F525 89E5 MOV EBP,ESP 7BC3F527 57 PUSH EDI 7BC3F528 56 PUSH ESI 7BC3F529 53 PUSH EBX 7BC3F52A 51 PUSH ECX 7BC3F52B 81EC 18040000 SUB ESP,418 7BC3F531 8B59 10 MOV EBX,DWORD PTR DS:[ECX+10] 7BC3F534 8B11 MOV EDX,DWORD PTR DS:[ECX] --- snip ---
App-V client side: 'AppVIsvSubsystems32.dll' App-V remote/server side: 'OfficeClickToRun.exe' (RPC server)
Another native API example to also show the detour lib uses instruction boundary padding.
ntdll.dll NtOpenKeyEx (patched):
--- snip --- 7BC6EC50 E9 4BD43F94 JMP 1006C0A0 7BC6EC55 CC INT3 7BC6EC56 CC INT3 7BC6EC57 FF71 FC PUSH DWORD PTR DS:[ECX-4] 7BC6EC5A 55 PUSH EBP 7BC6EC5B 89E5 MOV EBP,ESP 7BC6EC5D 53 PUSH EBX 7BC6EC5E 89CB MOV EBX,ECX 7BC6EC60 51 PUSH ECX 7BC6EC61 8B01 MOV EAX,DWORD PTR DS:[ECX] 7BC6EC63 8B51 04 MOV EDX,DWORD PTR DS:[ECX+4] 7BC6EC66 8B49 08 MOV ECX,DWORD PTR DS:[ECX+8] 7BC6EC69 83EC 0C SUB ESP,0C 7BC6EC6C FF73 0C PUSH DWORD PTR DS:[EBX+0C] 7BC6EC6F E8 FCF9FFFF CALL 7BC6E670 7BC6EC74 8D65 F8 LEA ESP,[EBP-8] 7BC6EC77 59 POP ECX 7BC6EC78 5B POP EBX 7BC6EC79 5D POP EBP 7BC6EC7A 8D61 FC LEA ESP,[ECX-4] 7BC6EC7D C2 1000 RETN 10 --- snip ---
ntdll.dll NtOpenKeyEx (unmodified):
--- snip --- 7BC6EC50 8D4C24 04 LEA ECX,[ARG.1] 7BC6EC54 83E4 F0 AND ESP,FFFFFFF0 7BC6EC57 FF71 FC PUSH DWORD PTR DS:[ECX-4] 7BC6EC5A 55 PUSH EBP 7BC6EC5B 89E5 MOV EBP,ESP 7BC6EC5D 53 PUSH EBX 7BC6EC5E 89CB MOV EBX,ECX 7BC6EC60 51 PUSH ECX 7BC6EC61 8B01 MOV EAX,DWORD PTR DS:[ECX] 7BC6EC63 8B51 04 MOV EDX,DWORD PTR DS:[ECX+4] 7BC6EC66 8B49 08 MOV ECX,DWORD PTR DS:[ECX+8] 7BC6EC69 83EC 0C SUB ESP,0C 7BC6EC6C FF73 0C PUSH DWORD PTR DS:[EBX+0C] 7BC6EC6F E8 FCF9FFFF CALL 7BC6E670 7BC6EC74 8D65 F8 LEA ESP,[LOCAL.3] 7BC6EC77 59 POP ECX 7BC6EC78 5B POP EBX 7BC6EC79 5D POP EBP 7BC6EC7A 8D61 FC LEA ESP,[ECX-4] 7BC6EC7D C2 1000 RETN 10 --- snip ---
List of potentially hooked native and core API using one-liner on trace log file:
--- snip --- $ WINEDEBUG=+seh,+relay wine ./WINWORD.EXE >>log2.txt 2>&1 ...
$ egrep "(GetProcAddress(7.*ret=10.*)" log.txt
0051:Call KERNEL32.GetProcAddress(7b420000,10155a28 "FlsAlloc") ret=1011c695 0051:Call KERNEL32.GetProcAddress(7b420000,10155a34 "FlsFree") ret=1011c6a8 0051:Call KERNEL32.GetProcAddress(7b420000,10155a3c "FlsGetValue") ret=1011c6bb 0051:Call KERNEL32.GetProcAddress(7b420000,10155a48 "FlsSetValue") ret=1011c6ce 0051:Call KERNEL32.GetProcAddress(7b420000,10155a54 "InitializeCriticalSectionEx") ret=1011c6e1 0051:Call KERNEL32.GetProcAddress(7b420000,10171a54 "CreateEventExW") ret=1011c6f4 0051:Call KERNEL32.GetProcAddress(7b420000,10171a74 "CreateSemaphoreExW") ret=1011c707 0051:Call KERNEL32.GetProcAddress(7b420000,10155a70 "SetThreadStackGuarantee") ret=1011c71a 0051:Call KERNEL32.GetProcAddress(7b420000,101796e8 "CreateThreadpoolTimer") ret=1011c72d 0051:Call KERNEL32.GetProcAddress(7b420000,10155a88 "SetThreadpoolTimer") ret=1011c740 0051:Call KERNEL32.GetProcAddress(7b420000,10155a9c "WaitForThreadpoolTimerCallbacks") ret=1011c753 0051:Call KERNEL32.GetProcAddress(7b420000,10155abc "CloseThreadpoolTimer") ret=1011c766 0051:Call KERNEL32.GetProcAddress(7b420000,101796a0 "CreateThreadpoolWait") ret=1011c779 0051:Call KERNEL32.GetProcAddress(7b420000,10155ad4 "SetThreadpoolWait") ret=1011c78c 0051:Call KERNEL32.GetProcAddress(7b420000,10155ae8 "CloseThreadpoolWait") ret=1011c79f 0051:Call KERNEL32.GetProcAddress(7b420000,10155afc "FlushProcessWriteBuffers") ret=1011c7b2 0051:Call KERNEL32.GetProcAddress(7b420000,10155b18 "FreeLibraryWhenCallbackReturns") ret=1011c7c5 0051:Call KERNEL32.GetProcAddress(7b420000,10155b38 "GetCurrentProcessorNumber") ret=1011c7d8 0051:Call KERNEL32.GetProcAddress(7b420000,10155b54 "GetLogicalProcessorInformation") ret=1011c7eb 0051:Call KERNEL32.GetProcAddress(7b420000,10155b74 "CreateSymbolicLinkW") ret=1011c7fe 0051:Call KERNEL32.GetProcAddress(7b420000,10155b88 "SetDefaultDllDirectories") ret=1011c811 0051:Call KERNEL32.GetProcAddress(7b420000,10155ba4 "EnumSystemLocalesEx") ret=1011c824 0051:Call KERNEL32.GetProcAddress(7b420000,10155bb8 "CompareStringEx") ret=1011c837 0051:Call KERNEL32.GetProcAddress(7b420000,10155bc8 "GetDateFormatEx") ret=1011c84a 0051:Call KERNEL32.GetProcAddress(7b420000,10155bd8 "GetLocaleInfoEx") ret=1011c85d 0051:Call KERNEL32.GetProcAddress(7b420000,10155be8 "GetTimeFormatEx") ret=1011c870 0051:Call KERNEL32.GetProcAddress(7b420000,10155bf8 "GetUserDefaultLocaleName") ret=1011c883 0051:Call KERNEL32.GetProcAddress(7b420000,10155c14 "IsValidLocaleName") ret=1011c896 0051:Call KERNEL32.GetProcAddress(7b420000,10155c28 "LCMapStringEx") ret=1011c8a9 0051:Call KERNEL32.GetProcAddress(7b420000,10155c38 "GetCurrentPackageId") ret=1011c8bc 0051:Call KERNEL32.GetProcAddress(7b420000,10155c4c "GetTickCount64") ret=1011c8cf 0051:Call KERNEL32.GetProcAddress(7b420000,10155c5c "GetFileInformationByHandleExW") ret=1011c8e2 0051:Call KERNEL32.GetProcAddress(7b420000,10155c7c "SetFileInformationByHandleW") ret=1011c8f5 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4628 "NtOpenKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4668 "NtOpenKeyEx") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3738 "NtOpenKeyTransacted") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3760 "NtOpenKeyTransactedEx") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4728 "NtDeleteKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4768 "NtFlushKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a47a8 "NtCreateKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3788 "NtCreateKeyTransacted") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4828 "NtEnumerateKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4868 "NtQueryKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a48a8 "NtQueryObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a37b0 "NtSetInformationKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4928 "NtQueryValueKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a37d8 "NtEnumerateValueKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a49a8 "NtSetValueKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3800 "NtDeleteValueKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4a28 "NtRenameKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3828 "NtQueryMultipleValueKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3850 "NtNotifyChangeKey") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a36c0 "NtNotifyChangeMultipleKeys") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a36e8 "NtQuerySecurityObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a3698 "NtSetSecurityObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a2d60 "NtDuplicateObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001a4be8 "NtClose") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,101715dc "IsWow64Process") ret=10087759 0051:Call KERNEL32.GetProcAddress(7bc10000,00184bb0 "NtCreateFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,00184bf0 "NtOpenFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,00184c30 "NtDeleteFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,0018d360 "NtQueryAttributesFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,0018d388 "NtQueryFullAttributesFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,001941f0 "NtQueryDirectoryFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,00194218 "NtSetInformationFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,00184d70 "NtClose") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00184db0 "CreateActCtxA") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00184df0 "CreateActCtxW") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7bc10000,00194240 "NtQueryInformationFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00194268 "GetModuleFileNameA") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00193428 "GetModuleFileNameW") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,001964c8 "GetCurrentDirectoryA") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00185bd8 "GetCurrentDirectoryW") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00184bb0 "CoInitializeEx") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00184bf0 "CoUninitialize") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,0018da60 "CoCreateInstanceEx") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,001949e0 "CoCreateInstance") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,0018ec10 "CoRegisterClassObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,001a3698 "CoRevokeClassObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,001a36c0 "CoGetClassObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,001a36e8 "CoGetInstanceFromFile") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00197548 "CoResumeClassObjects") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00197570 "CoSuspendClassObjects") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00184e30 "OleInitialize") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00184e70 "OleUninitialize") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00197598 "OleRegEnumFormatEtc") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e7d0000,00184ef0 "OleRun") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e920000,00192678 "RegisterActiveObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e920000,00194a38 "RevokeActiveObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e920000,00184fb0 "GetActiveObject") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,001957c8 "CreateProcessW") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00195808 "CreateProcessA") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7b420000,00195848 "WinExec") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e750000,00196820 "CreateProcessAsUserW") ret=1001d194 0051:Call KERNEL32.GetProcAddress(7e750000,00191390 "CreateProcessAsUserA") ret=1001d194 --- snip ---
Another one-liner to show which API functions that are being looked up are currently not 'DECLSPEC_HOTPATCH' in Wine source.
* filter for all core dlls (prelink/load base address range) API functions that are getting looked up from specific dll (load base address range) * filter for all function body (definition) occurrences in Wine sources, which have no DECLSPEC_HOTPATCH
--- snip --- $ egrep "(GetProcAddress(7.*ret=10.*)" log.txt | cut -d """ -f2 | xargs -n1 -I '{}' egrep -R 'WINAPI.*{}(' /home/focht/projects/wine/mainline-src/dlls/ | grep -v DECLSPEC_HOTPATCH /home/focht/projects/wine/mainline-src/dlls/kernel32/fiber.c:DWORD WINAPI FlsAlloc( PFLS_CALLBACK_FUNCTION callback ) /home/focht/projects/wine/mainline-src/dlls/kernel32/fiber.c:BOOL WINAPI FlsFree( DWORD index ) /home/focht/projects/wine/mainline-src/dlls/kernel32/fiber.c:PVOID WINAPI FlsGetValue( DWORD index ) /home/focht/projects/wine/mainline-src/dlls/kernel32/fiber.c:BOOL WINAPI FlsSetValue( DWORD index, PVOID data ) /home/focht/projects/wine/mainline-src/dlls/kernel32/sync.c:BOOL WINAPI InitializeCriticalSectionEx( CRITICAL_SECTION *crit, DWORD spincount, DWORD flags ) /home/focht/projects/wine/mainline-src/dlls/ntdll/critsection.c:NTSTATUS WINAPI RtlInitializeCriticalSectionEx( RTL_CRITICAL_SECTION *crit, ULONG spincount, ULONG flags ) /home/focht/projects/wine/mainline-src/dlls/kernel32/thread.c:BOOL WINAPI SetThreadStackGuarantee(PULONG stacksize) /home/focht/projects/wine/mainline-src/dlls/kernel32/thread.c:PTP_TIMER WINAPI CreateThreadpoolTimer( PTP_TIMER_CALLBACK callback, PVOID userdata, /home/focht/projects/wine/mainline-src/dlls/kernel32/thread.c:VOID WINAPI SetThreadpoolTimer( TP_TIMER *timer, FILETIME *due_time, /home/focht/projects/wine/mainline-src/dlls/kernel32/thread.c:PTP_WAIT WINAPI CreateThreadpoolWait( PTP_WAIT_CALLBACK callback, PVOID userdata, /home/focht/projects/wine/mainline-src/dlls/kernel32/thread.c:VOID WINAPI SetThreadpoolWait( TP_WAIT *wait, HANDLE handle, FILETIME *due_time ) /home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:VOID WINAPI FlushProcessWriteBuffers(void) /home/focht/projects/wine/mainline-src/dlls/ntdll/thread.c:ULONG WINAPI NtGetCurrentProcessorNumber(void) /home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:BOOL WINAPI GetLogicalProcessorInformation(PSYSTEM_LOGICAL_PROCESSOR_INFORMATION buffer, PDWORD pBufLen) /home/focht/projects/wine/mainline-src/dlls/kernel32/path.c:BOOLEAN WINAPI CreateSymbolicLinkW(LPCWSTR link, LPCWSTR target, DWORD flags) /home/focht/projects/wine/mainline-src/dlls/kernel32/module.c:BOOL WINAPI SetDefaultDllDirectories( DWORD flags ) /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:BOOL WINAPI EnumSystemLocalesEx( LOCALE_ENUMPROCEX proc, DWORD flags, LPARAM lparam, LPVOID reserved ) /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:INT WINAPI CompareStringEx(LPCWSTR locale, DWORD flags, LPCWSTR str1, INT len1, /home/focht/projects/wine/mainline-src/dlls/kernel32/lcformat.c:INT WINAPI GetDateFormatEx(LPCWSTR localename, DWORD flags, /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:INT WINAPI GetLocaleInfoEx(LPCWSTR locale, LCTYPE info, LPWSTR buffer, INT len) /home/focht/projects/wine/mainline-src/dlls/kernel32/lcformat.c:INT WINAPI GetTimeFormatEx(LPCWSTR localename, DWORD flags, /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:INT WINAPI GetUserDefaultLocaleName(LPWSTR localename, int buffersize) /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:BOOL WINAPI IsValidLocaleName( LPCWSTR locale ) /home/focht/projects/wine/mainline-src/dlls/kernel32/locale.c:INT WINAPI LCMapStringEx(LPCWSTR name, DWORD flags, LPCWSTR src, INT srclen, LPWSTR dst, INT dstlen, /home/focht/projects/wine/mainline-src/dlls/kernel32/version.c:LONG WINAPI GetCurrentPackageId(UINT32 *len, BYTE *buffer) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtOpenKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI RtlpNtOpenKey( PHANDLE retkey, ACCESS_MASK access, OBJECT_ATTRIBUTES *attr ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtOpenKeyEx( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, ULONG options ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtOpenKeyTransacted( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtOpenKeyTransactedEx( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtDeleteKey( HANDLE hkey ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtFlushKey(HANDLE key) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI RtlpNtCreateKey( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtCreateKeyTransacted( PHANDLE retkey, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtEnumerateKey( HANDLE handle, ULONG index, KEY_INFORMATION_CLASS info_class, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtQueryKey( HANDLE handle, KEY_INFORMATION_CLASS info_class, /home/focht/projects/wine/mainline-src/dlls/ntdll/om.c:NTSTATUS WINAPI NtQueryObject(IN HANDLE handle, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtSetInformationKey( /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtQueryValueKey( HANDLE handle, const UNICODE_STRING *name, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI RtlpNtQueryValueKey( HANDLE handle, ULONG *result_type, PBYTE dest, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtEnumerateValueKey( HANDLE handle, ULONG index, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtSetValueKey( HANDLE hkey, const UNICODE_STRING *name, ULONG TitleIndex, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI RtlpNtSetValueKey( HANDLE hkey, ULONG type, const void *data, /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtDeleteValueKey( HANDLE hkey, const UNICODE_STRING *name ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtRenameKey( HANDLE handle, UNICODE_STRING *name ) /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtQueryMultipleValueKey( /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtNotifyChangeKey( /home/focht/projects/wine/mainline-src/dlls/ntdll/reg.c:NTSTATUS WINAPI NtNotifyChangeMultipleKeys( /home/focht/projects/wine/mainline-src/dlls/ntdll/sec.c:NTSTATUS WINAPI NtSetSecurityObject(HANDLE Handle, /home/focht/projects/wine/mainline-src/dlls/ntdll/om.c:NTSTATUS WINAPI NtDuplicateObject( HANDLE source_process, HANDLE source, /home/focht/projects/wine/mainline-src/dlls/ntdll/om.c:NTSTATUS WINAPI NtClose( HANDLE Handle ) /home/focht/projects/wine/mainline-src/dlls/kernel32/process.c:BOOL WINAPI IsWow64Process(HANDLE hProcess, PBOOL Wow64Process) /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtCreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATTRIBUTES attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtOpenFile( PHANDLE handle, ACCESS_MASK access, /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtDeleteFile( POBJECT_ATTRIBUTES ObjectAttributes ) /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtQueryAttributesFile( const OBJECT_ATTRIBUTES *attr, FILE_BASIC_INFORMATION *info ) /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr, /home/focht/projects/wine/mainline-src/dlls/ntdll/directory.c:NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event, /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, /home/focht/projects/wine/mainline-src/dlls/ntdll/om.c:NTSTATUS WINAPI NtClose( HANDLE Handle ) /home/focht/projects/wine/mainline-src/dlls/kernel32/actctx.c:HANDLE WINAPI CreateActCtxA(PCACTCTXA pActCtx) /home/focht/projects/wine/mainline-src/dlls/kernel32/actctx.c:HANDLE WINAPI CreateActCtxW(PCACTCTXW pActCtx) /home/focht/projects/wine/mainline-src/dlls/ntdll/file.c:NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io, /home/focht/projects/wine/mainline-src/dlls/kernel32/module.c:DWORD WINAPI GetModuleFileNameA( /home/focht/projects/wine/mainline-src/dlls/kernel32/module.c:DWORD WINAPI GetModuleFileNameW( HMODULE hModule, LPWSTR lpFileName, DWORD size ) /home/focht/projects/wine/mainline-src/dlls/wininet/ftp.c:BOOL WINAPI FtpGetCurrentDirectoryA(HINTERNET hFtpSession, LPSTR lpszCurrentDirectory, /home/focht/projects/wine/mainline-src/dlls/kernel32/path.c:UINT WINAPI GetCurrentDirectoryA( UINT buflen, LPSTR buf ) /home/focht/projects/wine/mainline-src/dlls/wininet/ftp.c:BOOL WINAPI FtpGetCurrentDirectoryW(HINTERNET hFtpSession, LPWSTR lpszCurrentDirectory, /home/focht/projects/wine/mainline-src/dlls/kernel32/path.c:UINT WINAPI GetCurrentDirectoryW( UINT buflen, LPWSTR buf ) /home/focht/projects/wine/mainline-src/dlls/shell32/shellole.c:HRESULT WINAPI SHCoCreateInstance( /home/focht/projects/wine/mainline-src/dlls/ole32/compobj.c:HRESULT WINAPI CoRegisterClassObject( /home/focht/projects/wine/mainline-src/dlls/ole32/compobj.c:HRESULT WINAPI CoResumeClassObjects(void) /home/focht/projects/wine/mainline-src/dlls/ole32/compobj.c:HRESULT WINAPI CoSuspendClassObjects(void) --- snip ---
It seems *not* all API looked up are actually getting detoured. All native API for sure and a good chunk of the others. It's possible to figure out the exact number that are getting hot-patched at runtime using scriptable debugger that scans all core dll entries for out-of-module/inter-modular jumps.
Tidbit: I've tested the same install with Wine 3.0 and it doesn't work there either. It even suffers from additional problems. So your claim "it worked" - it was likely just by chance. A debug build of Wine (-O0, -O1), no GOT/PIC at entry, older GCC versions etc.
Anyway, this problem domain is known for years. There were various discussions in the past on how to mitigate this. More recent one: https://bugs.winehq.org/show_bug.cgi?id=45199#c30 (and follow-up comments).
* making Win32 API hot-patchable by default * use '-fno-PIC' by default * implement proper NT-style syscall thunks for native API (Wine-Staging)
Yet we still keep to continue the practice "as needed", polluting the tree source with 'DECLSPEC_HOTPATCH'. Analysing/debugging that is just monkey work.
$ sha1sum WordRetail.img 7e327f7d685ff6da81e831e918959380908b25b7 WordRetail.img
$ du -sh WordRetail.img 4.2G WordRetail.img
$ wine --version wine-3.21
Regards
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #10 from Anastasius Focht focht@gmx.net --- *** Bug 46165 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=45703
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #11 from Zebediah Figura z.figura12@gmail.com --- (In reply to Anastasius Focht from comment #9)
Anyway, this problem domain is known for years. There were various discussions in the past on how to mitigate this. More recent one: https://bugs.winehq.org/show_bug.cgi?id=45199#c30 (and follow-up comments).
- making Win32 API hot-patchable by default
- use '-fno-PIC' by default
- implement proper NT-style syscall thunks for native API (Wine-Staging)
Yet we still keep to continue the practice "as needed", polluting the tree source with 'DECLSPEC_HOTPATCH'. Analysing/debugging that is just monkey work.
Right, it's getting to be time this was fixed. Nothing along the lines of NT syscalls will happen before code freeze, but I'm going to start pushing to at least fix hot-patching on the GCC side, so that we can apply it to all API exports. Arguing for -fno-PIC is left as an exercise to the reader.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #12 from code_exec@outlook.com --- WINE 3.5 is the latest WINE tested with MS Office 365 and it has been rated a Silver https://appdb.winehq.org/objectManager.php?sClass=version&iId=35527
Might as well compile WINE 3.5 inside of an i386 Ubuntu chroot and then try installing Office 365 using the built result. I'll do so tomorrow.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #13 from Louis Lenders xerox.xerox2000x@gmail.com --- Created attachment 62861 --> https://bugs.winehq.org/attachment.cgi?id=62861 patch stolen from bug 37540
(In reply to code_exec from comment #12)
WINE 3.5 is the latest WINE tested with MS Office 365 and it has been rated a Silver https://appdb.winehq.org/objectManager.php?sClass=version&iId=35527
Might as well compile WINE 3.5 inside of an i386 Ubuntu chroot and then try installing Office 365 using the built result. I'll do so tomorrow.
Attached stolen patch from bug https://bugs.winehq.org/show_bug.cgi?id=37540 I compiled current wine-3.21 with it and WINWORD starts. (Apply patch , do "autoconf" and then compile wine). No guarantee if it`s correct/works but maybe worth a try, as workaround until this bug is fixed
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #14 from code_exec@outlook.com --- Getting a new error now. I'm using Wine Staging 3.21. I no longer get the unhandled exception error, but a window opens complaining that IOPL is not enabled. Is there something I need to enable in winecfg?
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #15 from code_exec@outlook.com --- (In reply to code_exec from comment #14)
Getting a new error now. I'm using Wine Staging 3.21. I no longer get the unhandled exception error, but a window opens complaining that IOPL is not enabled. Is there something I need to enable in winecfg?
bump
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #16 from code_exec@outlook.com --- bump once again, someone please respond on how I can enable IOPL in WINE.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #17 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to code_exec from comment #16)
bump once again, someone please respond on how I can enable IOPL in WINE.
I don`t know exact in` and out`s of this bugreport, but afaict office 365 just won`t work with current wine-(staging)-3.21
If you want to run it, give the recipe (patch) from comment 13 a try, that worked for me, office apps winword/excel/and powerpoint start with it.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #18 from code_exec@outlook.com --- Don't really wanna compile from source, but I'd like some advice on how to enable IOPL in WINE.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #19 from Nikolay Sivov bunglehead@gmail.com --- (In reply to code_exec from comment #18)
Don't really wanna compile from source, but I'd like some advice on how to enable IOPL in WINE.
You were given advice in comment 17. If you don't like it you can wait for the issue being fixed in wine. In the meantime please use forums for user support, this is not an appropriate place for this.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #20 from code_exec@outlook.com --- (In reply to Nikolay Sivov from comment #19)
(In reply to code_exec from comment #18)
Don't really wanna compile from source, but I'd like some advice on how to enable IOPL in WINE.
You were given advice in comment 17. If you don't like it you can wait for the issue being fixed in wine. In the meantime please use forums for user support, this is not an appropriate place for this.
The 'advice' that I was given in Comment 17 involved recompiling WINE with a specific option enabled, which I'd rather not do.
https://bugs.winehq.org/show_bug.cgi?id=45703
winetaste@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |winetaste@gmx.net
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #21 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present. Using regular Wine build with -fPIC and -O2 for testing.
One of the native API mentioned here 'ntdll.NtQueryDirectoryFile' (comment #9) is also frequently used in game scene releases that use custom Steam Client API Module (proxy). The API resolver is obfuscated hence can't be seen from any trace logs.
--- snip --- ... Unhandled exception: page fault on execute access to 0x8b5de754 in 32-bit code (0x000000008b5de754). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:0063 GS:006b EIP:8b5de754 ESP:0032f030 EBP:0032f458 EFLAGS:00210282( R- -- I S - - - ) EAX:8b5de754 EBX:00000000 ECX:0032ebc0 EDX:00000000 ESI:00457250 EDI:00000003 Stack dump: ... Backtrace: =>0 0x000000008b5de754 (0x000000000032f458) 1 0x0000000010047a9b EntryPoint+0xffffffffffffffff() in steam_api (0x000000000032f4b8) 2 0x000000007b44c819 FindFirstFileExW+0x518(filename=<couldn't compute location>, level=<couldn't compute location>, data=<couldn't compute location>, search_op=<couldn't compute location>, filter=<couldn't compute location>, flags=<couldn't compute location>) [/home/focht/projects/wine/mainline-src/dlls/kernel32/file.c:2105] in kernel32 (0x000000000032f588) 3 0x000000001001bcee EntryPoint+0xffffffffffffffff() in steam_api (0x000000000032fa38) 4 0x000000001001206d EntryPoint+0xffffffffffffffff() in steam_api (0x000000000032fa50) 5 0x0000000010051285 EntryPoint+0xffffffffffffffff() in steam_api (0x000000000032fcac) 6 0x0000000000719a71 EntryPoint+0xffffffffffffffff() in sniperelitev2 (0x000000000032fcbc) ...
Wine-dbg>info share Module Address Debug info Name (166 modules) PE 400000- bc5000 Export sniperelitev2 PE 9b30000- 9b77000 Deferred binkw32 PE 10000000-100b0000 Export steam_api ELF 7a800000-7a939000 Deferred opengl32<elf> -PE 7a820000-7a939000 \ opengl32 ELF 7b400000-7b830000 Dwarf kernel32<elf> -PE 7b420000-7b830000 \ kernel32 ELF 7bc00000-7bd2a000 Deferred ntdll<elf> -PE 7bc10000-7bd2a000 \ ntdll ELF 7c000000-7c004000 Deferred <wine-loader> ...
Wine-dbg>
0x0000000010047a8f EntryPoint+0xffffffffffffffff in steam_api: pushl 0xc(%ebp) 0x0000000010047a92 EntryPoint+0xffffffffffffffff in steam_api: pushl 0x8(%ebp) 0x0000000010047a95 EntryPoint+0xffffffffffffffff in steam_api: call *0x1009bde0 -> (invalid destination) 0x0000000010047a9b EntryPoint+0xffffffffffffffff in steam_api: movl %eax,%edi
Wine-dbg>x/10x 0x1009bde0 0x000000001009bde0 EntryPoint+0xffffffffffffffff: 00390f80 00390fa0 00390fc0 00000000 0x000000001009bdf0 EntryPoint+0xffffffffffffffff: 00000000 00161460 00161490 00161700 0x000000001009be00 EntryPoint+0xffffffffffffffff: 41455453 5050414d
Wine-dbg>x/10i 0x390f80 0x0000000000390f80: call 0x000000007bc3b257 __x86.get_pc_thunk.ax in ntdll 0x0000000000390f85: jmp 0x000000007bc45d35 NtQueryDirectoryFile+0x5 [/home/focht/projects/wine/mainline-src/dlls/ntdll/directory.c:1944] in ntdll 0x0000000000390f8a: addb %al,0x0(%eax)
Wine-dbg>x/10i NtQueryDirectoryFile
0x000000007bc45d30 NtQueryDirectoryFile jmp 0x0000000010047a67 EntryPoint+0xffffffffffffffff in steam_api 0x000000007bc45d35 NtQueryDirectoryFile+0x5 addl $811723,%eax 0x000000007bc45d3a NtQueryDirectoryFile+0xa leal 0x4(%esp),%ecx 0x000000007bc45d3e NtQueryDirectoryFile+0xe andl $-16,%esp 0x000000007bc45d41 NtQueryDirectoryFile+0x11 pushl 0xfffffffc(%ecx) 0x000000007bc45d44 NtQueryDirectoryFile+0x14 pushl %ebp --- snip ---
Copies of native API entry points:
--- snip --- 1009BDD0 00000666 1009BDD4 003A0F40 1009BDD8 003A0FE0 1009BDDC 003A0F60 1009BDE0 003A0F80 1009BDE4 003A0FA0 1009BDE8 003A0FC0 1009BDEC 00000000 1009BDF0 00000000
003A0F40 | 8BFF | mov edi,edi 003A0F42 | 55 | push ebp 003A0F43 | 8BEC | mov ebp,esp 003A0F45 | E9 9B478C7B | jmp 7BC656E5 ; LdrLoadDll+0x5 003A0F4A | 0000 | add byte ptr ds:[eax],al ... 003A0F60 | 8D4C24 04 | lea ecx,dword ptr ss:[esp+4] 003A0F64 | 83E4 F0 | and esp,FFFFFFF0 003A0F67 | E9 6B188B7B | jmp 7BC527D7 ; NtQueryFullAttributesFile+0x7 003A0F6C | 0000 | add byte ptr ds:[eax],al ... 003A0F80 | E8 D2A2897B | call 7BC3B257 ; PIC/GOT -> problem! 003A0F85 | E9 AB4D8A7B | jmp 7BC45D35 ; NtQueryDirectoryFile+0x5 003A0F8A | 0000 | add byte ptr ds:[eax],al ... 003A0FA0 | 8D4C24 04 | lea ecx,dword ptr ss:[esp+4] 003A0FA4 | 83E4 F0 | and esp,FFFFFFF0 003A0FA7 | E9 7BCF8A7B | jmp 7BC4DF27 ; NtOpenFile+0x7 003A0FAC | 0000 | add byte ptr ds:[eax],al ... 003A0FC0 | 8D4C24 04 | lea ecx,dword ptr ss:[esp+4] 003A0FC4 | 83E4 F0 | and esp,FFFFFFF0 003A0FC7 | E9 ABCF8A7B | jmp 7BC4DF77 ; NtCreateFile+0x7 003A0FCC | 0000 | add byte ptr ds:[eax],al ... 003A0FE0 | 8D4C24 04 | lea ecx,dword ptr ss:[esp+4] 003A0FE4 | 83E4 F0 | and esp,FFFFFFF0 003A0FE7 | E9 FB198B7B | jmp 7BC529E7 ; NtQueryAttributesFile+0x7 003A0FEC | 0000 | add byte ptr ds:[eax],al ... --- snip ---
There is also a number of other bug reports with similar symptoms, albeit with questionable tracebility/comment thread quality.
--- quote --- bump once again, someone please respond on how I can enable IOPL in WINE. --- quote ---
IOPL errors are the symptom of a broken MS Office installation. You didn't follow howtos/guidelines to do post-installation fixups. I admit most of these instructions which involve manual copying of files are of rather questionable quality. Anyway, use forums. Wine Bugzilla is not meant for end user support.
$ wine --version wine-4.5-368-g0cb79db12a
Regards
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #22 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to Anastasius Focht from comment #21)
Hello folks,
revisiting, still present. Using regular Wine build with -fPIC and -O2 for testing.
One of the native API mentioned here 'ntdll.NtQueryDirectoryFile' (comment #9) is also frequently used in game scene releases that use custom Steam Client API Module (proxy). The API resolver is obfuscated hence can't be seen from any trace logs.
That seems to be it then, it starts fine for me with below patch. Nothing more changed, also compiled with -fPIC and -O2. Nice catch, focht!. If someone could try too and confirm too that would be nice. Only tested WINWORD. Will test POWERPOINT an EXCEL too.
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c index b46c2a6736..c99cf3c8a1 100644 --- a/dlls/ntdll/directory.c +++ b/dlls/ntdll/directory.c @@ -1933,7 +1933,7 @@ static NTSTATUS get_cached_dir_data( HANDLE handle, struct dir_data **data_ret, * NtQueryDirectoryFile [NTDLL.@] * ZwQueryDirectoryFile [NTDLL.@] */ -NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event, +NTSTATUS WINAPI DECLSPEC_HOTPATCH NtQueryDirectoryFile( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc_routine, PVOID apc_context, PIO_STATUS_BLOCK io, PVOID buffer, ULONG length,
I admit most of these instructions which involve manual copying of files are of rather questionable quality. Anyway, use forums. Wine Bugzilla is not meant for end user support.
IRC last time I installed office365 , when you use Staging the manual copying is not needed anymore; I think this is due to Gijs` patch for CreateSymbolLink, but i`d have to recheck to be sure.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #23 from Louis Lenders xerox.xerox2000x@gmail.com --- Patch sent: https://www.winehq.org/pipermail/wine-devel/2019-April/143889.html
Excel and Powerpoint also start fine for me with that patch applied
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #24 from Louis Lenders xerox.xerox2000x@gmail.com --- Ok, here`s yet another mystery to solve....
That version of wine i applied the patch on top of was actually a wine version from a few weeks ago that I compiled with -fPIC -02
Now I upgraded that tree to wine-4.6 , applied patch, compiled with -fPIC -02, and it doesn`t work anymore, WINWORD crashes...
So I just rechecked:
wine-4.4 compiled with -fPIC -02 + patch --> WINWORD starts fine
wine-4.6 compiled with -fPIC -02 + patch --> WINWORD crashes....
Story continues, Anyone an idea how this is possible?
https://bugs.winehq.org/show_bug.cgi?id=45703
Olivier F. R. Dierick o.dierick@piezo-forte.be changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |o.dierick@piezo-forte.be
--- Comment #25 from Olivier F. R. Dierick o.dierick@piezo-forte.be --- (In reply to Louis Lenders from comment #24)
Ok, here`s yet another mystery to solve....
That version of wine i applied the patch on top of was actually a wine version from a few weeks ago that I compiled with -fPIC -02
Now I upgraded that tree to wine-4.6 , applied patch, compiled with -fPIC -02, and it doesn`t work anymore, WINWORD crashes...
So I just rechecked:
wine-4.4 compiled with -fPIC -02 + patch --> WINWORD starts fine
wine-4.6 compiled with -fPIC -02 + patch --> WINWORD crashes....
Story continues, Anyone an idea how this is possible?
I don't know if it's a typo in your comment or if you actually rechecked with that but you did write -02 (zero-two) where it should be -O2 (capital Oh-two).
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #26 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to Olivier F. R. Dierick from comment #25)
(In reply to Louis Lenders from comment #24)
I don't know if it's a typo in your comment or if you actually rechecked with that but you did write -02 (zero-two) where it should be -O2 (capital Oh-two).
That was typo in comment, hasty typing
anyway, i decided to do regressiontest to see why there`s a diffence between wine-4.4 and wine-4.6 and ended up with this commit :
cf8193df5b4c5a09208e40d8f3183c00187c8bd0 is the first bad commit commit cf8193df5b4c5a09208e40d8f3183c00187c8bd0 Author: Alexandre Julliard julliard@winehq.org Date: Wed Apr 3 19:27:13 2019 +0200
include: Make wine_dbg_log() into an inline function.
Signed-off-by: Alexandre Julliard julliard@winehq.org
I don`t know how this could be anything related so I`ll first go double-check and report back before fishing up red herrings
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #27 from Louis Lenders xerox.xerox2000x@gmail.com --- Created attachment 64196 --> https://bugs.winehq.org/attachment.cgi?id=64196 revert cf8193df5b4c5a09208e40d8f3183c00187c8bd0
Commit cf8193df5b4c5a09208e40d8f3183c00187c8bd0 doesn`t revert clean against current git, here`s a manual attempt
With this patch WINWORD starts for me in current git.
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #28 from Anastasius Focht focht@gmx.net --- Hello Louis,
--- quote --- I don`t know how this could be anything related so I`ll first go double-check and report back before fishing up red herrings --- quote ---
well, there is no doubt about it. Basically Alexandre's inlining rework of debug helpers has an effect on how GCC organizes (optimizes) code at Win32 function entry. __wine_dbg_get_channel_flags() causes data references go through GOT. A load of GOT register is now emitted directly at API entries where TRACE() is the first code, which is a no-no for many hook engines. Previously, the GOT register load was emitted _after_ stack re-align/preserving locally clobbered registers/setup of stack frame pointer for local vars (those sequences are hotpatchable).
Kinda bad situation as this essentially prevents the closure of a couple of old tickets. There are also new "collector" tickets which list multiple broken apps/games with same regression sha1. All of them require additional sets hotpatchable API entries now (across and within tickets, partially overlapping). I'm not very inclined on working on this with top priority.
Regards
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #29 from Louis Lenders xerox.xerox2000x@gmail.com --- Created attachment 64213 --> https://bugs.winehq.org/attachment.cgi?id=64213 patch
This patch on top of current git makes WINWORD start again for me.
I'll send to wine-devel
https://bugs.winehq.org/show_bug.cgi?id=45703
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |89bfcfc6452062ee59ed6be5cfd | |9009e46bf8c9c Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #30 from Anastasius Focht focht@gmx.net --- Hello folks,
this is fixed by commits:
* https://source.winehq.org/git/wine.git/commitdiff/3a0ffe5a370d4d13512c9f9315... ("ntdll: Add DECLSPEC_HOTPATCH to NtQueryDirectoryFile.") * https://source.winehq.org/git/wine.git/commitdiff/89bfcfc6452062ee59ed6be5cf... ("ntdll: Add DECLSPEC_HOTPATCH to NtQueryValueKey.")
Thanks Louis
Leftovers for other Office apps deserve their own follow-up tickets.
$ wine --version wine-4.6-108-g9d7d68747b
Regards
https://bugs.winehq.org/show_bug.cgi?id=45703
--- Comment #31 from Louis Lenders xerox.xerox2000x@gmail.com --- (In reply to Anastasius Focht from comment #30)
Hello folks,
this is fixed by commits:
https://source.winehq.org/git/wine.git/commitdiff/ 3a0ffe5a370d4d13512c9f9315ab961fcef08d19 ("ntdll: Add DECLSPEC_HOTPATCH to NtQueryDirectoryFile.")
https://source.winehq.org/git/wine.git/commitdiff/ 89bfcfc6452062ee59ed6be5cfd9009e46bf8c9c ("ntdll: Add DECLSPEC_HOTPATCH to NtQueryValueKey.")
Thanks Louis
Leftovers for other Office apps deserve their own follow-up tickets.
$ wine --version wine-4.6-108-g9d7d68747b
Regards
for the info, WINWORD and POWERPOINT start fine in current git for me, EXCEL still crashes for me (inside CreateActCtxW). With that one ''hot-patchable`` the application starts fine. I`ll open a new bugreport for it
https://bugs.winehq.org/show_bug.cgi?id=45703
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.winehq.org/sho | |w_bug.cgi?id=47051
https://bugs.winehq.org/show_bug.cgi?id=45703
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #32 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.7.
https://bugs.winehq.org/show_bug.cgi?id=45703
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x
https://bugs.winehq.org/show_bug.cgi?id=45703
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |---
--- Comment #33 from Michael Stefaniuc mstefani@winehq.org --- Removing the 4.0.x milestone from bug fixes included in 4.0.2.