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
81b9ca5d
Commit
81b9ca5d
authored
Nov 25, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Pass the error code to VIRTUAL_HandleFault, and allow it to ignore the exception.
Also rename it to virtual_handle_fault for consistency.
parent
aece8e07
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
11 deletions
+14
-11
ntdll_misc.h
dlls/ntdll/ntdll_misc.h
+1
-1
signal_i386.c
dlls/ntdll/signal_i386.c
+3
-1
signal_powerpc.c
dlls/ntdll/signal_powerpc.c
+2
-5
signal_sparc.c
dlls/ntdll/signal_sparc.c
+3
-2
signal_x86_64.c
dlls/ntdll/signal_x86_64.c
+3
-0
virtual.c
dlls/ntdll/virtual.c
+2
-2
No files found.
dlls/ntdll/ntdll_misc.h
View file @
81b9ca5d
...
@@ -141,7 +141,7 @@ extern SIZE_T virtual_free_system_view( PVOID *addr_ptr );
...
@@ -141,7 +141,7 @@ extern SIZE_T virtual_free_system_view( PVOID *addr_ptr );
extern
NTSTATUS
virtual_alloc_thread_stack
(
void
*
base
,
SIZE_T
stack_size
);
extern
NTSTATUS
virtual_alloc_thread_stack
(
void
*
base
,
SIZE_T
stack_size
);
extern
void
virtual_clear_thread_stack
(
void
);
extern
void
virtual_clear_thread_stack
(
void
);
extern
BOOL
virtual_handle_stack_fault
(
void
*
addr
);
extern
BOOL
virtual_handle_stack_fault
(
void
*
addr
);
extern
NTSTATUS
VIRTUAL_HandleFault
(
LPCVOID
addr
);
extern
NTSTATUS
virtual_handle_fault
(
LPCVOID
addr
,
DWORD
err
);
extern
void
VIRTUAL_SetForceExec
(
BOOL
enable
);
extern
void
VIRTUAL_SetForceExec
(
BOOL
enable
);
extern
void
VIRTUAL_UseLargeAddressSpace
(
void
);
extern
void
VIRTUAL_UseLargeAddressSpace
(
void
);
extern
struct
_KUSER_SHARED_DATA
*
user_shared_data
;
extern
struct
_KUSER_SHARED_DATA
*
user_shared_data
;
...
...
dlls/ntdll/signal_i386.c
View file @
81b9ca5d
...
@@ -1209,7 +1209,9 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
...
@@ -1209,7 +1209,9 @@ static void WINAPI raise_segv_exception( EXCEPTION_RECORD *rec, CONTEXT *context
{
{
if
(
rec
->
ExceptionInformation
[
0
]
==
EXCEPTION_EXECUTE_FAULT
&&
check_atl_thunk
(
rec
,
context
))
if
(
rec
->
ExceptionInformation
[
0
]
==
EXCEPTION_EXECUTE_FAULT
&&
check_atl_thunk
(
rec
,
context
))
goto
done
;
goto
done
;
rec
->
ExceptionCode
=
VIRTUAL_HandleFault
(
(
void
*
)
rec
->
ExceptionInformation
[
1
]
);
if
(
!
(
rec
->
ExceptionCode
=
virtual_handle_fault
(
(
void
*
)
rec
->
ExceptionInformation
[
1
],
rec
->
ExceptionInformation
[
0
]
)))
goto
done
;
}
}
break
;
break
;
case
EXCEPTION_DATATYPE_MISALIGNMENT
:
case
EXCEPTION_DATATYPE_MISALIGNMENT
:
...
...
dlls/ntdll/signal_powerpc.c
View file @
81b9ca5d
...
@@ -321,7 +321,6 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
...
@@ -321,7 +321,6 @@ static inline DWORD get_fpu_code( const CONTEXT *context )
static
void
do_segv
(
CONTEXT
*
context
,
int
trap
,
int
err
,
int
code
,
void
*
addr
)
static
void
do_segv
(
CONTEXT
*
context
,
int
trap
,
int
err
,
int
code
,
void
*
addr
)
{
{
EXCEPTION_RECORD
rec
;
EXCEPTION_RECORD
rec
;
DWORD
page_fault_code
=
EXCEPTION_ACCESS_VIOLATION
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionFlags
=
EXCEPTION_CONTINUABLE
;
rec
.
ExceptionFlags
=
EXCEPTION_CONTINUABLE
;
...
@@ -336,9 +335,8 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
...
@@ -336,9 +335,8 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
rec
.
NumberParameters
=
2
;
rec
.
NumberParameters
=
2
;
rec
.
ExceptionInformation
[
0
]
=
0
;
/* FIXME ? */
rec
.
ExceptionInformation
[
0
]
=
0
;
/* FIXME ? */
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
addr
;
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
addr
;
if
(
!
(
page_fault_code
=
VIRTUAL_HandleFault
(
addr
)))
if
(
!
(
rec
.
ExceptionCode
=
virtual_handle_fault
(
addr
,
rec
.
ExceptionInformation
[
0
]
)))
return
;
return
;
rec
.
ExceptionCode
=
page_fault_code
;
break
;
break
;
default:
FIXME
(
"Unhandled SIGSEGV/%x
\n
"
,
code
);
default:
FIXME
(
"Unhandled SIGSEGV/%x
\n
"
,
code
);
break
;
break
;
...
@@ -358,9 +356,8 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
...
@@ -358,9 +356,8 @@ static void do_segv( CONTEXT *context, int trap, int err, int code, void * addr
rec
.
NumberParameters
=
2
;
rec
.
NumberParameters
=
2
;
rec
.
ExceptionInformation
[
0
]
=
0
;
/* FIXME ? */
rec
.
ExceptionInformation
[
0
]
=
0
;
/* FIXME ? */
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
addr
;
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
addr
;
if
(
!
(
page_fault_code
=
VIRTUAL_HandleFault
(
addr
)))
if
(
!
(
rec
.
ExceptionCode
=
virtual_handle_fault
(
addr
,
rec
.
ExceptionInformation
[
0
]
)))
return
;
return
;
rec
.
ExceptionCode
=
page_fault_code
;
break
;
break
;
#endif
#endif
default:
FIXME
(
"Unhandled SIGBUS/%x
\n
"
,
code
);
default:
FIXME
(
"Unhandled SIGBUS/%x
\n
"
,
code
);
...
...
dlls/ntdll/signal_sparc.c
View file @
81b9ca5d
...
@@ -180,12 +180,13 @@ static void segv_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
...
@@ -180,12 +180,13 @@ static void segv_handler( int signal, siginfo_t *info, ucontext_t *ucontext )
EXCEPTION_RECORD
rec
;
EXCEPTION_RECORD
rec
;
CONTEXT
context
;
CONTEXT
context
;
rec
.
ExceptionCode
=
EXCEPTION_ACCESS_VIOLATION
;
/* we want the page-fault case to be fast */
/* we want the page-fault case to be fast */
if
(
info
->
si_code
==
SEGV_ACCERR
)
if
(
info
->
si_code
==
SEGV_ACCERR
)
if
(
VIRTUAL_HandleFault
(
(
LPVOID
)
info
->
si_addr
))
return
;
if
(
!
(
rec
.
ExceptionCode
=
virtual_handle_fault
(
info
->
si_addr
,
0
)
))
return
;
save_context
(
&
context
,
ucontext
);
save_context
(
&
context
,
ucontext
);
rec
.
ExceptionCode
=
EXCEPTION_ACCESS_VIOLATION
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionRecord
=
NULL
;
rec
.
ExceptionFlags
=
EXCEPTION_CONTINUABLE
;
rec
.
ExceptionFlags
=
EXCEPTION_CONTINUABLE
;
rec
.
ExceptionAddress
=
(
LPVOID
)
context
.
pc
;
rec
.
ExceptionAddress
=
(
LPVOID
)
context
.
pc
;
...
...
dlls/ntdll/signal_x86_64.c
View file @
81b9ca5d
...
@@ -263,6 +263,8 @@ static HANDLER_DEF(segv_handler)
...
@@ -263,6 +263,8 @@ static HANDLER_DEF(segv_handler)
rec
.
NumberParameters
=
2
;
rec
.
NumberParameters
=
2
;
rec
.
ExceptionInformation
[
0
]
=
(
ERROR_sig
(
HANDLER_CONTEXT
)
&
2
)
!=
0
;
rec
.
ExceptionInformation
[
0
]
=
(
ERROR_sig
(
HANDLER_CONTEXT
)
&
2
)
!=
0
;
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
FAULT_ADDRESS
;
rec
.
ExceptionInformation
[
1
]
=
(
ULONG_PTR
)
FAULT_ADDRESS
;
if
(
!
(
rec
.
ExceptionCode
=
virtual_handle_fault
(
FAULT_ADDRESS
,
rec
.
ExceptionInformation
[
0
]
)))
goto
done
;
#endif
#endif
break
;
break
;
case
TRAP_x86_ALIGNFLT
:
/* Alignment check exception */
case
TRAP_x86_ALIGNFLT
:
/* Alignment check exception */
...
@@ -282,6 +284,7 @@ static HANDLER_DEF(segv_handler)
...
@@ -282,6 +284,7 @@ static HANDLER_DEF(segv_handler)
}
}
__regs_RtlRaiseException
(
&
rec
,
&
context
);
__regs_RtlRaiseException
(
&
rec
,
&
context
);
done:
restore_context
(
&
context
,
HANDLER_CONTEXT
);
restore_context
(
&
context
,
HANDLER_CONTEXT
);
}
}
...
...
dlls/ntdll/virtual.c
View file @
81b9ca5d
...
@@ -1399,9 +1399,9 @@ void virtual_clear_thread_stack(void)
...
@@ -1399,9 +1399,9 @@ void virtual_clear_thread_stack(void)
/***********************************************************************
/***********************************************************************
*
VIRTUAL_HandleF
ault
*
virtual_handle_f
ault
*/
*/
NTSTATUS
VIRTUAL_HandleFault
(
LPCVOID
add
r
)
NTSTATUS
virtual_handle_fault
(
LPCVOID
addr
,
DWORD
er
r
)
{
{
FILE_VIEW
*
view
;
FILE_VIEW
*
view
;
NTSTATUS
ret
=
STATUS_ACCESS_VIOLATION
;
NTSTATUS
ret
=
STATUS_ACCESS_VIOLATION
;
...
...
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