summaryrefslogtreecommitdiff
path: root/pthread_start.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2011-09-20 10:15:17 +0200
committerIvan Maidanski <ivmai@mail.ru>2011-09-20 10:17:21 +0200
commit869945b00745fa092c6fd011851fd7429f71cd72 (patch)
tree05e20153e28dad4e259fa88a35c0d887454f782c /pthread_start.c
parentdb9e8f09fa1e4f54e761355130d8191a31530c9f (diff)
Fix GC_inner_start_routine() to prevent local variable clobbering.
* pthread_start.c (GC_inner_start_routine): Add volatile to "me" local variable to prevent its clobbering.
Diffstat (limited to 'pthread_start.c')
-rw-r--r--pthread_start.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pthread_start.c b/pthread_start.c
index 9d3556b..bb79f5f 100644
--- a/pthread_start.c
+++ b/pthread_start.c
@@ -47,7 +47,8 @@ void * GC_CALLBACK GC_inner_start_routine(struct GC_stack_base *sb, void *arg)
void * (*start)(void *);
void * start_arg;
void * result;
- GC_thread me = GC_start_rtn_prepare_thread(&start, &start_arg, sb, arg);
+ volatile GC_thread me =
+ GC_start_rtn_prepare_thread(&start, &start_arg, sb, arg);
# ifndef NACL
pthread_cleanup_push(GC_thread_exit_proc, me);