From: Dejan Jevtic Date: Fri, 6 Dec 2013 14:21:44 +0000 (+0000) Subject: mips32/mips64: Suppress race condition error. X-Git-Tag: svn/VALGRIND_3_10_0~687 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=312c647a6e624e5e77b26303e400a183a172a0d6;p=thirdparty%2Fvalgrind.git mips32/mips64: Suppress race condition error. On MIPS architecture helgrind is showing race condition error in printf if the printf is first time called from the child thread. If we call printf from the main for the first time we will suppress this error on mips. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13749 --- diff --git a/helgrind/tests/tc21_pthonce.c b/helgrind/tests/tc21_pthonce.c index 69fac769f4..1cc6d32c34 100644 --- a/helgrind/tests/tc21_pthonce.c +++ b/helgrind/tests/tc21_pthonce.c @@ -81,6 +81,7 @@ int main ( void ) { id_arg = (int *)malloc(NUM_THREADS*sizeof(int)); + printf("main: Hello\n"); for (i = 0; i < NUM_THREADS; i++) { id_arg[i] = i; r= pthread_create(&threads[i], NULL, child, &id_arg[i]); diff --git a/helgrind/tests/tc21_pthonce.stderr.exp b/helgrind/tests/tc21_pthonce.stderr.exp index 700b492071..bc5604f8d2 100644 --- a/helgrind/tests/tc21_pthonce.stderr.exp +++ b/helgrind/tests/tc21_pthonce.stderr.exp @@ -5,7 +5,7 @@ Thread #x was created ... by 0x........: pthread_create_WRK (hg_intercepts.c:...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (tc21_pthonce.c:86) + by 0x........: main (tc21_pthonce.c:87) ---Thread-Announcement------------------------------------------ @@ -13,7 +13,7 @@ Thread #x was created ... by 0x........: pthread_create_WRK (hg_intercepts.c:...) by 0x........: pthread_create@* (hg_intercepts.c:...) - by 0x........: main (tc21_pthonce.c:86) + by 0x........: main (tc21_pthonce.c:87) ---------------------------------------------------------------- diff --git a/helgrind/tests/tc21_pthonce.stdout.exp b/helgrind/tests/tc21_pthonce.stdout.exp index e6c2dc2256..5b45785d37 100644 --- a/helgrind/tests/tc21_pthonce.stdout.exp +++ b/helgrind/tests/tc21_pthonce.stdout.exp @@ -1,3 +1,4 @@ +main: Hello welcome: Welcome child: Hi, I'm thread 0 child: Hi, I'm thread 1