From: Ivan Maidanski Date: Tue, 20 Sep 2011 08:15:17 +0000 (+0400) Subject: Fix GC_inner_start_routine() to prevent local variable clobbering. X-Git-Tag: gc7_2~124 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=869945b00745fa092c6fd011851fd7429f71cd72;p=gc 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. --- 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);