[Bug 571577] Re: Valgrind's thread checker not working correctly
Alessandro Ghedini
ghedo at debian.org
Sat May 12 18:00:45 UTC 2012
> I also tried with the SVN version (11112) and it works correctly.
Please update the Ubuntu package...
Closing, since the package has been updated.
** Changed in: valgrind (Ubuntu)
Status: New => Fix Released
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to valgrind in Ubuntu.
https://bugs.launchpad.net/bugs/571577
Title:
Valgrind's thread checker not working correctly
Status in “valgrind” package in Ubuntu:
Fix Released
Bug description:
Binary package hint: valgrind
I have Ubuntu 10.04 with Valgrind 3.6.0~svn20100212-0ubuntu5. I
created a simple test program like this
#include <pthread.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
static void *func(void *a)
{
a = NULL;
while (1) {
sleep(1);
}
return NULL;
}
int main()
{
pthread_t trd;
if (pthread_create(&trd, NULL, func, NULL)) {
exit(1);
}
pthread_detach(trd);
sleep(60);
return 0;
}
but I get an error when running the helgrind
# gcc -Wall vgtest.c -lpthread
# valgrind --trace-children=yes --verbose --tool=helgrind ./a.out
...
==13694== Thread #2 was created
==13694== at 0x513365E: clone (clone.S:77)
==13694== by 0x4E37172: pthread_create@@GLIBC_2.2.5 (createthread.c:75)
==13694== by 0x4C2C42C: pthread_create_WRK (hg_intercepts.c:230)
==13694== by 0x4C2C4CF: pthread_create@* (hg_intercepts.c:257)
==13694== by 0x4006B6: main (in /var/tmp/a.out)
==13694==
==13694== Thread #1 is the program's root thread
==13694==
==13694== Possible data race during write of size 8 at 0x7ff0009e0 by thread #2
==13694== at 0x4C2C54C: mythread_wrapper (hg_intercepts.c:200)
==13694== This conflicts with a previous read of size 8 by thread #1
==13694== at 0x4C2C440: pthread_create_WRK (hg_intercepts.c:235)
==13694== by 0x4C2C4CF: pthread_create@* (hg_intercepts.c:257)
==13694== by 0x4006B6: main (in /var/tmp/a.out)
==13694==
I also tried with the SVN version (11112) and it works correctly. Please update the Ubuntu package...
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/valgrind/+bug/571577/+subscriptions
More information about the foundations-bugs
mailing list