]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
mips32/mips64: Suppress race condition error.
authorDejan Jevtic <dejan.jevtic@valgrind.org>
Fri, 6 Dec 2013 14:21:44 +0000 (14:21 +0000)
committerDejan Jevtic <dejan.jevtic@valgrind.org>
Fri, 6 Dec 2013 14:21:44 +0000 (14:21 +0000)
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

helgrind/tests/tc21_pthonce.c
helgrind/tests/tc21_pthonce.stderr.exp
helgrind/tests/tc21_pthonce.stdout.exp

index 69fac769f4179f591d43a3c7f21588c71cf67b74..1cc6d32c3492d7c3da42029a1d8c355bb1cab581 100644 (file)
@@ -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]);
index 700b4920712ac8172db2af304efb6ef9f3c4d41f..bc5604f8d2786758476263ce482bf0fbb75b5342 100644 (file)
@@ -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)
 
 ----------------------------------------------------------------
 
index e6c2dc225629778dd09990594d567d133c3f3ebb..5b45785d3771921b5e97a41084f97019c15ab565 100644 (file)
@@ -1,3 +1,4 @@
+main: Hello
 welcome: Welcome
 child: Hi, I'm thread 0
 child: Hi, I'm thread 1