[Bug 46195] New: Multiple Windows 10 ARM64 apps need ntdll ' set_cpu_context' implementation (Windows PowerShell Core 6.2)

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 25 11:38:27 CST 2018


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

            Bug ID: 46195
           Summary: Multiple Windows 10 ARM64 apps need ntdll
                    'set_cpu_context' implementation (Windows PowerShell
                    Core 6.2)
           Product: Wine
           Version: 3.21
          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,

continuation of bug 46194 ("Windows PowerShell Core 6.2 Preview 2 for ARM64
crashes due to decoding of instruction from incorrect PC (write watch access
causes SIGSEGV)")

--- snip ---
$ WINEDEBUG=+seh,+loaddll,+virtual wine64 ./pwsh.exe
...
0009:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff (nil) 003a0000
202000 00000004
0009:trace:virtual:map_view got mem in reserved area 0x18f50000-0x192f0000
0009:trace:virtual:VIRTUAL_DumpView View: 0x18f50000 - 0x192effff (valloc)
0009:trace:virtual:VIRTUAL_DumpView       0x18f50000 - 0x192effff -Hrw-
0009:trace:virtual:NtAllocateVirtualMemory 0xffffffffffffffff 0x18f50000
00090168 1000 00000004
0009:trace:virtual:VIRTUAL_DumpView View: 0x18f50000 - 0x192effff (valloc)
0009:trace:virtual:VIRTUAL_DumpView       0x18f50000 - 0x18fe0fff cHrw-
0009:trace:virtual:VIRTUAL_DumpView       0x18fe1000 - 0x192effff -Hrw-
0009:fixme:seh:set_cpu_context Not implemented on ARM64
0009:trace:seh:raise_exception code=c0000005 flags=0 addr=0x18f50000
pc=18f50000 tid=0009
0009:trace:seh:raise_exception  info[0]=0000000000000000
0009:trace:seh:raise_exception  info[1]=0000000018f50000
0009:trace:seh:raise_exception  x0=0000000018f4e1a0 x1=000000007bd4bde8
x2=0000000000000000 x3=0000000000000000
0009:trace:seh:raise_exception  x4=000000007bd4bde8 x5=000000007bd4bdb0
x6=0000007f85574f10 x7=206465746e656d65
0009:trace:seh:raise_exception  x8=0000000000f50000 x9=00000000000007a8
x10=0000000094cfbed4 x11=0000000007ffffff
0009:trace:seh:raise_exception  x12=0000000000000000 x13=0000000018f50040
x14=ffffffffffffffc8 x15=000000007bd2da70
0009:trace:seh:raise_exception  x16=000000007bd2e008 x17=0000007f8560bdc0
x18=000000007ffd8000 x19=0000007f855f9978
0009:trace:seh:raise_exception  x20=000000000000c000 x21=00000000002ad9d8
x22=00000000ffffffff x23=00000000ffffffff
0009:trace:seh:raise_exception  x24=0000000000000000 x25=0000000018f50040
x26=0000000000000001 x27=000000007bd2da70
0009:trace:seh:raise_exception  x28=000000007bd2e010 fp=0000000000400003
lr=0000000018f50000 sp=00000000002ad690
0009:trace:seh:raise_exception  pc=0000000018f50000
0009:trace:seh:call_vectored_handlers calling handler at 0x5e4550 code=c0000005
flags=0
0009:trace:seh:call_vectored_handlers handler at 0x5e4550 returned 0
0009:trace:seh:call_stack_handlers calling handler at 0x7b4dd704 code=c0000005
flags=0
...
0009:err:eventlog:ReportEventW L"Application: pwsh.exe\nCoreCLR Version:
4.6.26919.2\nDescription: The process was terminated due to an unhandled
exception.\nException Info: exception code c0000005, exception address
0000000018F50000\nStack:\n"
0009:fixme:advapi:DeregisterEventSource (0xcafe4242) stub
wine: Unhandled page fault on read access to 0x18f50000 at address 0x18f50000
(thread 0009), starting debugger...
...
0009:trace:seh:call_stack_handlers handler at 0x7b4dd704 returned 1
Unhandled exception: page fault on read access to 0x18f50000 in 64-bit code
(0x0000000018f50000).
Register dump:
ARM64 EL0t Mode
 Pc:0000000018f50000 Sp:00000000002ad690 Lr:0000000018f50000
Cpsr:80000000(N---)
 x0: 0000000018f4e1a0 x1: 000000007bd4bde8 x2: 0000000000000000 x3:
0000000000000000 x4: 000000007bd4bde8
 x5: 000000007bd4bdb0 x6: 0000007f85574f10 x7: 206465746e656d65 x8:
0000000000f50000 x9: 00000000000007a8
 x10:0000000094cfbed4 x11:0000000007ffffff x12:0000000000000000
x13:0000000018f50040 x14:ffffffffffffffc8
 x15:000000007bd2da70 ip0:000000007bd2e008 ip1:0000007f8560bdc0
x18:000000007ffd8000 x19:0000007f855f9978
 x20:000000000000c000 x21:00000000002ad9d8 x22:00000000ffffffff
x23:00000000ffffffff x24:0000000000000000
 x25:0000000018f50040 x26:0000000000000001 x27:000000007bd2da70
x28:000000007bd2e010 Fp:0000000000400003
...
Backtrace:
=>0 0x0000000018f50000 (0x0000000000400003)
0x0000000018f50000: be_arm64_disasm_one_insn: not done

Modules:
Module    Address                    Debug info    Name (65 modules)
PE              3d0000-          45d000    Deferred        hostpolicy
PE              570000-          ac8000    Deferred        coreclr
ELF            7b400000-        7b82e000    Deferred        kernel32<elf>
  \-PE            7b420000-        7b82e000    \               kernel32
ELF            7bc00000-        7bd4d000    Deferred        ntdll<elf>
  \-PE            7bc20000-        7bd4d000    \               ntdll
ELF            7c000000-        7c004000    Deferred        <wine-loader>
PE           140000000-       140041000    Deferred        pwsh
PE           180000000-       18005d000    Deferred        hostfxr
...
ELF          7f8573d000-      7f858f9000    Dwarf           libwine.so.1
ELF          7f858fb000-      7f8592d000    Deferred       
ld-linux-aarch64.so.1
ELF          7f8592e000-      7f8592f000    Deferred        [vdso].so
Threads:
process  tid      prio (all id:s are in hex)
00000008 (D) Z:\home\focht\projects\woa-winrt\powershell620-arm64\pwsh.exe
    0000002a    0
    00000009    0 <==
...
System information:
    Wine build: wine-3.21-4-gfc4d5d49c6
    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/signal_arm64.c#l224

https://source.winehq.org/git/wine.git/blob/HEAD:/dlls/ntdll/signal_arm64.c#l460

'raise_segv_exception' needs it to resume execution at faulting instruction in
case of write watch access. Of course it will be needed for various other
use-cases in future too.

$ sha1sum PowerShell-6.2.0-preview.2-win-arm64.zip 
731bf722a0083fbd101598fa42c9f1a0170d6548 
PowerShell-6.2.0-preview.2-win-arm64.zip

$ du -sh PowerShell-6.2.0-preview.2-win-arm64.zip 
40M    PowerShell-6.2.0-preview.2-win-arm64.zip

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