From: Julian Seward Date: Mon, 3 Oct 2011 16:10:45 +0000 (+0000) Subject: Fix multiple problems with this test: X-Git-Tag: svn/VALGRIND_3_7_0~151 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65f6c85aa8e9b91c75516bfd38a2628dbd497039;p=thirdparty%2Fvalgrind.git Fix multiple problems with this test: * when creating threads, just ask for a 256k stack size, since creating 498 threads each with the default 8M stack size fails on 32 bit machines. * limit number of callers to 3 so as to remove junk frames that cause different output on 32 vs 64 bit targets. * add a proper self-check at the end, to verify the number of detected errors is as expected * update output accordingly git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12086 --- diff --git a/memcheck/tests/err_disable4.c b/memcheck/tests/err_disable4.c index 39d4e22a19..603a670340 100644 --- a/memcheck/tests/err_disable4.c +++ b/memcheck/tests/err_disable4.c @@ -75,9 +75,13 @@ int main ( void ) // set up the semaphore r = sem_init(&sem, 0, 0); assert(!r); + pthread_attr_t attr; + r = pthread_attr_init(&attr); assert(!r); + r = pthread_attr_setstacksize(&attr, 64 * 4096); // 256k + // create N threads to do child_fn_1 ... for (i = 0; i < NTHREADS; i++) { - r = pthread_create(&child[i], NULL, child_fn_1, NULL); + r = pthread_create(&child[i], &attr, child_fn_1, NULL); assert(!r); } @@ -100,7 +104,7 @@ int main ( void ) // create N threads to do child_fn_2 ... for (i = 0; i < NTHREADS; i++) { - r = pthread_create(&child[i], NULL, child_fn_2, NULL); + r = pthread_create(&child[i], &attr, child_fn_2, NULL); assert(!r); } @@ -114,5 +118,11 @@ int main ( void ) r = pthread_join(child[i], NULL); assert(!r); } + // Print the final error counts. There need to be 498 errors + // in 1 context. Anything else, and something is not right. + int nerrors = VALGRIND_COUNT_ERRORS; + fprintf(stderr, "\n-------- Got %d errors (expected %d ==> %s) ------\n\n", + nerrors, NTHREADS, nerrors == NTHREADS ? "PASS" : "FAIL" ); + return 0; } diff --git a/memcheck/tests/err_disable4.stderr.exp b/memcheck/tests/err_disable4.stderr.exp index 70692f13d2..9ca631667c 100644 --- a/memcheck/tests/err_disable4.stderr.exp +++ b/memcheck/tests/err_disable4.stderr.exp @@ -1502,1002 +1502,11 @@ Thread x: Invalid read of size 1 at 0x........: err (err_disable4.c:41) by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? + ... Address 0x........ is 5 bytes inside a block of size 10 free'd at 0x........: free (vg_replace_malloc.c:...) by 0x........: main (err_disable4.c:68) -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) - -Thread x: -Invalid read of size 1 - at 0x........: err (err_disable4.c:41) - by 0x........: child_fn_2 (err_disable4.c:55) - by 0x........: start_thread (in /...libpthread...) - by 0x........: ??? - Address 0x........ is 5 bytes inside a block of size 10 free'd - at 0x........: free (vg_replace_malloc.c:...) - by 0x........: main (err_disable4.c:68) +-------- Got 498 errors (expected 498 ==> PASS) ------ -More than 100 errors detected. Subsequent errors -will still be recorded, but in less detail than before. diff --git a/memcheck/tests/err_disable4.vgtest b/memcheck/tests/err_disable4.vgtest index eddcbf4db8..98edd9b3e4 100644 --- a/memcheck/tests/err_disable4.vgtest +++ b/memcheck/tests/err_disable4.vgtest @@ -1,5 +1,5 @@ prog: err_disable4 -vgopts: -q +vgopts: -q --num-callers=3 stderr_filter: ../../helgrind/tests/filter_stderr ## This is so as to get rid of the "Thread #" lines, which ## otherwise perturb the output due to differences in