diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2011-09-20 12:15:17 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2011-09-20 12:15:17 +0400 |
commit | 0a90e980e8c0f862e3702ebef2a73a367cea2b43 (patch) | |
tree | 8358148941b4b85cb713a633473586d3860946f7 /pthread_start.c | |
parent | 60859510e08df8ee178ed67ed9a597bb074a2370 (diff) | |
download | bdwgc-0a90e980e8c0f862e3702ebef2a73a367cea2b43.tar.gz |
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.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pthread_start.c b/pthread_start.c index 9d3556b4..bb79f5fb 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); |