[Bug 46126] New: Provide more exception context information in ARM64 implementation of raise_exception ()

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Nov 11 07:36:34 CST 2018


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

            Bug ID: 46126
           Summary: Provide more exception context information in ARM64
                    implementation of raise_exception()
           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.

Currently the diagnosis via tracing is very limited because the exception code,
exception address and register context is not dumped at all.

Example:

--- snip ---
$ WINEDEBUG=+seh,+loaddll,+process wine64 ./vlc.exe
...
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\video_output\\libyuv_plugin.dll"
at 0x85d0000: native
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\video_splitter\\libclone_plugin.dll"
at 0x85f0000: native
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\video_splitter\\libpanoramix_plugin.dll"
at 0x8600000: native
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\video_splitter\\libwall_plugin.dll"
at 0x8610000: native
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\visualization\\libgoom_plugin.dll"
at 0x8630000: native
0009:trace:loaddll:load_native_dll Loaded
L"Z:\\home\\focht\\projects\\woa-winrt\\vlc-4.0.0-dev\\plugins\\visualization\\libvisual_plugin.dll"
at 0x8680000: native
0009:trace:seh:raise_exception  info[0]=0000000000000031
0009:trace:seh:raise_exception  info[1]=0000000000078490
0009:trace:seh:call_vectored_handlers calling handler at 0x46b1540
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x46b1540 returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x2e72e60
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x2e72e60 returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x1fe64fc
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x1fe64fc returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x33c1c8 code=40010006
flags=0
0009:trace:seh:call_vectored_handlers handler at 0x33c1c8 returned 0
0009:trace:seh:call_stack_handlers calling handler at 0x7b4b4888 code=40010006
flags=0
0009:fixme:seh:RtlUnwind Not implemented on ARM64
0009:trace:process:NtQueryInformationProcess
(0xffffffffffffffff,0x0000000c,0x22eb8c,0x00000004,(nil))
0009:trace:process:NtQueryInformationProcess
(0xffffffffffffffff,0x0000000c,0x22eb8c,0x00000004,(nil))
0009:trace:seh:raise_exception  info[0]=0000000000000054
0009:trace:seh:raise_exception  info[1]=0000000000078490
0009:trace:seh:call_vectored_handlers calling handler at 0x46b1540
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x46b1540 returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x2e72e60
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x2e72e60 returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x1fe64fc
code=40010006 flags=0
0009:trace:seh:call_vectored_handlers handler at 0x1fe64fc returned 0
0009:trace:seh:call_vectored_handlers calling handler at 0x33c1c8 code=40010006
flags=0
0009:trace:seh:call_vectored_handlers handler at 0x33c1c8 returned 0
0009:trace:seh:call_stack_handlers calling handler at 0x7b4b4888 code=40010006
flags=0
0009:fixme:seh:RtlUnwind Not implemented on ARM64
...
--- snip ---

Wine source:

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

--- snip ---
 540 static NTSTATUS raise_exception( EXCEPTION_RECORD *rec, CONTEXT *context,
BOOL first_chance )
 541 {
 542     NTSTATUS status;
 543 
 544     if (first_chance)
 545     {
 546         DWORD c;
 547 
 548         for (c = 0; c < rec->NumberParameters; c++)
 549             TRACE( " info[%d]=%016lx\n", c, rec->ExceptionInformation[c]
);
 550         if (rec->ExceptionCode == EXCEPTION_WINE_STUB)
 551         {
 552             if (rec->ExceptionInformation[1] >> 16)
 553                 MESSAGE( "wine: Call from %p to unimplemented function
%s.%s, aborting\n",
 554                          rec->ExceptionAddress,
 555                          (char*)rec->ExceptionInformation[0],
(char*)rec->ExceptionInformation[1] );
 556             else
 557                 MESSAGE( "wine: Call from %p to unimplemented function
%s.%ld, aborting\n",
 558                          rec->ExceptionAddress,
 559                          (char*)rec->ExceptionInformation[0],
rec->ExceptionInformation[1] );
 560         }
 561         else
 562         {
 563             /* FIXME: dump context */
 564         }
 565 
 566         status = send_debug_event( rec, TRUE, context );
 567         if (status == DBG_CONTINUE || status == DBG_EXCEPTION_HANDLED)
 568             return STATUS_SUCCESS;
 569 
 570         if (call_vectored_handlers( rec, context ) ==
EXCEPTION_CONTINUE_EXECUTION)
 571             return STATUS_SUCCESS;
 572 
 573         if ((status = call_stack_handlers( rec, context )) !=
STATUS_UNHANDLED_EXCEPTION)
 574             return status;
 575     }
 576 
 577     /* last chance exception */
 578 
 579     status = send_debug_event( rec, FALSE, context );
 580     if (status != DBG_CONTINUE)
 581     {
 582         if (rec->ExceptionFlags & EH_STACK_INVALID)
 583             ERR("Exception frame is not in stack limits => unable to
dispatch exception.\n");
 584         else if (rec->ExceptionCode == STATUS_NONCONTINUABLE_EXCEPTION)
 585             ERR("Process attempted to continue execution after
noncontinuable exception.\n");
 586         else
 587             ERR("Unhandled exception code %x flags %x addr %p\n",
 588                 rec->ExceptionCode, rec->ExceptionFlags,
rec->ExceptionAddress );
 589         NtTerminateProcess( NtCurrentProcess(), rec->ExceptionCode );
 590     }
 591     return STATUS_SUCCESS;
 592 }
--- snip ---

--- snip ---
System information:
    Wine build: wine-3.20-7-ga0a7090301
    Platform: arm64
    Version: Windows 7
    Host system: Linux
    Host version: 4.18.14-yocto-standard 
--- snip ---

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