Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
bd02a82d
Commit
bd02a82d
authored
Nov 26, 2020
by
Daniel Lehman
Committed by
Alexandre Julliard
Dec 01, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle 64-bit addresses in +seh traces on x64.
Signed-off-by:
Daniel Lehman
<
dlehman25@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
63de9483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+20
-20
No files found.
dlls/ntdll/signal_x86_64.c
View file @
bd02a82d
...
...
@@ -241,11 +241,11 @@ static void dump_scope_table( ULONG64 base, const SCOPE_TABLE *table )
TRACE
(
"scope table at %p
\n
"
,
table
);
for
(
i
=
0
;
i
<
table
->
Count
;
i
++
)
TRACE
(
" %u: %
lx-%lx handler %lx target %lx
\n
"
,
i
,
base
+
table
->
ScopeRecord
[
i
].
BeginAddress
,
base
+
table
->
ScopeRecord
[
i
].
EndAddress
,
base
+
table
->
ScopeRecord
[
i
].
HandlerAddress
,
base
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
TRACE
(
" %u: %
p-%p handler %p target %p
\n
"
,
i
,
(
char
*
)
base
+
table
->
ScopeRecord
[
i
].
BeginAddress
,
(
char
*
)
base
+
table
->
ScopeRecord
[
i
].
EndAddress
,
(
char
*
)
base
+
table
->
ScopeRecord
[
i
].
HandlerAddress
,
(
char
*
)
base
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
}
...
...
@@ -384,8 +384,8 @@ static DWORD call_handler( EXCEPTION_RECORD *rec, CONTEXT *context, DISPATCHER_C
frame
.
Handler
=
nested_exception_handler
;
__wine_push_frame
(
&
frame
);
TRACE
(
"calling handler %p (rec=%p, frame=
0x%lx
context=%p, dispatch=%p)
\n
"
,
dispatch
->
LanguageHandler
,
rec
,
dispatch
->
EstablisherFrame
,
dispatch
->
ContextRecord
,
dispatch
);
TRACE
(
"calling handler %p (rec=%p, frame=
%p
context=%p, dispatch=%p)
\n
"
,
dispatch
->
LanguageHandler
,
rec
,
(
void
*
)
dispatch
->
EstablisherFrame
,
dispatch
->
ContextRecord
,
dispatch
);
res
=
dispatch
->
LanguageHandler
(
rec
,
(
void
*
)
dispatch
->
EstablisherFrame
,
context
,
dispatch
);
TRACE
(
"handler at %p returned %u
\n
"
,
dispatch
->
LanguageHandler
,
res
);
...
...
@@ -445,7 +445,7 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_contex
dispatch
.
EstablisherFrame
<
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackLimit
||
dispatch
.
EstablisherFrame
>
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackBase
)
{
ERR
(
"invalid frame %
lx (%p-%p)
\n
"
,
dispatch
.
EstablisherFrame
,
ERR
(
"invalid frame %
p (%p-%p)
\n
"
,
(
void
*
)
dispatch
.
EstablisherFrame
,
NtCurrentTeb
()
->
Tib
.
StackLimit
,
NtCurrentTeb
()
->
Tib
.
StackBase
);
rec
->
ExceptionFlags
|=
EH_STACK_INVALID
;
break
;
...
...
@@ -480,8 +480,8 @@ static NTSTATUS call_stack_handlers( EXCEPTION_RECORD *rec, CONTEXT *orig_contex
/* hack: call wine handlers registered in the tib list */
else
while
((
ULONG64
)
teb_frame
<
context
.
Rsp
)
{
TRACE
(
"found wine frame %p rsp %
lx
handler %p
\n
"
,
teb_frame
,
context
.
Rsp
,
teb_frame
->
Handler
);
TRACE
(
"found wine frame %p rsp %
p
handler %p
\n
"
,
teb_frame
,
(
void
*
)
context
.
Rsp
,
teb_frame
->
Handler
);
dispatch
.
EstablisherFrame
=
(
ULONG64
)
teb_frame
;
switch
(
call_teb_handler
(
rec
,
orig_context
,
&
dispatch
,
teb_frame
))
{
...
...
@@ -521,9 +521,9 @@ NTSTATUS WINAPI dispatch_exception( EXCEPTION_RECORD *rec, CONTEXT *context )
NTSTATUS
status
;
DWORD
c
;
TRACE
(
"code=%x flags=%x addr=%p ip=%
lx
tid=%04x
\n
"
,
TRACE
(
"code=%x flags=%x addr=%p ip=%
p
tid=%04x
\n
"
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
,
rec
->
ExceptionAddress
,
context
->
Rip
,
GetCurrentThreadId
()
);
(
void
*
)
context
->
Rip
,
GetCurrentThreadId
()
);
for
(
c
=
0
;
c
<
min
(
EXCEPTION_MAXIMUM_PARAMETERS
,
rec
->
NumberParameters
);
c
++
)
TRACE
(
" info[%d]=%016lx
\n
"
,
c
,
rec
->
ExceptionInformation
[
c
]
);
...
...
@@ -780,7 +780,7 @@ PVOID WINAPI RtlVirtualUnwind( ULONG type, ULONG64 base, ULONG64 pc,
unsigned
int
i
,
prolog_offset
;
BOOL
mach_frame
=
FALSE
;
TRACE
(
"type %x rip %
lx rsp %lx
\n
"
,
type
,
pc
,
context
->
Rsp
);
TRACE
(
"type %x rip %
p rsp %p
\n
"
,
type
,
(
void
*
)
pc
,
(
void
*
)
context
->
Rsp
);
if
(
TRACE_ON
(
seh
))
dump_unwind_info
(
base
,
function
);
frame
=
*
frame_ret
=
context
->
Rsp
;
...
...
@@ -944,8 +944,8 @@ static DWORD call_unwind_handler( EXCEPTION_RECORD *rec, DISPATCHER_CONTEXT *dis
frame
.
dispatch
=
dispatch
;
__wine_push_frame
(
&
frame
.
frame
);
TRACE
(
"calling handler %p (rec=%p, frame=
0x%lx
context=%p, dispatch=%p)
\n
"
,
dispatch
->
LanguageHandler
,
rec
,
dispatch
->
EstablisherFrame
,
dispatch
->
ContextRecord
,
dispatch
);
TRACE
(
"calling handler %p (rec=%p, frame=
%p
context=%p, dispatch=%p)
\n
"
,
dispatch
->
LanguageHandler
,
rec
,
(
void
*
)
dispatch
->
EstablisherFrame
,
dispatch
->
ContextRecord
,
dispatch
);
res
=
dispatch
->
LanguageHandler
(
rec
,
(
void
*
)
dispatch
->
EstablisherFrame
,
dispatch
->
ContextRecord
,
dispatch
);
TRACE
(
"handler %p returned %x
\n
"
,
dispatch
->
LanguageHandler
,
res
);
...
...
@@ -1162,7 +1162,7 @@ void CDECL RtlRestoreContext( CONTEXT *context, EXCEPTION_RECORD *rec )
teb_frame
=
__wine_pop_frame
(
teb_frame
);
}
TRACE
(
"returning to %
lx stack %lx
\n
"
,
context
->
Rip
,
context
->
Rsp
);
TRACE
(
"returning to %
p stack %p
\n
"
,
(
void
*
)
context
->
Rip
,
(
void
*
)
context
->
Rsp
);
NtSetContextThread
(
GetCurrentThread
(),
context
);
}
...
...
@@ -1226,7 +1226,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
dispatch
.
EstablisherFrame
<
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackLimit
||
dispatch
.
EstablisherFrame
>
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackBase
)
{
ERR
(
"invalid frame %
lx (%p-%p)
\n
"
,
dispatch
.
EstablisherFrame
,
ERR
(
"invalid frame %
p (%p-%p)
\n
"
,
(
void
*
)
dispatch
.
EstablisherFrame
,
NtCurrentTeb
()
->
Tib
.
StackLimit
,
NtCurrentTeb
()
->
Tib
.
StackBase
);
rec
->
ExceptionFlags
|=
EH_STACK_INVALID
;
break
;
...
...
@@ -1236,7 +1236,7 @@ void WINAPI RtlUnwindEx( PVOID end_frame, PVOID target_ip, EXCEPTION_RECORD *rec
{
if
(
end_frame
&&
(
dispatch
.
EstablisherFrame
>
(
ULONG64
)
end_frame
))
{
ERR
(
"invalid end frame %
lx/%p
\n
"
,
dispatch
.
EstablisherFrame
,
end_frame
);
ERR
(
"invalid end frame %
p/%p
\n
"
,
(
void
*
)
dispatch
.
EstablisherFrame
,
end_frame
);
raise_status
(
STATUS_INVALID_UNWIND_TARGET
,
rec
);
}
if
(
dispatch
.
EstablisherFrame
==
(
ULONG64
)
end_frame
)
rec
->
ExceptionFlags
|=
EH_TARGET_UNWIND
;
...
...
@@ -1381,7 +1381,7 @@ EXCEPTION_DISPOSITION WINAPI __C_specific_handler( EXCEPTION_RECORD *rec,
return
ExceptionContinueExecution
;
}
}
TRACE
(
"unwinding to target %
lx
\n
"
,
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
TRACE
(
"unwinding to target %
p
\n
"
,
(
char
*
)
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
);
RtlUnwindEx
(
frame
,
(
char
*
)
dispatch
->
ImageBase
+
table
->
ScopeRecord
[
i
].
JumpTarget
,
rec
,
0
,
dispatch
->
ContextRecord
,
dispatch
->
HistoryTable
);
}
...
...
@@ -1471,7 +1471,7 @@ USHORT WINAPI RtlCaptureStackBackTrace( ULONG skip, ULONG count, PVOID *buffer,
dispatch
.
EstablisherFrame
<
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackLimit
||
dispatch
.
EstablisherFrame
>
(
ULONG64
)
NtCurrentTeb
()
->
Tib
.
StackBase
)
{
ERR
(
"invalid frame %
lx (%p-%p)
\n
"
,
dispatch
.
EstablisherFrame
,
ERR
(
"invalid frame %
p (%p-%p)
\n
"
,
(
void
*
)
dispatch
.
EstablisherFrame
,
NtCurrentTeb
()
->
Tib
.
StackLimit
,
NtCurrentTeb
()
->
Tib
.
StackBase
);
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment