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
60b3d30f
Commit
60b3d30f
authored
Jun 21, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't require execute permission for thread stacks.
parent
04f9f1b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
fiber.c
dlls/kernel/fiber.c
+1
-1
thread.c
dlls/kernel/thread.c
+2
-2
thread.c
dlls/ntdll/thread.c
+2
-2
No files found.
dlls/kernel/fiber.c
View file @
60b3d30f
...
...
@@ -93,7 +93,7 @@ LPVOID WINAPI CreateFiberEx( SIZE_T stack_commit, SIZE_T stack_reserve, DWORD fl
/* FIXME: should use the thread stack allocation routines here */
if
(
!
stack_reserve
)
stack_reserve
=
1024
*
1024
;
if
(
!
(
fiber
->
stack_allocation
=
VirtualAlloc
(
0
,
stack_reserve
,
MEM_COMMIT
,
PAGE_
EXECUTE_
READWRITE
)))
if
(
!
(
fiber
->
stack_allocation
=
VirtualAlloc
(
0
,
stack_reserve
,
MEM_COMMIT
,
PAGE_READWRITE
)))
{
HeapFree
(
GetProcessHeap
(),
0
,
fiber
);
return
NULL
;
...
...
dlls/kernel/thread.c
View file @
60b3d30f
...
...
@@ -66,7 +66,7 @@ TEB *THREAD_InitStack( TEB *teb, DWORD stack_size )
stack_size
=
(
stack_size
+
(
page_size
-
1
))
&
~
(
page_size
-
1
);
if
(
stack_size
<
1024
*
1024
)
stack_size
=
1024
*
1024
;
/* Xlib needs a large stack */
if
(
!
(
base
=
VirtualAlloc
(
NULL
,
stack_size
,
MEM_COMMIT
,
PAGE_
EXECUTE_
READWRITE
)))
if
(
!
(
base
=
VirtualAlloc
(
NULL
,
stack_size
,
MEM_COMMIT
,
PAGE_READWRITE
)))
return
NULL
;
teb
->
DeallocationStack
=
base
;
...
...
@@ -75,7 +75,7 @@ TEB *THREAD_InitStack( TEB *teb, DWORD stack_size )
/* Setup guard pages */
VirtualProtect
(
base
,
1
,
PAGE_
EXECUTE_
READWRITE
|
PAGE_GUARD
,
&
old_prot
);
VirtualProtect
(
base
,
1
,
PAGE_READWRITE
|
PAGE_GUARD
,
&
old_prot
);
return
teb
;
}
...
...
dlls/ntdll/thread.c
View file @
60b3d30f
...
...
@@ -192,7 +192,7 @@ static void start_thread( struct wine_pthread_thread_info *info )
size
=
info
->
stack_size
;
teb
->
DeallocationStack
=
info
->
stack_base
;
NtAllocateVirtualMemory
(
NtCurrentProcess
(),
&
teb
->
DeallocationStack
,
0
,
&
size
,
MEM_SYSTEM
,
PAGE_
EXECUTE_
READWRITE
);
&
size
,
MEM_SYSTEM
,
PAGE_READWRITE
);
/* limit is lower than base since the stack grows down */
teb
->
Tib
.
StackBase
=
(
char
*
)
info
->
stack_base
+
info
->
stack_size
;
teb
->
Tib
.
StackLimit
=
info
->
stack_base
;
...
...
@@ -200,7 +200,7 @@ static void start_thread( struct wine_pthread_thread_info *info )
/* setup the guard page */
size
=
1
;
NtProtectVirtualMemory
(
NtCurrentProcess
(),
&
teb
->
DeallocationStack
,
&
size
,
PAGE_
EXECUTE_
READWRITE
|
PAGE_GUARD
,
NULL
);
PAGE_READWRITE
|
PAGE_GUARD
,
NULL
);
RtlFreeHeap
(
GetProcessHeap
(),
0
,
info
);
RtlAcquirePebLock
();
...
...
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