Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
d25ae3ca
Commit
d25ae3ca
authored
Apr 15, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Handle stack guard pages on x86_64.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c7a174f7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+19
-1
No files found.
dlls/ntdll/signal_x86_64.c
View file @
d25ae3ca
...
...
@@ -2587,9 +2587,27 @@ static inline BOOL handle_interrupt( unsigned int interrupt, EXCEPTION_RECORD *r
*/
static
void
segv_handler
(
int
signal
,
siginfo_t
*
siginfo
,
void
*
sigcontext
)
{
EXCEPTION_RECORD
*
rec
=
setup_exception
(
sigcontext
,
raise_segv_exception
)
;
EXCEPTION_RECORD
*
rec
;
ucontext_t
*
ucontext
=
sigcontext
;
/* check for page fault inside the thread stack */
if
(
TRAP_sig
(
ucontext
)
==
TRAP_x86_PAGEFLT
&&
(
char
*
)
siginfo
->
si_addr
>=
(
char
*
)
NtCurrentTeb
()
->
DeallocationStack
&&
(
char
*
)
siginfo
->
si_addr
<
(
char
*
)
NtCurrentTeb
()
->
Tib
.
StackBase
&&
virtual_handle_stack_fault
(
siginfo
->
si_addr
))
{
/* check if this was the last guard page */
if
((
char
*
)
siginfo
->
si_addr
<
(
char
*
)
NtCurrentTeb
()
->
DeallocationStack
+
2
*
4096
)
{
rec
=
setup_exception
(
sigcontext
,
raise_segv_exception
);
rec
->
ExceptionCode
=
EXCEPTION_STACK_OVERFLOW
;
}
return
;
}
rec
=
setup_exception
(
sigcontext
,
raise_segv_exception
);
if
(
rec
->
ExceptionCode
==
EXCEPTION_STACK_OVERFLOW
)
return
;
switch
(
TRAP_sig
(
ucontext
))
{
case
TRAP_x86_OFLOW
:
/* Overflow exception */
...
...
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