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
944c4e8f
Commit
944c4e8f
authored
Sep 13, 2019
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use virtual_uninterrupted_read_memory() to read code inside signal handler on i386.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
17c82ddc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
signal_i386.c
dlls/ntdll/signal_i386.c
+7
-6
No files found.
dlls/ntdll/signal_i386.c
View file @
944c4e8f
...
...
@@ -1530,13 +1530,13 @@ __ASM_STDCALL_FUNC( NtGetContextThread, 8,
*/
static
inline
DWORD
is_privileged_instr
(
CONTEXT
*
context
)
{
const
BYTE
*
instr
;
unsigned
int
prefix_count
=
0
;
BYTE
instr
[
16
]
;
unsigned
int
i
,
len
,
prefix_count
=
0
;
if
(
!
wine_ldt_is_system
(
context
->
SegCs
))
return
0
;
instr
=
(
BYTE
*
)
context
->
Eip
;
len
=
virtual_uninterrupted_read_memory
(
(
BYTE
*
)
context
->
Eip
,
instr
,
sizeof
(
instr
)
)
;
for
(
;;)
switch
(
*
instr
)
for
(
i
=
0
;
i
<
len
;
i
++
)
switch
(
instr
[
i
]
)
{
/* instruction prefixes */
case
0x2e
:
/* %cs: */
...
...
@@ -1551,11 +1551,11 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
case
0xf2
:
/* repne */
case
0xf3
:
/* repe */
if
(
++
prefix_count
>=
15
)
return
EXCEPTION_ILLEGAL_INSTRUCTION
;
instr
++
;
continue
;
case
0x0f
:
/* extended instruction */
switch
(
instr
[
1
])
if
(
i
==
len
-
1
)
return
0
;
switch
(
instr
[
i
+
1
])
{
case
0x20
:
/* mov crX, reg */
case
0x21
:
/* mov drX, reg */
...
...
@@ -1584,6 +1584,7 @@ static inline DWORD is_privileged_instr( CONTEXT *context )
default
:
return
0
;
}
return
0
;
}
...
...
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