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
9476071f
Commit
9476071f
authored
Aug 18, 2009
by
Michael Karcher
Committed by
Alexandre Julliard
Aug 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Don't send EXCEPTION_EXECUTE_FAULT to Windows programs that didn't enable DEP.
parent
7aa1f6c3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
+10
-5
signal_i386.c
dlls/ntdll/signal_i386.c
+9
-0
exception.c
dlls/ntdll/tests/exception.c
+1
-5
No files found.
dlls/ntdll/signal_i386.c
View file @
9476071f
...
...
@@ -1833,6 +1833,15 @@ static void segv_handler( int signal, siginfo_t *siginfo, void *sigcontext )
rec
->
ExceptionCode
=
EXCEPTION_ACCESS_VIOLATION
;
rec
->
NumberParameters
=
2
;
rec
->
ExceptionInformation
[
0
]
=
(
get_error_code
(
context
)
>>
1
)
&
0x09
;
/* Send code 8 (EXCEPTION_EXECUTE_FAULT) only if data execution
prevention is enabled */
if
(
rec
->
ExceptionInformation
[
0
]
&
8
)
{
ULONG
flags
;
NtQueryInformationProcess
(
GetCurrentProcess
(),
ProcessExecuteFlags
,
&
flags
,
sizeof
(
flags
),
NULL
);
if
(
!
(
flags
&
MEM_EXECUTE_OPTION_DISABLE
))
rec
->
ExceptionInformation
[
0
]
&=
1
;
}
rec
->
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
siginfo
->
si_addr
;
break
;
case
TRAP_x86_ALIGNFLT
:
/* Alignment check exception */
...
...
dlls/ntdll/tests/exception.c
View file @
9476071f
...
...
@@ -1053,11 +1053,7 @@ static void test_dpe_exceptions(void)
info
.
exception_caught
=
FALSE
;
run_exception_test
(
dpe_exception_handler
,
&
info
,
single_ret
,
sizeof
(
single_ret
),
PAGE_NOACCESS
);
ok
(
info
.
exception_caught
==
TRUE
,
"Execution of disabled memory suceeded
\n
"
);
if
(
has_hw_support
)
todo_wine
ok
(
info
.
exception_info
==
EXCEPTION_READ_FAULT
,
"Access violation type: %08x
\n
"
,
(
unsigned
)
info
.
exception_info
);
else
ok
(
info
.
exception_info
==
EXCEPTION_READ_FAULT
,
ok
(
info
.
exception_info
==
EXCEPTION_READ_FAULT
,
"Access violation type: %08x
\n
"
,
(
unsigned
)
info
.
exception_info
);
}
else
...
...
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