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
30cb179f
Commit
30cb179f
authored
Jun 28, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Encode the function pointers in the vectored handler list.
parent
2497a91f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
exception.c
dlls/ntdll/exception.c
+6
-4
winternl.h
include/winternl.h
+2
-0
No files found.
dlls/ntdll/exception.c
View file @
30cb179f
...
@@ -155,6 +155,7 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
...
@@ -155,6 +155,7 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
struct
list
*
ptr
;
struct
list
*
ptr
;
LONG
ret
=
EXCEPTION_CONTINUE_SEARCH
;
LONG
ret
=
EXCEPTION_CONTINUE_SEARCH
;
EXCEPTION_POINTERS
except_ptrs
;
EXCEPTION_POINTERS
except_ptrs
;
PVECTORED_EXCEPTION_HANDLER
func
;
VECTORED_HANDLER
*
handler
,
*
to_free
=
NULL
;
VECTORED_HANDLER
*
handler
,
*
to_free
=
NULL
;
except_ptrs
.
ExceptionRecord
=
rec
;
except_ptrs
.
ExceptionRecord
=
rec
;
...
@@ -166,14 +167,15 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
...
@@ -166,14 +167,15 @@ LONG call_vectored_handlers( EXCEPTION_RECORD *rec, CONTEXT *context )
{
{
handler
=
LIST_ENTRY
(
ptr
,
VECTORED_HANDLER
,
entry
);
handler
=
LIST_ENTRY
(
ptr
,
VECTORED_HANDLER
,
entry
);
handler
->
count
++
;
handler
->
count
++
;
func
=
RtlDecodePointer
(
handler
->
func
);
RtlLeaveCriticalSection
(
&
vectored_handlers_section
);
RtlLeaveCriticalSection
(
&
vectored_handlers_section
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
to_free
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
to_free
);
to_free
=
NULL
;
to_free
=
NULL
;
TRACE
(
"calling handler at %p code=%x flags=%x
\n
"
,
TRACE
(
"calling handler at %p code=%x flags=%x
\n
"
,
handler
->
func
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
);
func
,
rec
->
ExceptionCode
,
rec
->
ExceptionFlags
);
ret
=
handler
->
func
(
&
except_ptrs
);
ret
=
func
(
&
except_ptrs
);
TRACE
(
"handler at %p returned %x
\n
"
,
handler
->
func
,
ret
);
TRACE
(
"handler at %p returned %x
\n
"
,
func
,
ret
);
RtlEnterCriticalSection
(
&
vectored_handlers_section
);
RtlEnterCriticalSection
(
&
vectored_handlers_section
);
ptr
=
list_next
(
&
vectored_handlers
,
ptr
);
ptr
=
list_next
(
&
vectored_handlers
,
ptr
);
...
@@ -226,7 +228,7 @@ PVOID WINAPI RtlAddVectoredExceptionHandler( ULONG first, PVECTORED_EXCEPTION_HA
...
@@ -226,7 +228,7 @@ PVOID WINAPI RtlAddVectoredExceptionHandler( ULONG first, PVECTORED_EXCEPTION_HA
VECTORED_HANDLER
*
handler
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
handler
)
);
VECTORED_HANDLER
*
handler
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
sizeof
(
*
handler
)
);
if
(
handler
)
if
(
handler
)
{
{
handler
->
func
=
func
;
handler
->
func
=
RtlEncodePointer
(
func
)
;
handler
->
count
=
1
;
handler
->
count
=
1
;
RtlEnterCriticalSection
(
&
vectored_handlers_section
);
RtlEnterCriticalSection
(
&
vectored_handlers_section
);
if
(
first
)
list_add_head
(
&
vectored_handlers
,
&
handler
->
entry
);
if
(
first
)
list_add_head
(
&
vectored_handlers
,
&
handler
->
entry
);
...
...
include/winternl.h
View file @
30cb179f
...
@@ -2298,6 +2298,7 @@ NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
...
@@ -2298,6 +2298,7 @@ NTSYSAPI BOOLEAN WINAPI RtlCreateUnicodeString(PUNICODE_STRING,LPCWSTR);
NTSYSAPI
BOOLEAN
WINAPI
RtlCreateUnicodeStringFromAsciiz
(
PUNICODE_STRING
,
LPCSTR
);
NTSYSAPI
BOOLEAN
WINAPI
RtlCreateUnicodeStringFromAsciiz
(
PUNICODE_STRING
,
LPCSTR
);
NTSYSAPI
NTSTATUS
WINAPI
RtlCreateUserThread
(
HANDLE
,
const
SECURITY_DESCRIPTOR
*
,
BOOLEAN
,
PVOID
,
SIZE_T
,
SIZE_T
,
PRTL_THREAD_START_ROUTINE
,
void
*
,
HANDLE
*
,
CLIENT_ID
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlCreateUserThread
(
HANDLE
,
const
SECURITY_DESCRIPTOR
*
,
BOOLEAN
,
PVOID
,
SIZE_T
,
SIZE_T
,
PRTL_THREAD_START_ROUTINE
,
void
*
,
HANDLE
*
,
CLIENT_ID
*
);
NTSYSAPI
void
WINAPI
RtlDeactivateActivationContext
(
DWORD
,
ULONG_PTR
);
NTSYSAPI
void
WINAPI
RtlDeactivateActivationContext
(
DWORD
,
ULONG_PTR
);
NTSYSAPI
PVOID
WINAPI
RtlDecodePointer
(
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDecompressBuffer
(
USHORT
,
PUCHAR
,
ULONG
,
PUCHAR
,
ULONG
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDecompressBuffer
(
USHORT
,
PUCHAR
,
ULONG
,
PUCHAR
,
ULONG
,
PULONG
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDeleteAce
(
PACL
,
DWORD
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDeleteAce
(
PACL
,
DWORD
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDeleteAtomFromAtomTable
(
RTL_ATOM_TABLE
,
RTL_ATOM
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDeleteAtomFromAtomTable
(
RTL_ATOM_TABLE
,
RTL_ATOM
);
...
@@ -2326,6 +2327,7 @@ NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE
...
@@ -2326,6 +2327,7 @@ NTSYSAPI NTSTATUS WINAPI RtlDowncaseUnicodeString(UNICODE_STRING*,const UNICODE
NTSYSAPI
void
WINAPI
RtlDumpResource
(
LPRTL_RWLOCK
);
NTSYSAPI
void
WINAPI
RtlDumpResource
(
LPRTL_RWLOCK
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDuplicateUnicodeString
(
int
,
const
UNICODE_STRING
*
,
UNICODE_STRING
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlDuplicateUnicodeString
(
int
,
const
UNICODE_STRING
*
,
UNICODE_STRING
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEmptyAtomTable
(
RTL_ATOM_TABLE
,
BOOLEAN
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEmptyAtomTable
(
RTL_ATOM_TABLE
,
BOOLEAN
);
NTSYSAPI
PVOID
WINAPI
RtlEncodePointer
(
PVOID
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEnterCriticalSection
(
RTL_CRITICAL_SECTION
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEnterCriticalSection
(
RTL_CRITICAL_SECTION
*
);
NTSYSAPI
void
WINAPI
RtlEraseUnicodeString
(
UNICODE_STRING
*
);
NTSYSAPI
void
WINAPI
RtlEraseUnicodeString
(
UNICODE_STRING
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEqualComputerName
(
const
UNICODE_STRING
*
,
const
UNICODE_STRING
*
);
NTSYSAPI
NTSTATUS
WINAPI
RtlEqualComputerName
(
const
UNICODE_STRING
*
,
const
UNICODE_STRING
*
);
...
...
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