https://bugs.winehq.org/show_bug.cgi?id=45213
Bug ID: 45213 Summary: wine 3.7 can run VC + visual assist, but wine 3.8 can not. or maybe gcc version related Product: Wine Version: 3.8 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: h2008676@nwytg.com Distribution: ---
I'm using archlinux, and WINEARCH=win32 If visual assist uninstalled, VC can run well on both wine 3.7 and wine 3.8. With wine 3.8 and visual assist installed, the VC immediately freezed after launch, no response at all. Also, when I replace /usr/lib32/wine with the same contents of wine 3.7, itbecame work again.
wine-3.7 arch pkg download from the below url: http://ftp.ksu.edu.tw/FTP/Linux/archlinux/multilib/os/x86_64/wine-3.7-1-x86_...
Then I tried to build wine-3.7 on my LFS system, but it still failed to load VC with Visual Assist, same as wine-3.8 did. I'm using GCC-8.1 on my LFS system, maybe it is gcc version related ? I compaired the logs of them, when it failed, it has a error log 'seh:setup_exception_record stack overflow' just after 'GetCurrentPackageId'. More logs below: ============================================================ first time log ------------------------------ good: ----- 0019:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 74080 (device=7 access=1 func=20 method=0) 0143:fixme:ntdll:EtwRegisterTraceGuidsW (0x107d2c23, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x10b0be74, (null), (null), 0x10b949b0): stub 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {72b14a7d-704c-423e-92f8-7e6d64bcb92a} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e2091f8a-1e0a-4731-84a2-0dd57c8a5261} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e8a3bf1f-a86b-4390-9c60-5390b969d22c} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {5727a00f-50be-4519-8256-f7699871fecb} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {7e854ec7-cdc4-405a-b5b2-aaf7c9e7d40c} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {79a60dc6-5fc8-4952-a41c-1163aeec5eb8} 0143:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {2718d25b-5bf5-4479-8e88-babc64bdbfca} 0143:fixme:process:GetNumaHighestNodeNumber (0x33edf8): semi-stub 0150:fixme:process:FlushProcessWriteBuffers : stub 0158:fixme:ver:GetCurrentPackageId (0x491fe9c (nil)): stub 0159:fixme:ver:GetCurrentPackageId (0x4a2fe9c (nil)): stub 015b:fixme:ieframe:PersistStreamInit_InitNew (0x4bad528) 015b:fixme:ieframe:navigate_url Unsupported args (Flags 0x6ebe800 {VT_I4: 14}; TargetFrameName 0x6ebe7f0 {VT_BSTR: (null)}) 0152:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution. Could not load wine-gecko. HTML rendering will be disabled. 015b:err:mshtml:create_document_object Failed to init Gecko, returning CLASS_E_CLASSNOTAVAILABLE 015b:fixme:ole:CoCreateInstanceEx no instance created for interface {00000000-0000-0000-c000-000000000046} of class {25336920-03f9-11cf-8fd0-00aa00686f13}, hres is 0x80040111 015b:fixme:ieframe:handle_navigation_error Navigate to error page 015b:fixme:ieframe:bind_to_object BindToObject failed: 800c0010 015b:fixme:ieframe:OleInPlaceObject_InPlaceDeactivate (0x4bad528) X Error of failed request: BadPixmap (invalid Pixmap parameter) Major opcode of failed request: 54 (X_FreePixmap) Resource id in failed request: 0x1c001c70 Serial number of failed request: 5168 Current serial number in output stream: 5169 The operation completed successfully The operation completed successfully quit. ------------------------------ bad: ----- 0019:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 74080 (device=7 access=1 func=20 method=0) 00e1:fixme:ntdll:EtwRegisterTraceGuidsW (0x107d2c23, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x10b0be74, (null), (null), 0x10b949b0): stub 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {72b14a7d-704c-423e-92f8-7e6d64bcb92a} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e2091f8a-1e0a-4731-84a2-0dd57c8a5261} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e8a3bf1f-a86b-4390-9c60-5390b969d22c} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {5727a00f-50be-4519-8256-f7699871fecb} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {7e854ec7-cdc4-405a-b5b2-aaf7c9e7d40c} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {79a60dc6-5fc8-4952-a41c-1163aeec5eb8} 00e1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {2718d25b-5bf5-4479-8e88-babc64bdbfca} 00e1:fixme:process:GetNumaHighestNodeNumber (0x33edf8): semi-stub 00eb:fixme:process:FlushProcessWriteBuffers : stub 00f6:fixme:ver:GetCurrentPackageId (0x494fe9c (nil)): stub 00f7:fixme:ver:GetCurrentPackageId (0x4a5fe9c (nil)): stub 00e1:err:seh:setup_exception_record stack overflow 1388 bytes in thread 00e1 eip 7e9346b1 esp 00240dc4 stack 0x240000-0x241000-0x340000 00f5:fixme:ntdll:EtwUnregisterTraceGuids deadbeef: stub 00f3:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution. The operation completed successfully The operation completed successfully quit. ============================================================ second time run log ------------------------------ good: ----- 0019:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 74080 (device=7 access=1 func=20 method=0) 01ac:fixme:ntdll:EtwRegisterTraceGuidsW (0x107d2c23, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x10b0be74, (null), (null), 0x10b949b0): stub 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {72b14a7d-704c-423e-92f8-7e6d64bcb92a} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e2091f8a-1e0a-4731-84a2-0dd57c8a5261} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e8a3bf1f-a86b-4390-9c60-5390b969d22c} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {5727a00f-50be-4519-8256-f7699871fecb} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {7e854ec7-cdc4-405a-b5b2-aaf7c9e7d40c} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {79a60dc6-5fc8-4952-a41c-1163aeec5eb8} 01ac:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {2718d25b-5bf5-4479-8e88-babc64bdbfca} 01ac:fixme:process:GetNumaHighestNodeNumber (0x33edf8): semi-stub 01b5:fixme:process:FlushProcessWriteBuffers : stub 01bf:fixme:ver:GetCurrentPackageId (0x490fe9c (nil)): stub 01c0:fixme:ver:GetCurrentPackageId (0x4a1fe9c (nil)): stub 01ac:err:treeview:TREEVIEW_HandleTimer got unknown timer 01ac:fixme:win:LockWindowUpdate (0x10020), partial stub! 01ac:fixme:win:LockWindowUpdate ((nil)), partial stub! 01ac:err:treeview:TREEVIEW_HandleTimer got unknown timer 01b0:fixme:ntdll:NtLockFile I/O completion on lock not implemented yet ------------------------------ bad: ----- 0019:fixme:mountmgr:harddisk_ioctl Unsupported ioctl 74080 (device=7 access=1 func=20 method=0) 01d1:fixme:ntdll:EtwRegisterTraceGuidsW (0x107d2c23, (nil), {f7b697a3-4db5-4d3b-be71-c4d284e6592f}, 7, 0x10b0be74, (null), (null), 0x10b949b0): stub 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {72b14a7d-704c-423e-92f8-7e6d64bcb92a} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e2091f8a-1e0a-4731-84a2-0dd57c8a5261} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {e8a3bf1f-a86b-4390-9c60-5390b969d22c} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {5727a00f-50be-4519-8256-f7699871fecb} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {7e854ec7-cdc4-405a-b5b2-aaf7c9e7d40c} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {79a60dc6-5fc8-4952-a41c-1163aeec5eb8} 01d1:fixme:ntdll:EtwRegisterTraceGuidsW register trace class {2718d25b-5bf5-4479-8e88-babc64bdbfca} 01d1:fixme:process:GetNumaHighestNodeNumber (0x33edf8): semi-stub 01dd:fixme:process:FlushProcessWriteBuffers : stub 01e6:fixme:ver:GetCurrentPackageId (0x492fe9c (nil)): stub 01e7:fixme:ver:GetCurrentPackageId (0x4c5fe9c (nil)): stub 01d1:err:seh:setup_exception_record stack overflow 1388 bytes in thread 01d1 eip 7e93f6b1 esp 00240dc4 stack 0x240000-0x241000-0x340000 01df:fixme:ntdll:EtwUnregisterTraceGuids deadbeef: stub
https://bugs.winehq.org/show_bug.cgi?id=45213
--- Comment #1 from h2008676@nwytg.com --- When compiled by gcc-7.3.0, wine-3.7 and wine-3.8 can both work with visual assist.
https://bugs.winehq.org/show_bug.cgi?id=45213
Zebediah Figura z.figura12@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |z.figura12@gmail.com
--- Comment #2 from Zebediah Figura z.figura12@gmail.com --- Can you please provide a log of the failure case with +seh,+loaddll? Thanks.
https://bugs.winehq.org/show_bug.cgi?id=45213
Alex Henrie alexhenrie24@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexhenrie24@gmail.com
--- Comment #3 from Alex Henrie alexhenrie24@gmail.com --- This sounds like a duplicate of bug 45199. If you can identify the function(s) that Visual Assist patches, we can add DECLSPEC_HOTPATCH to them to get it working.
https://bugs.winehq.org/show_bug.cgi?id=45213
--- Comment #4 from Zebediah Figura z.figura12@gmail.com --- Is this still necessary after https://source.winehq.org/git/wine.git/commitdiff/8f732c66ab37b54c30d63c74f7822ba1d4f04996 and https://source.winehq.org/git/wine.git/commitdiff/8039941c52758113955d376bd7b6b6e1e5b5f76c?
https://bugs.winehq.org/show_bug.cgi?id=45213
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Keywords| |download Summary|wine 3.7 can run VC + |Multiple applications using |visual assist, but wine 3.8 |Microsoft Detours library |can not. or maybe gcc |crash on startup after |version related |compiling Wine with GCC | |8.x+ and -O2 (GOT/PIC code | |emitted at function | |entry)(Microsoft Visual | |Studio 201x, Visual Assist | |plugin) Component|-unknown |build-env URL| |https://web.archive.org/web | |/20190501003029/http://down | |loadfiles.idera.com/WholeTo | |mato/VA_X_Setup2331_0.exe Resolution|--- |FIXED CC| |focht@gmx.net Fixed by SHA1| |8f732c66ab37b54c30d63c74f78 | |22ba1d4f04996
--- Comment #5 from Anastasius Focht focht@gmx.net --- Hello folks,
this is now fixed by following commits:
* https://source.winehq.org/git/wine.git/commitdiff/8f732c66ab37b54c30d63c74f7... ("makefiles: Build with -fno-PIC on i386.")
* https://source.winehq.org/git/wine.git/commitdiff/8039941c52758113955d376bd7... ("makefiles: Also pass -fPIC flag when linking.")
Thanks Zebediah and Alexandre.
And, yes it was indeed caused by GCC 8.x emitting GOT/PIC register load code at various function entries.
You didn't specify which version of the plugin and MS Visual Studio you used. Please *always* provide this information, it's important for reproducing/investigation.
I took MS Visual Studio 2010 and Visual Assist 10.9.x, assuming the same underlying issue is present with other versions as well.
https://web.archive.org/web/20190501003029/http://downloadfiles.idera.com/Wh...
In fact it's not only the plugin but also MS Visual Studio itself which hooks several registry APIs (advapi32.RegXXX), suffering from same problem.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE
$ WINEDEBUG=+loaddll,+process,+seh wine ./devenv.exe ... 00a1:trace:seh:raise_exception code=c0000005 flags=0 addr=0x7e9d20f1 ip=7e9d20f1 tid=00a1 00a1:trace:seh:raise_exception info[0]=00000000 00a1:trace:seh:raise_exception info[1]=6804c060 00a1:trace:seh:raise_exception eax=680460f0 ebx=0034f77c ecx=0034f518 edx=0034f758 esi=00000000 edi=00000000 00a1:trace:seh:raise_exception ebp=0034f508 esp=0034f4d0 cs=0023 ds=002b es=002b fs=0063 gs=006b flags=00010202 00a1:trace:seh:call_stack_handlers calling handler at 0x7903d7bf code=c0000005 flags=0 00a1:trace:seh:call_stack_handlers handler at 0x7903d7bf returned 1 00a1:trace:seh:call_stack_handlers calling handler at 0x7903d894 code=c0000005 flags=0 00a1:trace:seh:call_stack_handlers handler at 0x7903d894 returned 1 ... --- snip ---
Wine's advapi32.RegEnumKeyExW:
--- snip --- 7E9D20B0 E9 72F962B1 JMP 30001A27 ; trampoline -> does GOT/PIC load 7E9D20B5 05 4B5F0500 ADD EAX,55F4B ; continuation 7E9D20BA 8D4C24 04 LEA ECX,[ESP+4] 7E9D20BE 83E4 F0 AND ESP,FFFFFFF0 7E9D20C1 FF71 FC PUSH DWORD PTR DS:[ECX-4] 7E9D20C4 55 PUSH EBP 7E9D20C5 89E5 MOV EBP,ESP 7E9D20C7 57 PUSH EDI 7E9D20C8 56 PUSH ESI 7E9D20C9 53 PUSH EBX 7E9D20CA 51 PUSH ECX 7E9D20CB 83EC 28 SUB ESP,28 7E9D20CE 8B39 MOV EDI,DWORD PTR DS:[ECX] 7E9D20D0 8B71 04 MOV ESI,DWORD PTR DS:[ECX+4] 7E9D20D3 8B59 08 MOV EBX,DWORD PTR DS:[ECX+8] 7E9D20D6 8B51 14 MOV EDX,DWORD PTR DS:[ECX+14] 7E9D20D9 897D E4 MOV DWORD PTR SS:[EBP-1C],EDI 7E9D20DC 8B79 18 MOV EDI,DWORD PTR DS:[ECX+18] 7E9D20DF 8975 E0 MOV DWORD PTR SS:[EBP-20],ESI 7E9D20E2 8B71 10 MOV ESI,DWORD PTR DS:[ECX+10] 7E9D20E5 895D DC MOV DWORD PTR SS:[EBP-24],EBX 7E9D20E8 8B59 0C MOV EBX,DWORD PTR DS:[ECX+0C] 7E9D20EB 8955 D8 MOV DWORD PTR SS:[EBP-28],EDX 7E9D20EE 8B51 1C MOV EDX,DWORD PTR DS:[ECX+1C] 7E9D20F1 F680 705F0000 TEST BYTE PTR DS:[EAX+5F70],08 ; GOT data ref, *boom* ... --- snip ---
Like many other products/projects, a variant/fork of https://github.com/Microsoft/Detours seems to be used.
--- snip --- $ pwd /home/focht/.wine/drive_c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE
$ strings -e l devenv.exe | grep -i detour Adding detour rule %d: from HKLM Detour to HKCU Adding detour rule %d: from HKCU Detour rule to HKCU AppId stopped registry detouring AppId setting up registry detouring AppId starting registry detouring VsDetour: matched (%s): %s --- snip ---
--- quote --- Microsoft Research Detours Package
Detours is a software package for monitoring and instrumenting API calls on Windows. Detours has been used by many ISVs and is also used by product teams at Microsoft. Detours is now available under a standard open source license (MIT). This simplifies licensing for programmers using Detours and allows the community to support Detours using open source tools and processes. --- quote ---
I'm not resolving as dupe of bug 45199 here since the task to identify gazillion of win32 API to be "decorated" with DECLSPEC_HOTPATCH would have turned that ticket into an endless story meta-ticket = mess. Everyone would have joined in "me too", requesting "DECLSPEC_HOTPATCH for app X/game Y". Even more worse, later commits that inlined debug trace facility would have caused regressions again. Also that ticket has been listed in official release notes, cited in many Internet forums/blogs, specific commits cherry-picked to Wine stable branches etc. We don't want to alter/invalidate all that information retroactively.
I'm using this ticket to target the standard MS Detours lib/engine (including derivatives/forks) and resolve it here.
$ wine --version wine-4.7-66-g8039941c52
Regards
https://bugs.winehq.org/show_bug.cgi?id=45213
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bob.mt.wya@gmail.com
--- Comment #6 from Anastasius Focht focht@gmx.net --- *** Bug 45752 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=45213
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Multiple applications using |Multiple applications using |Microsoft Detours library |Microsoft Detours library |crash on startup after |crash on startup after |compiling Wine with GCC |compiling Wine with GCC |8.x+ and -O2 (GOT/PIC code |8.x+ and -O2 (GOT/PIC code |emitted at function |emitted at Win32 API |entry)(Microsoft Visual |entries)(Microsoft Visual |Studio 201x, Visual Assist |Studio 201x, Visual Assist |plugin) |plugin)
https://bugs.winehq.org/show_bug.cgi?id=45213
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.8.