[Bug 46143] New: Multiple Windows 10 ARM64 apps crash due to unimplemented function ntdll.dll.RtlAddFunctionTable (and friends)

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Nov 13 14:53:46 CST 2018


https://bugs.winehq.org/show_bug.cgi?id=46143

            Bug ID: 46143
           Summary: Multiple Windows 10 ARM64 apps crash due to
                    unimplemented function ntdll.dll.RtlAddFunctionTable
                    (and friends)
           Product: Wine
           Version: 3.20
          Hardware: aarch64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ntdll
          Assignee: wine-bugs at winehq.org
          Reporter: focht at gmx.net
      Distribution: ---

Hello folks,

as it says.

NOTE: Some apps need patched Linux kernel due to bug 46132 ("Multiple Windows
10 ARM64 apps crash with illegal instruction fault due to access of ARMv8 PMU
cycle counter via 'PMCCNTR_EL0' register in EL0 (Linux kernel disallows access
by default)") to come that far.

--- snip ---
$ WINEDEBUG=+seh,+loaddll,+process wine64 ./gatherosstate.exe
...
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\win10apps\\arm64\\gatherosstate.exe" at
0x140000000: native
0009:trace:loaddll:load_builtin_dll Loaded L"C:\\windows\\system32\\msvcrt.dll"
at 0x7f838d0000: builtin
0009:trace:loaddll:load_builtin_dll Loaded
L"C:\\windows\\system32\\advapi32.dll" at 0x7f83720000: builtin
0009:trace:process:NtQueryInformationProcess
(0xffffffffffffffff,0x00000007,0x22f988,0x00000008,(nil))
0009:trace:seh:raise_exception  info[0]=000000014009485e
0009:trace:seh:raise_exception  info[1]=0000000140094802
wine: Call from 0x7bcd0104 to unimplemented function
ntdll.dll.RtlAddFunctionTable, aborting
0009:trace:seh:call_stack_handlers calling handler at 0x7b4d6330 code=80000100
flags=1
wine: Unimplemented function ntdll.dll.RtlAddFunctionTable called at address
0x7bcd0104 (thread 0009), starting debugger...
0009:trace:seh:start_debugger Starting debugger "winedbg --auto 8 36"
...
Unhandled exception: unimplemented function ntdll.dll.RtlAddFunctionTable
called in 64-bit code (0x000000007bcd0104).
Register dump:
ARM64 EL0t Mode
 Pc:000000007bcd0104 Sp:000000000022f440 Lr:000000007bcd22e8
Cpsr:60000000(-ZC-)
 x0: 000000000022f468 x1: 000000000022f840 x2: 0000000000000001 x3:
0000000000000008 x4: 0000007f83abc360
 x5: 000000007bd44b78 x6: 000000007bd44b8c x7: 0000000000001000 x8:
000000000022f468 x9: 000000000022f468
 x10:0000000000000002 x11:000000000022f840 x12:000000000022f820
x13:0000000000131000 x14:0000000000000000
 x15:000000000022f000 ip0:000000007bc91f38 ip1:0000007f83f48860
x18:000000007ffd8000 x19:0000000000000000
 x20:0000000000000000 x21:0000000000350000 x22:000000007b4eaedb
x23:000000007b825364 x24:000000007b4eaeee
 x25:000000007b4eaf22 x26:000000007b4eaf38 x27:000000007b4ee926
x28:000000007b4a2b60 Fp:000000000022f810
...
Backtrace:
=>0 0x000000007bcd0104 RtlCaptureContext+0xa4() in ntdll (0x000000000022f810)
  1 0x000000007bcd22e8 RtlRaiseException+0x33(rec=0x22f820)
[/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_arm64.c:976] in ntdll
(0x000000000022f810)
  2 0x000000007bcd22e8 RtlRaiseException+0x33(rec=0x14002f75c)
[/home/focht/projects/wine/mainline-src/dlls/ntdll/signal_arm64.c:976] in ntdll
(0x000000000022f8d0)
  3 0x000000007bc91fa4 stub_entry_point+0x6b(dll=*** invalid address
0xffff9dc735768103 ***, name=*** invalid address 0x880200802 ***,
ret_addr=0x0(nil))
[/home/focht/projects/wine/mainline-src/dlls/ntdll/loader.c:231] in ntdll
(0x000000000022f910)
  4 0x000000014002f75c in gatherosstate (+0x2f75b) (0x000000000022f940)
  5 0x000000014002fc30 in gatherosstate (+0x2fc2f) (0x000000000022f940)
0x000000007bcd0104 RtlCaptureContext+0xa4 in ntdll: be_arm64_disasm_one_insn:
not done

Modules:
Module    Address                    Debug info    Name (20 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-       140099000    Export          gatherosstate
...
ELF          7f83f79000-      7f84134000    Dwarf           libwine.so.1
ELF          7f84136000-      7f84168000    Deferred       
ld-linux-aarch64.so.1
ELF          7f84169000-      7f8416a000    Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) Z:\home\focht\projects\woa-winrt\win10apps\arm64\gatherosstate.exe
    00000009    0 <==
...
System information:
    Wine build: wine-3.20-41-gbae592cc96
    Platform: arm64
    Version: Windows 7
    Host system: Linux
    Host version: 4.18.14-yocto-standard
--- snip ---

Wine source:

https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/ntdll.spec#l436

--- snip ---
 436 @ cdecl -arch=arm,x86_64 RtlAddFunctionTable(ptr long long)
...
 546 @ cdecl -arch=arm,x86_64 RtlDeleteFunctionTable(ptr)
...
 780 @ stdcall -arch=arm,x86_64 RtlLookupFunctionEntry(long ptr ptr)
--- snip ---

Some more pointers:

https://docs.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions?view=vs-2017

https://docs.microsoft.com/en-us/cpp/build/arm64-exception-handling?view=vs-2017

https://wpdev.uservoice.com/forums/110705-universal-windows-platform/suggestions/33364435-rtladdfunctiontable-and-friends

Regards

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list