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
811e9660
Commit
811e9660
authored
Jun 17, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The TEB doesn't need execute permissions.
parent
ae703ec9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
thread.c
dlls/ntdll/thread.c
+3
-3
No files found.
dlls/ntdll/thread.c
View file @
811e9660
...
@@ -62,7 +62,7 @@ static TEB *alloc_teb( ULONG *size )
...
@@ -62,7 +62,7 @@ static TEB *alloc_teb( ULONG *size )
struct
ntdll_thread_data
*
thread_data
;
struct
ntdll_thread_data
*
thread_data
;
*
size
=
SIGNAL_STACK_SIZE
+
sizeof
(
TEB
);
*
size
=
SIGNAL_STACK_SIZE
+
sizeof
(
TEB
);
teb
=
wine_anon_mmap
(
NULL
,
*
size
,
PROT_READ
|
PROT_WRITE
|
PROT_EXEC
,
0
);
teb
=
wine_anon_mmap
(
NULL
,
*
size
,
PROT_READ
|
PROT_WRITE
,
0
);
if
(
teb
==
(
TEB
*
)
-
1
)
return
NULL
;
if
(
teb
==
(
TEB
*
)
-
1
)
return
NULL
;
thread_data
=
(
struct
ntdll_thread_data
*
)
teb
->
SystemReserved2
;
thread_data
=
(
struct
ntdll_thread_data
*
)
teb
->
SystemReserved2
;
if
(
!
(
thread_data
->
teb_sel
=
wine_ldt_alloc_fs
()))
if
(
!
(
thread_data
->
teb_sel
=
wine_ldt_alloc_fs
()))
...
@@ -153,7 +153,7 @@ void thread_init(void)
...
@@ -153,7 +153,7 @@ void thread_init(void)
/* create a memory view for the TEB */
/* create a memory view for the TEB */
addr
=
teb
;
addr
=
teb
;
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
0
,
&
size
,
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
addr
,
0
,
&
size
,
MEM_SYSTEM
,
PAGE_
EXECUTE_
READWRITE
);
MEM_SYSTEM
,
PAGE_READWRITE
);
/* create the process heap */
/* create the process heap */
if
(
!
(
peb
.
ProcessHeap
=
RtlCreateHeap
(
HEAP_GROWABLE
,
NULL
,
0
,
0
,
NULL
,
NULL
)))
if
(
!
(
peb
.
ProcessHeap
=
RtlCreateHeap
(
HEAP_GROWABLE
,
NULL
,
0
,
0
,
NULL
,
NULL
)))
...
@@ -277,7 +277,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
...
@@ -277,7 +277,7 @@ NTSTATUS WINAPI RtlCreateUserThread( HANDLE process, const SECURITY_DESCRIPTOR *
info
->
pthread_info
.
teb_base
=
teb
;
info
->
pthread_info
.
teb_base
=
teb
;
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
info
->
pthread_info
.
teb_base
,
0
,
&
size
,
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
info
->
pthread_info
.
teb_base
,
0
,
&
size
,
MEM_SYSTEM
,
PAGE_
EXECUTE_
READWRITE
);
MEM_SYSTEM
,
PAGE_READWRITE
);
info
->
pthread_info
.
teb_size
=
size
;
info
->
pthread_info
.
teb_size
=
size
;
info
->
pthread_info
.
teb_sel
=
thread_data
->
teb_sel
;
info
->
pthread_info
.
teb_sel
=
thread_data
->
teb_sel
;
...
...
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