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
538cd178
Commit
538cd178
authored
Jan 24, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loader: Detect pthread_get_stackaddr_np returning the top of the stack
instead of the base.
parent
727970e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
pthread.c
loader/pthread.c
+4
-0
No files found.
loader/pthread.c
View file @
538cd178
...
...
@@ -70,8 +70,12 @@ static void init_thread( struct wine_pthread_thread_info *info )
pthread_getattr_np
(
pthread_self
(),
&
attr
);
pthread_attr_getstack
(
&
attr
,
&
info
->
stack_base
,
&
info
->
stack_size
);
#elif defined(HAVE_PTHREAD_GET_STACKSIZE_NP) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
char
dummy
;
info
->
stack_size
=
pthread_get_stacksize_np
(
pthread_self
());
info
->
stack_base
=
pthread_get_stackaddr_np
(
pthread_self
());
/* if base is too large assume it's the top of the stack instead */
if
((
char
*
)
info
->
stack_base
>
&
dummy
)
info
->
stack_base
=
(
char
*
)
info
->
stack_base
-
info
->
stack_size
;
#else
/* assume that the stack allocation is page aligned */
char
dummy
;
...
...
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