http://bugs.winehq.org/show_bug.cgi?id=32991
Bug #: 32991 Summary: ARM port of "WabbitEMU" crashes due to unimplemented function KERNEL32.dll.RtlUnwindEx (no ntdll forward on arch=arm) Product: Wine Version: 1.5.24 Platform: arm OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: focht@gmx.net Classification: Unclassified
Hello folks,
the ARM port of "WabbitEMU", a Texas Instruments graphing calculator emulator and dev tools crashes after clicking "Browse for a ROM image" radio button in image selection dialog.
Download: http://forum.xda-developers.com/showpost.php?p=37928562
(main thread: http://forum.xda-developers.com/showthread.php?t=2092348)
--- snip --- $ WINEDEBUG=+tid,+seh,+relay wine ./Wabbitemu.exe ... 0024:Call user32.GetWindowTextA(00010096,40a0ebf0,00000104) ret=00439fa5 0024:Call window proc 0x40bc5f30 (hwnd=0x10096,msg=WM_GETTEXT,wp=00000104,lp=40a0ebf0) 0024:Ret window proc 0x40bc5f30 (hwnd=0x10096,msg=WM_GETTEXT,wp=00000104,lp=40a0ebf0) retval=00000000 0024:Ret user32.GetWindowTextA() retval=00000000 ret=00439fa5 0024:Call KERNEL32.GetLastError() ret=004141cf 0024:Ret KERNEL32.GetLastError() retval=00000000 ret=004141cf 0024:trace:seh:raise_exception info[0]=0047be54 0024:trace:seh:raise_exception info[1]=0047cc8e wine: Call from 0x7bc9a630 to unimplemented function KERNEL32.dll.RtlUnwindEx, aborting 0024:trace:seh:call_stack_handlers calling handler at 0x7bcb8d88 code=80000100 flags=1 0024:Call KERNEL32.UnhandledExceptionFilter(40a0e81c) ret=7bcb8df0 --- snip ---
The app is importing all win32 API by name so it's the real thing :-)
+module,+imports
--- snip --- ... 0009:trace:module:load_dll looking for L"KERNEL32.dll" in L"Z:\home\linaro\wine-apps\wabbitemu;.;C:\windows\system32;C:\windows\system;C:\windows;C:\windows\system32;C:\windows;C:\windows\system32\wbem" 0009:trace:module:load_dll Found L"C:\windows\system32\KERNEL32.dll" for L"KERNEL32.dll" at 0x7b820000, count=19 0009:warn:module:import_dll No implementation for KERNEL32.dll.RtlUnwindEx imported from L"Z:\home\linaro\wine-apps\wabbitemu\Wabbitemu.exe", setting to 0x41820000 0009:trace:imports:import_dll --- RtlUnwindEx KERNEL32.dll.1209 = 0x41820000 0009:trace:imports:import_dll --- GetCommandLineA KERNEL32.dll.481 = 0x7b846be0 0009:trace:imports:import_dll --- RtlPcToFileHeader KERNEL32.dll.1205 = 0x7bc69188 0009:warn:module:import_dll No implementation for KERNEL32.dll.RtlLookupFunctionEntry imported from L"Z:\home\linaro\wine-apps\wabbitemu\Wabbitemu.exe", setting to 0x41820024 0009:trace:imports:import_dll --- RtlLookupFunctionEntry KERNEL32.dll.1203 = 0x41820024 0009:trace:imports:import_dll --- GetModuleFileNameW KERNEL32.dll.634 = 0x7b86b864 ... --- snip ---
It also needs KERNEL32.dll.RtlLookupFunctionEntry later. Wine forwards both to ntdll but only on arch=x86_64.
It seems Windows RT exposes both API. Interestingly only the MSDN page for KERNEL32.dll.RtlLookupFunctionEntry gives a hint about this: http://msdn.microsoft.com/en-us/library/windows/desktop/ms680597%28v=vs.85%2... ("ARM Definition").
Regards
http://bugs.winehq.org/show_bug.cgi?id=32991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download URL| |http://forum.xda-developers | |.com/showpost.php?p=3792856 | |2
http://bugs.winehq.org/show_bug.cgi?id=32991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ARM port of "WabbitEMU" |ARM port of "WabbitEMU" |crashes due to |crashes due to |unimplemented function |unimplemented function |KERNEL32.dll.RtlUnwindEx |KERNEL32.dll.RtlUnwindEx |(no ntdll forward on | |arch=arm) |
--- Comment #1 from Anastasius Focht focht@gmx.net 2013-02-16 16:27:15 CST --- Hello again,
needs ntdll.dll RtlUnwindEx implementation for ARM first ;-)
Regards
http://bugs.winehq.org/show_bug.cgi?id=32991
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Depends on| |31487
http://bugs.winehq.org/show_bug.cgi?id=32991
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks| |33194
http://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #2 from André H. nerv@dawncrow.de 2013-08-20 17:13:59 CDT --- An RtlUnwindEx implementation depends on knowledge of the unwind_data structure
I already tried to understand it and documented my findings in 18c95cf165a09ee0fe77f431ec31a5b101affd15 and 3c04958b8a47f56a6dfc9ac067ca88f34a4e29a2
It would help if someone would dig some deeper here (without disassembling ms code of course) or would tell me when there's something like http://msdn.microsoft.com/en-us/library/ddssxxy8.aspx for ARM
http://bugs.winehq.org/show_bug.cgi?id=32991
Bug 32991 depends on bug 31487, which changed state.
Bug 31487 Summary: kernel32.dll.InitOnceExecuteOnce needed for several MS installer (Office2013 / Windows Essentials 2012 / .NET Framework 4.5 / Skydrive / ARM Applications) http://bugs.winehq.org/show_bug.cgi?id=31487
What |Old Value |New Value ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #3 from André H. nerv@dawncrow.de --- Further reading: 9006dcb059e40452b4a35c4c553b8425c941f998
---------------------------------------------------------
bochs from shinysurface.com is also effected, click Start, it then can't find an image (as long as you have none), choose continue, click OK, crash
https://bugs.winehq.org/show_bug.cgi?id=32991
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mmediouni@gmx.fr
--- Comment #4 from Austin English austinenglish@gmail.com --- *** Bug 38461 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #5 from MY123 mmediouni@gmx.fr --- working on it... (RE phase currently)
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #6 from MY123 mmediouni@gmx.fr --- Created attachment 51701 --> https://bugs.winehq.org/attachment.cgi?id=51701 What is on MSDN
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #7 from MY123 mmediouni@gmx.fr --- (In reply to André H. from comment #3)
Further reading: 9006dcb059e40452b4a35c4c553b8425c941f998
bochs from shinysurface.com is also effected, click Start, it then can't find an image (as long as you have none), choose continue, click OK, crash
I hope that the info that I found is useful.
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #8 from Nikolay Sivov bunglehead@gmail.com --- (In reply to MY123 from comment #6)
Created attachment 51701 [details] What is on MSDN
Please don't paste this material. All that info is available through PSDK.
https://bugs.winehq.org/show_bug.cgi?id=32991
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ARM port of "WabbitEMU" |ARM port of "WabbitEMU" |crashes due to |crashes due to |unimplemented function |unimplemented function |KERNEL32.dll.RtlUnwindEx |ntdll.dll.RtlUnwindEx
https://bugs.winehq.org/show_bug.cgi?id=32991
Saulius K. saulius2@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |saulius2@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=32991
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ARM port of "WabbitEMU" |ARM port of "WabbitEMU" |crashes due to |needs ntdll.dll.RtlUnwindEx |unimplemented function |implementation |ntdll.dll.RtlUnwindEx |
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #9 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present.
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/ntdll.spec#l953
--- snip --- 952 @ stdcall -norelay RtlUnwind(ptr ptr ptr ptr) 953 @ stdcall -arch=x86_64 RtlUnwindEx(ptr ptr ptr ptr ptr ptr) --- snip ---
https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/signal_arm64.c#...
$ wine --version wine-3.13
Regards
https://bugs.winehq.org/show_bug.cgi?id=32991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|ARM port of "WabbitEMU" |32-bit/64-bit Windows on |needs ntdll.dll.RtlUnwindEx |ARM applications need |implementation |ntdll.dll.RtlUnwindEx | |implementation
--- Comment #10 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting, still present for both, 32-bit and 64-bit ARM targets.
'rc.exe' from Windows 10 SDK (10.0.17763.x)
Download: https://software-download.microsoft.com/download/pr/17763.1.180914-1434.rs5_...
--- snip --- $ WINEDEBUG=+seh,+loaddll,+process wine64 ./rc.exe --help ... 0037:trace:loaddll:load_native_dll Loaded L"Z:\home\focht\Downloads\win10sdk_arm64\arm64\rc.exe" at 0x140000000: native ... 0037:trace:loaddll:load_native_dll Loaded L"Z:\home\focht\Downloads\win10sdk_arm64\arm64\RCDLL.dll" at 0x180000000: native ... fatal error RC1106: invalid option: --help 0037:trace:seh:raise_exception info[0]=000000018005cdc6 0037:trace:seh:raise_exception info[1]=000000018005c996 wine: Call from 0x7bccff04 to unimplemented function KERNEL32.dll.RtlUnwindEx, aborting 0037:trace:seh:call_stack_handlers calling handler at 0x7b4d6330 code=80000100 flags=1 wine: Unimplemented function KERNEL32.dll.RtlUnwindEx called at address 0x7bccff04 (thread 0037), starting debugger... ... Unhandled exception: unimplemented function KERNEL32.dll.RtlUnwindEx called in 64-bit code (0x000000007bccff04). Register dump: ARM64 EL0t Mode Pc:000000007bccff04 Sp:000000000022db40 Lr:000000007bcd20e8 Cpsr:20000000(--C-) x0: 000000000022db68 x1: 000000000022df40 x2: 0000000000000001 x3: 0000000000000001 x4: 000000000022e080 x5: 0000000000000000 x6: 0000000000000000 x7: 0000000000000000 x8: 000000000022db68 x9: 000000000022db68 x10:0000000000000002 x11:000000000022df40 x12:000000000022df20 x13:0000000000000001 x14:0000000000000000 x15:000000007bd31650 ip0:000000007bc91dc0 ip1:ffffc935794504de x18:000000007ffd8000 x19:0000000000000001 x20:000000018007c9a0 x21:000000018005f000 x22:0000000000240330 x23:0000000000000000 x24:000000018006a9c8 x25:000000000001ecb8 x26:000000000022e4d0 x27:000000018007ca60 x28:000000007b4a2b60 Fp:000000000022df10 ... Backtrace: =>0 0x000000007bccff04 RtlCaptureContext+0xa4() in ntdll (0x000000000022df10) 1 0x000000007bcd20e8 RtlRaiseException+0x33(rec=0x22df20) [/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_arm64.c:976] in ntdll (0x000000000022df10) 2 0x000000007bcd20e8 RtlRaiseException+0x33(rec=0x18003e5d4) [/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_arm64.c:976] in ntdll (0x000000000022dfd0) 3 0x000000007bc91e2c stub_entry_point+0x6b(dll=*** invalid address 0xffffc935794504de ***, name="HeapDestroy", ret_addr=0x7b824dd8) [/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:231] in ntdll (0x000000000022e420) 4 0x000000018003e5d4 in rcdll (+0x3e5d3) (0x000000000022e430) 5 0x000000018002febc in rcdll (+0x2febb) (0x000000000022e430) 0x000000007bccff04 RtlCaptureContext+0xa4 in ntdll: be_arm64_disasm_one_insn: not done
Modules: Module Address Debug info Name (41 modules) ELF 7b400000- 7b826000 Deferred kernel32<elf> -PE 7b420000- 7b826000 \ kernel32 ELF 7bc00000- 7bd45000 Dwarf ntdll<elf> -PE 7bc20000- 7bd45000 \ ntdll ELF 7c000000- 7c004000 Deferred <wine-loader> PE 140000000- 140014000 Deferred rc PE 180000000- 180094000 Export rcdll ELF 7fb3e81000- 7fb3ef6000 Deferred libgmp.so.10 ... ELF 7fb5268000- 7fb5297000 Deferred ld-linux-aarch64.so.1 ELF 7fb5298000- 7fb5299000 Deferred [vdso].so Threads: process tid prio (all id:s are in hex) ... 00000036 (D) Z:\home\focht\Downloads\win10sdk_arm64\arm64\rc.exe 00000037 0 <== System information: Wine build: wine-3.19-117-g4852130c82 Platform: arm64 Version: Windows 8.1 Host system: Linux Host version: 4.14.67-yocto-standard --- snip ---
$ sha1sum 17763.1.180914-1434.rs5_release_WindowsSDK.iso e702b5e5f2597d01eaee1eb1be7a34b0da0b6211 17763.1.180914-1434.rs5_release_WindowsSDK.iso
$ du -sh 17763.1.180914-1434.rs5_release_WindowsSDK.iso 815M 17763.1.180914-1434.rs5_release_WindowsSDK.iso
Regards
https://bugs.winehq.org/show_bug.cgi?id=32991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|32-bit/64-bit Windows on |win32-arm applications need |ARM applications need |ntdll.dll.RtlUnwindEx |ntdll.dll.RtlUnwindEx |implementation for |implementation |exception | |handling/unwinding
--- Comment #11 from Anastasius Focht focht@gmx.net --- Hello folks,
revisiting. The support for win64/arm64 was added in https://source.winehq.org/git/wine.git/commitdiff/9220772d28c6c10051626dbf46... ("ntdll: Add RtlUnwindEx spec entry for ARM64."), part of Wine 4.15 release.
Thanks André
For armv7 PE32 executables this is still missing. The app 'WabbitEMU' from XDA developers forum actually starts and displays a configuration dialog now without a crash on the target - progress. It will definitely hit the unimplemented stub as soon as exception handling/unwinding is involved as part of whatever error handling. Not sure how to trigger that now ;-)
Stable link via Internet Archive:
https://web.archive.org/web/20200524191508/https://dl.xda-cdn.com/1/7/2/5/6/...
--- snip --- $ uname -a Linux hikey960 4.20.0-rc4+ #1 SMP PREEMPT Mon Dec 3 12:01:56 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux
$ WINEDEBUG=+seh,+relay,+module,+loaddll wine ./Wabbitemu.exe >>log.txt 2>&1 ... 0024:trace:module:load_dll looking for L"KERNEL32.dll" in L"E:\home\focht\projects;C:\windows\system32;C:\windows\system;C:\windows;.;C:\windows\system32;C:\windows;C:\windows\system32\wbem;C:\windows\system32\WindowsPowershell\v1.0" 0024:trace:module:load_dll Found L"C:\windows\system32\kernel32.dll" for L"KERNEL32.dll" at 0x7fbf0000, count=23 0024:warn:module:import_dll No implementation for KERNEL32.dll.RtlUnwindEx imported from L"E:\home\focht\projects\Wabbitemu.exe", setting to 0x80140000 ... --- snip ---
https://source.winehq.org/git/wine.git/blob/056c9df854817670dc4fb9c095cba29c...
--- snip --- 1018 @ stdcall -arch=arm64,x86_64 RtlUnwindEx(ptr ptr ptr ptr ptr ptr) --- snip ---
--- snip --- $ file Wabbitemu.exe Wabbitemu.exe: PE32 executable (GUI) ARMv7 Thumb, for MS Windows
$ winedump -j import Wabbitemu.exe Contents of Wabbitemu.exe: 2574336 bytes
... offset 00079bf8 KERNEL32.dll Hint/Name Table: 0007AD34 TimeDateStamp: 00000000 (Thu Jan 1 01:00:00 1970) ForwarderChain: 00000000 First thunk RVA: 0006A04C Thunk Ordn Name 0006a04c 1209 RtlUnwindEx 0006a050 481 GetCommandLineA 0006a054 1205 RtlPcToFileHeader 0006a058 1203 RtlLookupFunctionEntry ... --- snip ---
Although Windows RT is dead for a good while, the XDA developers community still does ports of apps to ARMv7 which could be useful for testing.
$ sha1sum Wabbitemu.zip 1fce55d4e297db6c67545767ad60f2dc88ed597a Wabbitemu.zip
$ du -sh Wabbitemu.zip 1.7M Wabbitemu.zip
$ wine --version wine-5.9
Regards
https://bugs.winehq.org/show_bug.cgi?id=32991
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Blocks|33194 | URL|http://forum.xda-developers |https://web.archive.org/web |.com/showpost.php?p=3792856 |/20210128101136/https://for |2 |um.xda-developers.com/attac | |hments/wabbitemu-zip.172569 | |7/ Depends on|31487 |
https://bugs.winehq.org/show_bug.cgi?id=32991
David Paradis david.paradis@us.abb.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |david.paradis@us.abb.com
--- Comment #12 from David Paradis david.paradis@us.abb.com --- I am looking to see if this issue has been address with Wine 6.0.2. I currently am running 4.12.1 on several hundred remote devices and and having issues with my device when doing a "throw anyclass" and having that exception be treated as unhandled and ultimately crashing my application.
This week I ran a test to download the 6.0.2 sources and build it for my ARM32 device and rebuilt all of the sources just to run into the same issue. This is a very large problem for me as I am integrating a third parties sources into my project and that code uses exception handling for code flow and I would like to avoid modifying that code if I can help it.
I have a very simple exception handling test program that I write that contains the following code:
<code> #include "pch.h" #include <iostream> #include <stdio.h>
class myexcep { public: myexcep(int i) { my = i; }
int my; };
void killit() { throw myexcep(1); }
int main() { try { std::cout << "Calling the kill" << std::endl; killit(); } catch (...) { std::cout << "We are all good" << std::endl; } std::cout << "Hello World!\n"; } </code>
I have looked at the ntdll spec file and see that the entry for the RtlUnwindEx is still not implemented for ARM32. Is there any chance this is going to be fixed.
Thank you for any assistance with this issue. David Paradis
https://bugs.winehq.org/show_bug.cgi?id=32991
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Fixed by SHA1| |bdb3608811808e41c505c46d839 | |7ee0101779eb0 Resolution|--- |FIXED
--- Comment #13 from André H. nerv@dawncrow.de --- This indeed should be fixed in wine 6.22, please try with that version and open a new bug report for new issues.
https://bugs.winehq.org/show_bug.cgi?id=32991
--- Comment #14 from David Paradis david.paradis@us.abb.com --- (In reply to André H. from comment #13)
This indeed should be fixed in wine 6.22, please try with that version and open a new bug report for new issues.
Thank you Andre. I will download and and try this release and make sure that it is has been addressed.
https://bugs.winehq.org/show_bug.cgi?id=32991
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #15 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 6.23.