You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(32) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(25) |
2
(25) |
3
(5) |
4
(13) |
|
5
(4) |
6
(8) |
7
(6) |
8
|
9
(10) |
10
(15) |
11
(9) |
|
12
(14) |
13
(10) |
14
(24) |
15
(41) |
16
(13) |
17
(9) |
18
(3) |
|
19
(10) |
20
(11) |
21
(28) |
22
(36) |
23
(52) |
24
(36) |
25
(12) |
|
26
(31) |
27
(27) |
28
(20) |
29
(15) |
30
(22) |
31
(17) |
|
|
From: <sv...@va...> - 2009-07-26 09:04:57
|
Author: bart
Date: 2009-07-26 10:04:42 +0100 (Sun, 26 Jul 2009)
New Revision: 10607
Log:
Updated drd/tests/omp_printf:
- Added command-line options -i and -t to the omp_printf test program.
- Modified the OpenMP directive such that this test program no longer
triggers a data race on the loop variable 'i'.
- Increased number of iterations and number of threads used during the
test.
- Changed error filtering from filter_error_summary to filter_stderr.
Modified:
trunk/drd/tests/omp_printf.c
trunk/drd/tests/omp_printf.stderr.exp
trunk/drd/tests/omp_printf.vgtest
Modified: trunk/drd/tests/omp_printf.c
===================================================================
--- trunk/drd/tests/omp_printf.c 2009-07-26 08:48:49 UTC (rev 10606)
+++ trunk/drd/tests/omp_printf.c 2009-07-26 09:04:42 UTC (rev 10607)
@@ -1,15 +1,20 @@
/* Simple OpenMP test program that calls printf() from a parallel section. */
+#include <assert.h> // assert()
#include <omp.h>
#include <stdio.h>
+#include <stdlib.h> // atoi()
#include <unistd.h> // getopt()
static void usage(const char* const exe)
{
- printf("Usage: %s [-h] [-q] [-r] [-t<n>] <m>\n"
- "-h: display this information.\n"
- "-q: quiet mode -- do not print computed error.\n",
- exe);
+ fprintf(stderr,
+ "Usage: %s [-h] [-i <n>] [-q] [-t<n>]\n"
+ "-h: display this information.\n"
+ "-i <n>: number of loop iterations.\n"
+ "-q: quiet mode -- do not print computed error.\n"
+ "-t <n>: number of OMP threads.\n",
+ exe);
}
int main(int argc, char** argv)
@@ -18,29 +23,45 @@
int optchar;
int silent = 0;
int tid;
+ int num_iterations = 2;
+ int num_threads = 2;
- while ((optchar = getopt(argc, argv, "hq")) != EOF)
+ while ((optchar = getopt(argc, argv, "hi:qt:")) != EOF)
{
switch (optchar)
{
case 'h': usage(argv[0]); return 1;
+ case 'i': num_iterations = atoi(optarg); break;
case 'q': silent = 1; break;
+ case 't': num_threads = atoi(optarg); break;
default:
return 1;
}
}
-#pragma omp parallel private(tid)
- for (i = 0; i < 2; i++)
+ /*
+ * Not the most user-friendly way of error checking, but still better than
+ * no error checking.
+ */
+ assert(num_iterations > 0);
+ assert(num_threads > 0);
+
+ omp_set_num_threads(num_threads);
+ omp_set_dynamic(0);
+
+#pragma omp parallel for private(tid)
+ for (i = 0; i < num_iterations; i++)
{
tid = omp_get_thread_num();
if (! silent)
{
- printf("omp_get_thread_num() = %d/%d\n", tid, omp_get_num_threads());
+ fprintf(stderr,
+ "iteration %d; thread number = %d; number of threads = %d\n",
+ i, tid, omp_get_num_threads());
}
else
{
- printf("%s", "");
+ fprintf(stderr, "%s", "");
}
}
Modified: trunk/drd/tests/omp_printf.stderr.exp
===================================================================
--- trunk/drd/tests/omp_printf.stderr.exp 2009-07-26 08:48:49 UTC (rev 10606)
+++ trunk/drd/tests/omp_printf.stderr.exp 2009-07-26 09:04:42 UTC (rev 10607)
@@ -1 +1,4 @@
-ERROR SUMMARY: 8 errors from 8 contexts
+
+Finished.
+
+ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Modified: trunk/drd/tests/omp_printf.vgtest
===================================================================
--- trunk/drd/tests/omp_printf.vgtest 2009-07-26 08:48:49 UTC (rev 10606)
+++ trunk/drd/tests/omp_printf.vgtest 2009-07-26 09:04:42 UTC (rev 10607)
@@ -1,5 +1,4 @@
prereq: ./run_openmp_test ./omp_printf
prog: omp_printf
vgopts: --check-stack-var=yes --read-var-info=yes
-args: -q
-stderr_filter: filter_error_summary
+args: -i 100 -q -t 10
|
|
From: <sv...@va...> - 2009-07-26 08:48:59
|
Author: bart
Date: 2009-07-26 09:48:49 +0100 (Sun, 26 Jul 2009)
New Revision: 10606
Log:
Removed code that has been commented out recently.
Modified:
trunk/drd/drd_clientreq.c
trunk/drd/drd_clientreq.h
trunk/drd/drd_pthread_intercepts.c
Modified: trunk/drd/drd_clientreq.c
===================================================================
--- trunk/drd/drd_clientreq.c 2009-07-26 08:40:51 UTC (rev 10605)
+++ trunk/drd/drd_clientreq.c 2009-07-26 08:48:49 UTC (rev 10606)
@@ -47,9 +47,6 @@
/* Local function declarations. */
static Bool handle_client_request(ThreadId vg_tid, UWord* arg, UWord* ret);
-#if 0
-static Addr highest_used_stack_address(const ThreadId vg_tid);
-#endif
/* Function definitions. */
@@ -175,39 +172,6 @@
}
break;
- case VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK:
- {
-#if 0
- const Addr topmost_sp = highest_used_stack_address(vg_tid);
-#if 0
- UInt nframes;
- const UInt n_ips = 20;
- Addr ips[n_ips], sps[n_ips], fps[n_ips];
- Char desc[128];
- unsigned i;
-
- nframes = VG_(get_StackTrace)(vg_tid, ips, n_ips, sps, fps, 0);
-
- VG_(message)(Vg_DebugMsg, "thread %d: stack 0x%lx - 0x%lx - 0x%lx\n",
- drd_tid,
- VG_(thread_get_stack_max)(vg_tid)
- - VG_(thread_get_stack_size)(vg_tid),
- topmost_sp,
- VG_(thread_get_stack_max)(vg_tid));
- for (i = 0; i < nframes; i++)
- {
- VG_(describe_IP)(ips[i], desc, sizeof(desc));
- VG_(message)(Vg_DebugMsg, "[%2d] sp 0x%09lx fp 0x%09lx ip %s\n",
- i, sps[i], fps[i], desc);
- }
-#endif
- DRD_(thread_set_stack_startup)(drd_tid, VG_(get_SP)(vg_tid));
- DRD_(start_suppression)(topmost_sp, VG_(thread_get_stack_max)(vg_tid),
- "stack top");
-#endif
- break;
- }
-
case VG_USERREQ__DRD_START_NEW_SEGMENT:
DRD_(thread_new_segment)(DRD_(PtThreadIdToDrdThreadId)(arg[1]));
break;
@@ -503,49 +467,3 @@
*ret = result;
return True;
}
-
-#if 0
-/**
- * Walk the stack up to the highest stack frame, and return the stack pointer
- * of the highest stack frame. It is assumed that there are no more than
- * ten stack frames above the current frame. This should be no problem
- * since this function is either called indirectly from the _init() function
- * in vgpreload_drd-*.so or from the thread wrapper for a newly created
- * thread. See also drd_pthread_intercepts.c.
- */
-static Addr highest_used_stack_address(const ThreadId vg_tid)
-{
- UInt nframes;
- const UInt n_ips = 10;
- UInt i;
- Addr ips[n_ips], sps[n_ips];
- Addr husa;
-
- nframes = VG_(get_StackTrace)(vg_tid, ips, n_ips, sps, 0, 0);
- tl_assert(1 <= nframes && nframes <= n_ips);
-
- /* A hack to work around VG_(get_StackTrace)()'s behavior that sometimes */
- /* the topmost stackframes it returns are bogus (this occurs sometimes */
- /* at least on amd64, ppc32 and ppc64). */
-
- husa = sps[0];
-
- tl_assert(VG_(thread_get_stack_max)(vg_tid)
- - VG_(thread_get_stack_size)(vg_tid) <= husa
- && husa < VG_(thread_get_stack_max)(vg_tid));
-
- for (i = 1; i < nframes; i++)
- {
- if (sps[i] == 0)
- break;
- if (husa < sps[i] && sps[i] < VG_(thread_get_stack_max)(vg_tid))
- husa = sps[i];
- }
-
- tl_assert(VG_(thread_get_stack_max)(vg_tid)
- - VG_(thread_get_stack_size)(vg_tid) <= husa
- && husa < VG_(thread_get_stack_max)(vg_tid));
-
- return husa;
-}
-#endif
Modified: trunk/drd/drd_clientreq.h
===================================================================
--- trunk/drd/drd_clientreq.h 2009-07-26 08:40:51 UTC (rev 10605)
+++ trunk/drd/drd_clientreq.h 2009-07-26 08:48:49 UTC (rev 10606)
@@ -45,12 +45,8 @@
* source files.
*/
enum {
- /* Ask drd to suppress data race reports on all currently allocated stack */
- /* data of the current thread. */
- VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK = VG_USERREQ_TOOL_BASE('D', 'r'),
- /* args: none */
/* To ask the drd tool to start a new segment in the specified thread. */
- VG_USERREQ__DRD_START_NEW_SEGMENT,
+ VG_USERREQ__DRD_START_NEW_SEGMENT = VG_USERREQ_TOOL_BASE('D', 'r'),
/* args: POSIX thread ID. */
/* Tell drd the pthread_t of the running thread. */
Modified: trunk/drd/drd_pthread_intercepts.c
===================================================================
--- trunk/drd/drd_pthread_intercepts.c 2009-07-26 08:40:51 UTC (rev 10605)
+++ trunk/drd/drd_pthread_intercepts.c 2009-07-26 08:48:49 UTC (rev 10606)
@@ -217,9 +217,6 @@
DrdPosixThreadArgs* arg_ptr;
DrdPosixThreadArgs arg_copy;
- VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
- 0, 0, 0, 0, 0);
-
arg_ptr = (DrdPosixThreadArgs*)arg;
arg_copy = *arg_ptr;
#if defined(WAIT_UNTIL_CREATED_THREAD_STARTED)
@@ -306,9 +303,6 @@
{
int res;
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
- 0, 0, 0, 0, 0);
-
// Make sure that DRD knows about the main thread's POSIX thread ID.
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__SET_PTHREADID,
pthread_self(), 0, 0, 0, 0);
|
|
From: <sv...@va...> - 2009-07-26 08:41:06
|
Author: bart
Date: 2009-07-26 09:40:51 +0100 (Sun, 26 Jul 2009)
New Revision: 10605
Log:
Display sem_open() mode in octal format instead of hexadecimal format.
Modified:
trunk/drd/drd_semaphore.c
Modified: trunk/drd/drd_semaphore.c
===================================================================
--- trunk/drd/drd_semaphore.c 2009-07-26 08:40:17 UTC (rev 10604)
+++ trunk/drd/drd_semaphore.c 2009-07-26 08:40:51 UTC (rev 10605)
@@ -261,7 +261,7 @@
{
VG_(message)(Vg_UserMsg,
"[%d] sem_open 0x%lx name %s"
- " oflag %ld mode 0x%lx value %u\n",
+ " oflag %ld mode %#lo value %u\n",
DRD_(thread_get_running_tid)(),
semaphore, name, oflag, mode, value);
}
|
|
From: <sv...@va...> - 2009-07-26 08:40:33
|
Author: bart
Date: 2009-07-26 09:40:17 +0100 (Sun, 26 Jul 2009)
New Revision: 10604
Log:
Added support for %o (octal format).
Modified:
trunk/coregrind/m_debuglog.c
Modified: trunk/coregrind/m_debuglog.c
===================================================================
--- trunk/coregrind/m_debuglog.c 2009-07-25 14:03:53 UTC (rev 10603)
+++ trunk/coregrind/m_debuglog.c 2009-07-26 08:40:17 UTC (rev 10604)
@@ -780,6 +780,18 @@
else { is_long = True; }
switch (format[i]) {
+ case 'o': /* %o */
+ if (flags & VG_MSG_ALTFORMAT) {
+ ret += 2;
+ send('0',send_arg2);
+ }
+ if (is_long)
+ ret += myvprintf_int64(send, send_arg2, flags, 8, width, False,
+ (ULong)(va_arg (vargs, ULong)));
+ else
+ ret += myvprintf_int64(send, send_arg2, flags, 8, width, False,
+ (ULong)(va_arg (vargs, UInt)));
+ break;
case 'd': /* %d */
flags |= VG_MSG_SIGNED;
if (is_long)
|
|
From: Bart V. A. <bar...@gm...> - 2009-07-26 08:14:46
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-07-26 02:15:41 EDT Ended at 2009-07-26 04:14:19 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 433 tests, 45 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Tom H. <th...@cy...> - 2009-07-26 02:47:55
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-07-26 03:05:04 BST Ended at 2009-07-26 03:47:35 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 516 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-07-26 02:32:22
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-07-26 03:10:05 BST Ended at 2009-07-26 03:32:05 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 523 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: <sv...@va...> - 2009-07-25 14:04:08
|
Author: bart
Date: 2009-07-25 15:03:53 +0100 (Sat, 25 Jul 2009)
New Revision: 10603
Log:
DRD is no longer considered experimental on Darwin.
Modified:
trunk/drd/drd_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-07-25 14:03:24 UTC (rev 10602)
+++ trunk/drd/drd_main.c 2009-07-25 14:03:53 UTC (rev 10603)
@@ -549,10 +549,8 @@
static void DRD_(post_clo_init)(void)
{
-#if defined(VGO_linux)
+#if defined(VGO_linux) || defined(VGO_darwin)
/* fine */
-#elif defined(VGO_darwin)
- VG_(printf)("\nWARNING: DRD support for Darwin is still considered as experimental.\n\n");
#else
VG_(printf)("\nWARNING: DRD has not yet been tested on this operating system.\n\n");
# endif
|
|
From: <sv...@va...> - 2009-07-25 14:03:43
|
Author: bart
Date: 2009-07-25 15:03:24 +0100 (Sat, 25 Jul 2009)
New Revision: 10602
Log:
Generalized some suppression patterns and added several new suppression patterns.
Modified:
trunk/darwin9-drd.supp
Modified: trunk/darwin9-drd.supp
===================================================================
--- trunk/darwin9-drd.supp 2009-07-25 13:57:43 UTC (rev 10601)
+++ trunk/darwin9-drd.supp 2009-07-25 14:03:24 UTC (rev 10602)
@@ -1,5 +1,5 @@
#
-# Suppressions for the dynamic loader.
+# Suppression patterns for dyld, the dynamic loader.
#
{
@@ -9,14 +9,6 @@
fun:_dyld_register_func_for_add_image
fun:__keymgr_initializer
fun:libSystem_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
}
{
drd-darwin-dyld-2
@@ -25,14 +17,6 @@
fun:_dyld_register_func_for_remove_image
fun:__keymgr_initializer
fun:libSystem_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
}
{
drd-darwin-dyld-3
@@ -40,35 +24,37 @@
fun:pthread_mutex_init
fun:_Z24dyldGlobalLockInitializev
fun:_dyld_initializer
- fun:_ZN16ImageLoaderMachO18doModInitFunctionsERKN11ImageLoader11LinkContextE
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader23recursiveInitializationERKNS_11LinkContextEj
- fun:_ZN11ImageLoader15runInitializersERKNS_11LinkContextE
- fun:_ZN4dyld24initializeMainExecutableEv
- fun:_ZN4dyld5_mainEPK11mach_headermiPPKcS5_S5_
- fun:_ZN13dyldbootstrap5startEPK11mach_headeriPPKcl
- fun:_dyld_start
}
{
drd-darwin-dyld-4
drd:ConflictingAccess
...
- fun:_ZN16ImageLoaderMachO16doBindLazySymbolEPmRKN11ImageLoader11LinkContextE
fun:_ZN4dyld14bindLazySymbolEPK11mach_headerPm
fun:stub_binding_helper_interface2
}
{
drd-darwin-dyld-5
drd:ConflictingAccess
- fun:_ZNK16ImageLoaderMachO18findExportedSymbolEPKcPKvbPPK11ImageLoader
+ ...
fun:_ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPKS0_
- fun:_ZN16ImageLoaderMachO16doBindLazySymbolEPmRKN11ImageLoader11LinkContextE
}
+{
+ drd-darwin-dyld-6
+ drd:ConflictingAccess
+ fun:_ZN4dyld8addImageEP11ImageLoader
+}
+{
+ drd-darwin-dyld-7
+ drd:ConflictingAccess
+ fun:_ZNK16ImageLoaderMachO18findExportedSymbolEPKcPKvbPPK11ImageLoader
+ fun:_ZNK11ImageLoader41findExportedSymbolInDependentImagesExceptEPKcPPKS_RS4_S4_S4_
+ fun:_ZNK11ImageLoader42findExportedSymbolInImageOrDependentImagesEPKcRKNS_11LinkContextEPPKS_
+ fun:dlsym
+}
#
-# Suppressions for Darwin's C library.
+# Suppression patterns for libc, Darwin's C library.
#
{
@@ -123,10 +109,37 @@
fun:__cxa_finalize
fun:exit
}
+{
+ drd-darwin-atexit-register
+ drd:ConflictingAccess
+ fun:atexit_register
+}
+{
+ drd-darwin-opendir
+ drd:ConflictingAccess
+ fun:telldir$UNIX2003
+ fun:__opendir2$UNIX2003
+ fun:opendir$UNIX2003
+}
+{
+ drd-darwin-readdir
+ drd:ConflictingAccess
+ fun:readdir
+}
+{
+ drd-darwin-closedir
+ drd:ConflictingAccess
+ fun:closedir$UNIX2003
+}
+{
+ drd:darwin-ptrace
+ drd:ConflictingAccess
+ fun:ptrace
+}
#
-# Suppressions for Darwin's POSIX threads implementation.
+# Suppression patterns for libpthread, Darwin's POSIX threads implementation.
#
{
@@ -186,3 +199,102 @@
fun:mig_dealloc_reply_port
fun:_pthread_free_pthread_onstack
}
+{
+ drd-darwin-pthread-mach-thread-np
+ drd:ConflictingAccess
+ ...
+ fun:pthread_mach_thread_np
+}
+{
+ drd-darwin-pthread-key-create
+ drd:ConflictingAccess
+ fun:pthread_key_create
+}
+
+
+#
+# Suppression patterns for libobjc.
+#
+
+{
+ drd-darwin-objc-1
+ drd:ConflictingAccess
+ fun:objc_msgSend
+}
+{
+ drd-darwin-objc-2
+ drd:ConflictingAccess
+ fun:_cache_fill
+ fun:log_and_fill_cache
+ fun:_class_lookupMethodAndLoadCache
+}
+{
+ drd-darwin-objc-3
+ drd:ConflictingAccess
+ fun:_cache_getMethod
+ fun:objc_msgSend
+}
+
+
+#
+# Suppression patterns for CoreFoundation.framework.
+#
+
+{
+ drd-darwin-corefoundation-framework-1
+ drd:ConflictingAccess
+ fun:-[NSLock lock]
+}
+{
+ drd-darwin-corefoundation-framework-2
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject release]
+}
+{
+ drd-darwin-corefoundation-framework-3
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject(NSObject) autorelease]
+}
+{
+ drd-darwin-corefoundation-framework-4
+ drd:ConflictingAccess
+ ...
+ fun:-[NSObject retain]
+}
+{
+ drd-darwin-corefoundation-framework-5
+ drd:ConflictingAccess
+ ...
+ fun:NSExtraRefCount
+}
+{
+ drd-darwin-corefoundation-framework-6
+ drd:ConflictingAccess
+ ...
+ fun:NSKVONotify
+}
+{
+ drd-darwin-corefoundation-framework-7
+ drd:ConflictingAccess
+ ...
+ fun:CFRunLoop*
+}
+{
+ drd-darwin-corefoundation-framework-8
+ drd:ConflictingAccess
+ fun:CFBag*
+}
+
+
+#
+# Suppression patterns for AudioToolbox.framework.
+#
+
+{
+ drd-darwin-audiotoolbox-framework-1
+ drd:ConflictingAccess
+ obj:*
+ fun:_Z26InitializeSystemSoundPortsv
+}
|
|
From: <sv...@va...> - 2009-07-25 13:57:56
|
Author: bart
Date: 2009-07-25 14:57:43 +0100 (Sat, 25 Jul 2009)
New Revision: 10601
Log:
Updated testing instructions.
Modified:
trunk/drd/Testing.txt
Modified: trunk/drd/Testing.txt
===================================================================
--- trunk/drd/Testing.txt 2009-07-25 13:28:24 UTC (rev 10600)
+++ trunk/drd/Testing.txt 2009-07-25 13:57:43 UTC (rev 10601)
@@ -40,13 +40,17 @@
50 for i == 10 with n == 200).
9. Test whether DRD works with standard KDE applications and whether it does
- not print any false positives. Test this both with KDE3 and KDE4.
+ not print any false positives. Test this both with KDE3 and KDE4 on Linux:
./vg-in-place --tool=drd --read-var-info=yes kate
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes kate
./vg-in-place --tool=drd --read-var-info=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes --trace-children=yes knode
./vg-in-place --tool=drd --read-var-info=yes --check-stack-var=yes /usr/bin/designer
+ and on Darwin:
+ ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
+ ./vg-in-place --tool=drd --trace-fork-join=yes --show-confl-seg=no --gen-suppressions=all /Applications/Safari.app/Contents/MacOS/Safari
+
10. Test whether DRD works with standard GNOME applications. Expect
race reports triggered by ORBit_RootObject_duplicate() and after
having closed the GNOME terminal window:
|
|
From: John R. <jr...@bi...> - 2009-07-25 13:43:20
|
Nicholas Nethercote wrote: [snip] > It's a simplified version of a real problem, where a user implements a > custom allocator on top of malloc(). ... > I have a patch that tolerates overlaps such as these, where a custom > block falls entirely within a malloc()'d block. But there's a design > choice to be made. In such a case, what do we do with the malloc()'d > block? > > (1) Ignore it completely when leak checking > (2) Consider it when leak checking 0. Have a way for the custom allocator to say, "This interval will be used as an arena for custom allocation," and "This interval no longer will be used as such an arena." A custom allocator must tell memcheck these facts. If not then memcheck may adopt any policy at all, including random policy. 1. Overlap is allowed only for a custom arena and the blocks that it allocates. Arenas can nest. An arena can be cleared: all blocks free()d as a group in one operation without specifying each allocated block separately. 2. Each arena is considered to be its own root with respect to blocks that it allocates, and also each arena is considered to be an opaque allocated block within its nearest enclosing arena. Thus the leak report has a separate section for each arena, and an arena can be leaked within its nearest enclosing arena yet still contain its own non-leaked blocks. -- |
|
From: <sv...@va...> - 2009-07-25 13:28:36
|
Author: bart
Date: 2009-07-25 14:28:24 +0100 (Sat, 25 Jul 2009)
New Revision: 10600
Log:
Fixed an assertion failure that was triggered on Darwin by calling malloc_zone_realloc().
Modified:
trunk/drd/drd_malloc_wrappers.c
Modified: trunk/drd/drd_malloc_wrappers.c
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2009-07-25 11:16:51 UTC (rev 10599)
+++ trunk/drd/drd_malloc_wrappers.c 2009-07-25 13:28:24 UTC (rev 10600)
@@ -228,7 +228,8 @@
/* Free old memory. */
VG_(cli_free)(p_old);
- s_stop_using_mem_callback(mc->data, mc->size);
+ if (mc->size > 0)
+ s_stop_using_mem_callback(mc->data, mc->size);
VG_(HT_remove)(s_malloc_list, (UWord)p_old);
/* Update state information. */
|
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 11:59:51
|
On Sat, Jul 25, 2009 at 12:09 AM, Greg Parker<gp...@ap...> wrote: > On Jul 24, 2009, at 4:28 AM, Bart Van Assche wrote: >> >> When running DRD's regression tests on Darwin, 63 out of 64 regression >> tests always pass and one regression test, rwlock_test, fails >> sometimes. If that test fails it is because DRD reported one or more >> conflicting memory loads triggered by line 35, the statement that >> reads s_counter protected by a reader lock. > > Darwin's pthread_rwlock_init() reads a value from the pthread_rwlock_t > struct before initializing anything. Valgrind doesn't like that. (They say > it's required for Unix compliance; I say it's a bug and the standard > requires no such thing.) With Nick's help I found the source code of the rwlock implementation: http://www.opensource.apple.com/source/Libc/Libc-498.1.7/pthreads/pthread_rwlock.c. The fact that pthread_rwlock_init() reads a value from the pthread_rwlock_t struct is indeed surprising -- this could cause initialization to be skipped for rwlock structures allocated on the stack. Since r10599 all DRD regression tests pass -- the regression test rwlock_test does no longer fail. Thanks for the help. I will now test DRD with larger applications. Bart. |
|
From: <sv...@va...> - 2009-07-25 11:17:08
|
Author: bart
Date: 2009-07-25 12:16:51 +0100 (Sat, 25 Jul 2009)
New Revision: 10599
Log:
DRD does now support sem_open() and sem_close().
Modified:
trunk/NEWS
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-07-25 11:15:03 UTC (rev 10598)
+++ trunk/NEWS 2009-07-25 11:16:51 UTC (rev 10599)
@@ -88,6 +88,7 @@
DRD thread ID), DRD does now identify threads via a single number (the DRD
thread ID). Furthermore "first observed at" information is now printed for
all error messages related to synchronization objects.
+ - Added support for named semaphores (sem_open() and sem_close()).
- Race conditions between pthread_barrier_wait() and
pthread_barrier_destroy() calls are now reported.
- Added support for memory pools through the macro's
|
|
From: <sv...@va...> - 2009-07-25 11:15:18
|
Author: bart
Date: 2009-07-25 12:15:03 +0100 (Sat, 25 Jul 2009)
New Revision: 10598
Log:
Fixed bug in DRD's rwlock implementation that caused the regression test called rwlock_test to fail sometimes on Darwin. The fact that this test only failed on Darwin and not on Linux implies that on Linux after unlocking an rwlock that was locked for writing there always happens a context switch to another thread waiting for acquiring the rwlock, and that this is not the case on Darwin.
Modified:
trunk/drd/drd_rwlock.c
Modified: trunk/drd/drd_rwlock.c
===================================================================
--- trunk/drd/drd_rwlock.c 2009-07-24 20:48:36 UTC (rev 10597)
+++ trunk/drd/drd_rwlock.c 2009-07-25 11:15:03 UTC (rev 10598)
@@ -43,8 +43,10 @@
UWord tid; // DrdThreadId.
UInt reader_nesting_count;
UInt writer_nesting_count;
- Segment* last_unlock_segment; // Segment of last unlock call by this thread.
- Bool last_lock_was_writer_lock;
+ // Segment of last unlock call by this thread that unlocked a writer lock.
+ Segment* latest_wrlocked_segment;
+ // Segment of last unlock call by this thread that unlocked a reader lock.
+ Segment* latest_rdlocked_segment;
};
@@ -151,8 +153,8 @@
q->tid = tid;
q->reader_nesting_count = 0;
q->writer_nesting_count = 0;
- q->last_unlock_segment = 0;
- q->last_lock_was_writer_lock = False;
+ q->latest_wrlocked_segment = 0;
+ q->latest_rdlocked_segment = 0;
VG_(OSetGen_Insert)(oset, q);
}
tl_assert(q);
@@ -174,10 +176,18 @@
VG_(OSetGen_ResetIter)(p->thread_info);
for ( ; (q = VG_(OSetGen_Next)(p->thread_info)) != 0; )
{
- if (q->tid != tid && (readers_too || q->last_lock_was_writer_lock))
+ if (q->tid != tid)
{
- DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
- &q->last_unlock_segment->vc);
+ if (q->latest_wrlocked_segment)
+ {
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
+ &q->latest_wrlocked_segment->vc);
+ }
+ if (readers_too && q->latest_rdlocked_segment)
+ {
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[tid].last->vc,
+ &q->latest_rdlocked_segment->vc);
+ }
}
}
DRD_(thread_update_conflict_set)(tid, &old_vc);
@@ -229,8 +239,10 @@
VG_(OSetGen_ResetIter)(p->thread_info);
for ( ; (q = VG_(OSetGen_Next)(p->thread_info)) != 0; )
{
- DRD_(sg_put)(q->last_unlock_segment);
+ DRD_(sg_put)(q->latest_wrlocked_segment);
+ DRD_(sg_put)(q->latest_rdlocked_segment);
}
+
VG_(OSetGen_Destroy)(p->thread_info);
}
@@ -243,9 +255,7 @@
tl_assert(offsetof(DrdClientobj, rwlock) == 0);
p = &(DRD_(clientobj_get)(rwlock, ClientRwlock)->rwlock);
if (p)
- {
return p;
- }
if (DRD_(clientobj_present)(rwlock, rwlock + 1))
{
@@ -382,7 +392,6 @@
q = DRD_(lookup_or_insert_node)(p->thread_info, drd_tid);
if (++q->reader_nesting_count == 1)
{
- q->last_lock_was_writer_lock = False;
DRD_(thread_new_segment)(drd_tid);
DRD_(s_rwlock_segment_creation_count)++;
DRD_(rwlock_combine_other_vc)(p, drd_tid, False);
@@ -413,9 +422,7 @@
}
if (p == 0)
- {
p = DRD_(rwlock_get_or_allocate)(rwlock);
- }
tl_assert(p);
@@ -459,7 +466,6 @@
DRD_(thread_get_running_tid)());
tl_assert(q->writer_nesting_count == 0);
q->writer_nesting_count++;
- q->last_lock_was_writer_lock = True;
tl_assert(q->writer_nesting_count == 1);
DRD_(thread_new_segment)(drd_tid);
DRD_(s_rwlock_segment_creation_count)++;
@@ -534,6 +540,17 @@
&HEI);
}
}
+ if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
+ {
+ /*
+ * This pthread_rwlock_unlock() call really unlocks the rwlock. Save
+ * the current vector clock of the thread such that it is available
+ * when this rwlock is locked again.
+ */
+ DRD_(thread_get_latest_segment)(&q->latest_rdlocked_segment, drd_tid);
+ DRD_(thread_new_segment)(drd_tid);
+ DRD_(s_rwlock_segment_creation_count)++;
+ }
}
else if (q->writer_nesting_count > 0)
{
@@ -554,32 +571,30 @@
&HEI);
}
}
+ if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
+ {
+ /*
+ * This pthread_rwlock_unlock() call really unlocks the rwlock. Save
+ * the current vector clock of the thread such that it is available
+ * when this rwlock is locked again.
+ */
+ DRD_(thread_get_latest_segment)(&q->latest_wrlocked_segment, drd_tid);
+ DRD_(thread_new_segment)(drd_tid);
+ DRD_(s_rwlock_segment_creation_count)++;
+ }
}
else
{
tl_assert(False);
}
-
- if (q->reader_nesting_count == 0 && q->writer_nesting_count == 0)
- {
- /* This pthread_rwlock_unlock() call really unlocks the rwlock. Save */
- /* the current vector clock of the thread such that it is available */
- /* when this rwlock is locked again. */
-
- DRD_(thread_get_latest_segment)(&q->last_unlock_segment, drd_tid);
- DRD_(thread_new_segment)(drd_tid);
- DRD_(s_rwlock_segment_creation_count)++;
- }
}
-/**
- * Call this function when thread tid stops to exist, such that the
- * "last owner" field can be cleared if it still refers to that thread.
- */
+/** Called when thread tid stops to exist. */
static void rwlock_delete_thread(struct rwlock_info* const p,
const DrdThreadId tid)
{
struct rwlock_thread_info* q;
+
if (DRD_(rwlock_is_locked_by)(p, tid))
{
RwlockErrInfo REI = { DRD_(thread_get_running_tid)(), p->a1 };
|
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 07:58:05
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-07-25 02:15:57 EDT Ended at 2009-07-25 03:57:43 EDT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 433 tests, 45 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 431 tests, 43 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/wrap8 (stderr) none/tests/empty-exe (stderr) none/tests/linux/mremap (stderr) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) none/tests/shell_zerolength (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/hsg (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:07:25 2009 --- new.short Sat Jul 25 03:57:43 2009 *************** *** 8,10 **** ! == 431 tests, 43 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) --- 8,10 ---- ! == 433 tests, 45 stderr failures, 9 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) *************** *** 36,39 **** --- 36,41 ---- none/tests/shell_zerolength (stderr) + helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc06_two_races_xml (stderr) + helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) |
|
From: Bart V. A. <bar...@gm...> - 2009-07-25 05:11:17
|
On Fri, Jul 24, 2009 at 11:12 PM, Nicholas Nethercote <n.n...@gm...> wrote: > https://bugs.kde.org/show_bug.cgi?id=100628 concerns a program like this: > > #include <stdlib.h> > #include "valgrind.h" > > int main(void) > { > char* x; > > x = malloc(1000); > VALGRIND_MALLOCLIKE_BLOCK(x, /*szB*/ 16, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+100, /*szB*/ 32, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+200, /*szB*/ 64, /*rzB*/0, /*is_zeroed*/0); > VALGRIND_MALLOCLIKE_BLOCK(x+300, /*szB*/128, /*rzB*/0, /*is_zeroed*/0); > > return 0; > } > > It's a simplified version of a real problem, where a user implements a > custom allocator on top of malloc(). They use malloc() to allocate a > big chunk of memory, and then hand out pieces of it, using > MALLOCLIKE_BLOCK to mark those pieces as logically separate heap > blocks. Currently the leak checker barfs on it because it can't > handle overlapping heap blocks. > > I have a patch that tolerates overlaps such as these, where a custom > block falls entirely within a malloc()'d block. But there's a design > choice to be made. In such a case, what do we do with the malloc()'d > block? > > (1) Ignore it completely when leak checking > (2) Consider it when leak checking > > It's unclear to me which of these is preferable. (1) treats the > malloc() much as a mmap() or brk() would be treated, which is arguably > desirable, as many allocators are built on mmap() and/or brk() and so > treating malloc() in the same way makes some sense. But (2) involves > less special-casing, and is thus slightly easier to do than (1). > > Anyone have any preferences? My suggestion is to require that the user makes it clear to Valgrind that the memory allocated by the malloc() call in the example won't be used directly but will be handed out in pieces to the client program. Bart. |
|
From: Tom H. <th...@cy...> - 2009-07-25 02:47:42
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-07-25 03:05:05 BST Ended at 2009-07-25 03:47:25 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 516 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 513 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:26:25 2009 --- new.short Sat Jul 25 03:47:25 2009 *************** *** 8,10 **** ! == 513 tests, 1 stderr failure, 0 stdout failures, 0 post failures == helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 516 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Tom H. <th...@cy...> - 2009-07-25 02:31:07
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-07-25 03:10:06 BST Ended at 2009-07-25 03:30:49 BST Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 523 tests, 2 stderr failures, 0 stdout failures, 0 post failures == helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 520 tests, 1 stderr failure, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) helgrind/tests/tc06_two_races_xml (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Jul 25 03:20:34 2009 --- new.short Sat Jul 25 03:30:49 2009 *************** *** 8,11 **** ! == 520 tests, 1 stderr failure, 1 stdout failure, 0 post failures == ! none/tests/linux/mremap2 (stdout) helgrind/tests/tc06_two_races_xml (stderr) --- 8,11 ---- ! == 523 tests, 2 stderr failures, 0 stdout failures, 0 post failures == ! helgrind/tests/hg03_inherit (stderr) helgrind/tests/tc06_two_races_xml (stderr) |
|
From: Greg P. <gp...@ap...> - 2009-07-24 22:09:48
|
On Jul 24, 2009, at 4:28 AM, Bart Van Assche wrote: > When running DRD's regression tests on Darwin, 63 out of 64 regression > tests always pass and one regression test, rwlock_test, fails > sometimes. If that test fails it is because DRD reported one or more > conflicting memory loads triggered by line 35, the statement that > reads s_counter protected by a reader lock. Darwin's pthread_rwlock_init() reads a value from the pthread_rwlock_t struct before initializing anything. Valgrind doesn't like that. (They say it's required for Unix compliance; I say it's a bug and the standard requires no such thing.) -- Greg Parker gp...@ap... Runtime Wrangler |
|
From: Nicholas N. <n.n...@gm...> - 2009-07-24 21:12:48
|
Hi, https://bugs.kde.org/show_bug.cgi?id=100628 concerns a program like this: #include <stdlib.h> #include "valgrind.h" int main(void) { char* x; x = malloc(1000); VALGRIND_MALLOCLIKE_BLOCK(x, /*szB*/ 16, /*rzB*/0, /*is_zeroed*/0); VALGRIND_MALLOCLIKE_BLOCK(x+100, /*szB*/ 32, /*rzB*/0, /*is_zeroed*/0); VALGRIND_MALLOCLIKE_BLOCK(x+200, /*szB*/ 64, /*rzB*/0, /*is_zeroed*/0); VALGRIND_MALLOCLIKE_BLOCK(x+300, /*szB*/128, /*rzB*/0, /*is_zeroed*/0); return 0; } It's a simplified version of a real problem, where a user implements a custom allocator on top of malloc(). They use malloc() to allocate a big chunk of memory, and then hand out pieces of it, using MALLOCLIKE_BLOCK to mark those pieces as logically separate heap blocks. Currently the leak checker barfs on it because it can't handle overlapping heap blocks. I have a patch that tolerates overlaps such as these, where a custom block falls entirely within a malloc()'d block. But there's a design choice to be made. In such a case, what do we do with the malloc()'d block? (1) Ignore it completely when leak checking (2) Consider it when leak checking It's unclear to me which of these is preferable. (1) treats the malloc() much as a mmap() or brk() would be treated, which is arguably desirable, as many allocators are built on mmap() and/or brk() and so treating malloc() in the same way makes some sense. But (2) involves less special-casing, and is thus slightly easier to do than (1). Anyone have any preferences? Nick |
|
From: <sv...@va...> - 2009-07-24 20:48:53
|
Author: njn
Date: 2009-07-24 21:48:36 +0100 (Fri, 24 Jul 2009)
New Revision: 10597
Log:
Uncomment this; not sure why it was commented out.
Modified:
trunk/memcheck/tests/custom_alloc.c
Modified: trunk/memcheck/tests/custom_alloc.c
===================================================================
--- trunk/memcheck/tests/custom_alloc.c 2009-07-24 19:34:55 UTC (rev 10596)
+++ trunk/memcheck/tests/custom_alloc.c 2009-07-24 20:48:36 UTC (rev 10597)
@@ -94,8 +94,8 @@
// Bug 137073: passing 0 to MALLOCLIKE_BLOCK was causing an assertion
// failure. Test for this (and likewise for FREELIKE_BLOCK).
- //VALGRIND_MALLOCLIKE_BLOCK(0,0,0,0);
- //VALGRIND_FREELIKE_BLOCK(0,0);
+ VALGRIND_MALLOCLIKE_BLOCK(0,0,0,0);
+ VALGRIND_FREELIKE_BLOCK(0,0);
return x;
|
|
From: <sv...@va...> - 2009-07-24 19:35:05
|
Author: njn
Date: 2009-07-24 20:34:55 +0100 (Fri, 24 Jul 2009)
New Revision: 10596
Log:
DRD now works on Darwin!
Modified:
trunk/Makefile.am
trunk/NEWS
Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am 2009-07-24 19:09:52 UTC (rev 10595)
+++ trunk/Makefile.am 2009-07-24 19:34:55 UTC (rev 10596)
@@ -26,7 +26,8 @@
callgrind \
massif \
lackey \
- none
+ none \
+ drd
TEST_EXP_TOOLS = exp-bbv
endif
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2009-07-24 19:09:52 UTC (rev 10595)
+++ trunk/NEWS 2009-07-24 19:34:55 UTC (rev 10596)
@@ -12,7 +12,7 @@
planned because it would require work and 10.4 is only becoming less common.
Things that don't work:
- - Helgrind, DRD and Ptrcheck
+ - Helgrind and Ptrcheck
- Objective-C garbage collection
- --db-attach=yes
- Messages like the following indicate a mismatch between Valgrind's
|
|
From: Nicholas N. <n.n...@gm...> - 2009-07-24 19:27:19
|
On Fri, Jul 24, 2009 at 9:28 PM, Bart Van Assche<bar...@gm...> wrote: > > It would help if I could have a look at the > implementation of POSIX reader-writer locks in Darwin. Is this source > code available online and under a license that is compatible with the > development of source code under the GPL ? Go to http://www.opensource.apple.com/release/mac-os-x-1057/, look for "Libc-498.1.7". (For those who are interested, xnu-1228.12.14 is the kernel code and is also useful for Valgrind development, especially understanding syscalls.) It's available under APSL, BSD, MIT licenses so should be GPL compatible. Click on the arrow to download it. Then look in pthreads/pthread_rwlock.c. Nick |
|
From: <sv...@va...> - 2009-07-24 19:10:04
|
Author: njn
Date: 2009-07-24 20:09:52 +0100 (Fri, 24 Jul 2009)
New Revision: 10595
Log:
Add a note about our suspect handling of brk(). And disable the brk() part
of origin1-yes.c, because it's a pain, giving different results on different
systems. This allowed origin1-yes.stderr.exp-darwin to be removed.
Removed:
trunk/memcheck/tests/origin1-yes.stderr.exp-darwin
Modified:
trunk/memcheck/mc_main.c
trunk/memcheck/tests/Makefile.am
trunk/memcheck/tests/origin1-yes.c
trunk/memcheck/tests/origin1-yes.stderr.exp
Modified: trunk/memcheck/mc_main.c
===================================================================
--- trunk/memcheck/mc_main.c 2009-07-24 11:23:45 UTC (rev 10594)
+++ trunk/memcheck/mc_main.c 2009-07-24 19:09:52 UTC (rev 10595)
@@ -5735,6 +5735,50 @@
VG_(track_new_mem_startup) ( mc_new_mem_startup );
VG_(track_new_mem_stack_signal)( make_mem_undefined_w_tid );
+ // We assume that brk()/sbrk() does not initialise new memory. Is this
+ // accurate? John Reiser says:
+ //
+ // 0) sbrk() can *decrease* process address space. No zero fill is done
+ // for a decrease, not even the fragment on the high end of the last page
+ // that is beyond the new highest address. For maximum safety and
+ // portability, then the bytes in the last page that reside above [the
+ // new] sbrk(0) should be considered to be uninitialized, but in practice
+ // it is exceedingly likely that they will retain their previous
+ // contents.
+ //
+ // 1) If an increase is large enough to require new whole pages, then
+ // those new whole pages (like all new pages) are zero-filled by the
+ // operating system. So if sbrk(0) already is page aligned, then
+ // sbrk(PAGE_SIZE) *does* zero-fill the new memory.
+ //
+ // 2) Any increase that lies within an existing allocated page is not
+ // changed. So if (x = sbrk(0)) is not page aligned, then
+ // sbrk(PAGE_SIZE) yields ((PAGE_SIZE -1) & -x) bytes which keep their
+ // existing contents, and an additional PAGE_SIZE bytes which are zeroed.
+ // ((PAGE_SIZE -1) & x) of them are "covered" by the sbrk(), and the rest
+ // of them come along for the ride because the operating system deals
+ // only in whole pages. Again, for maximum safety and portability, then
+ // anything that lives above [the new] sbrk(0) should be considered
+ // uninitialized, but in practice will retain previous contents [zero in
+ // this case.]"
+ //
+ // In short:
+ //
+ // A key property of sbrk/brk is that new whole pages that are supplied
+ // by the operating system *do* get initialized to zero.
+ //
+ // As for the portability of all this:
+ //
+ // sbrk and brk are not POSIX. However, any system that is a derivative
+ // of *nix has sbrk and brk because there are too many softwares (such as
+ // the Bourne shell) which rely on the traditional memory map (.text,
+ // .data+.bss, stack) and the existence of sbrk/brk.
+ //
+ // So we should arguably observe all this. However:
+ // - The current inaccuracy has caused maybe one complaint in seven years(?)
+ // - Telying on the zeroed-ness of whole brk'd pages is pretty grotty... I
+ // doubt most programmers know the above information.
+ // So I'm not terribly unhappy with marking it as undefined. --njn.
VG_(track_new_mem_brk) ( make_mem_undefined_w_tid );
VG_(track_new_mem_mmap) ( mc_new_mem_mmap );
Modified: trunk/memcheck/tests/Makefile.am
===================================================================
--- trunk/memcheck/tests/Makefile.am 2009-07-24 11:23:45 UTC (rev 10594)
+++ trunk/memcheck/tests/Makefile.am 2009-07-24 19:09:52 UTC (rev 10595)
@@ -111,8 +111,7 @@
new_override.stderr.exp new_override.stdout.exp new_override.vgtest \
noisy_child.vgtest noisy_child.stderr.exp noisy_child.stdout.exp \
null_socket.stderr.exp null_socket.vgtest \
- origin1-yes.vgtest origin1-yes.stdout.exp \
- origin1-yes.stderr.exp origin1-yes.stderr.exp-darwin \
+ origin1-yes.vgtest origin1-yes.stdout.exp origin1-yes.stderr.exp \
origin2-not-quite.vgtest origin2-not-quite.stdout.exp \
origin2-not-quite.stderr.exp \
origin3-no.vgtest origin3-no.stdout.exp \
Modified: trunk/memcheck/tests/origin1-yes.c
===================================================================
--- trunk/memcheck/tests/origin1-yes.c 2009-07-24 11:23:45 UTC (rev 10594)
+++ trunk/memcheck/tests/origin1-yes.c 2009-07-24 19:09:52 UTC (rev 10595)
@@ -86,21 +86,28 @@
}
// Heap segment (brk), uninitialised
- // Nb: on Darwin, sbrk() is implemented via vm_allocate() which always
- // zeroes its allocated memory. So we use a separate .exp file for Darwin,
- // but we add an extra printf on Darwin only so that it cannot be
- // successfully matched on non-Darwin platforms.
-#if defined(VGO_darwin)
+ // CURRENTLY DISABLED. Why?
+ // - On Darwin, sbrk() is implemented via vm_allocate() which always zeroes
+ // its allocated memory. For a while we used use a separate .exp file
+ // for Darwin, but we add an extra printf on Darwin only so that it
+ // cannot be successfully matched on non-Darwin platforms.
+ // - On Ubuntu 9.04 configured with --enable-only32bit, the brk symbol
+ // shows up as "???"
+ // - Our current treatment of brk is suspect; whole new pages allocated
+ // with brk should arguably be marked defined -- see the big comment
+ // above track_new_mem_brk() in memcheck/mc_main.c.
+//#if defined(VGO_darwin)
fprintf(stderr, "\nUndef 7 of 8 (brk)\n");
- fprintf(stderr, "\n(no complaint; sbrk initialises memory on Darwin)\n");
-#else
- {
- int* ptr_to_new_brk_limit = sbrk(4096);
- int undef_brk_int = *ptr_to_new_brk_limit;
- fprintf(stderr, "\nUndef 7 of 8 (brk)\n");
- x += (undef_brk_int == 0x12345678 ? 15 : 26);
- }
-#endif
+// fprintf(stderr, "\n(no complaint; sbrk initialises memory on Darwin)\n");
+ fprintf(stderr, "\n(currently disabled)\n");
+//#else
+// {
+// int* ptr_to_new_brk_limit = sbrk(4096);
+// int undef_brk_int = *ptr_to_new_brk_limit;
+// fprintf(stderr, "\nUndef 7 of 8 (brk)\n");
+// x += (undef_brk_int == 0x12345678 ? 15 : 26);
+// }
+//#endif
// User block, marked as undefined
{
Modified: trunk/memcheck/tests/origin1-yes.stderr.exp
===================================================================
--- trunk/memcheck/tests/origin1-yes.stderr.exp 2009-07-24 11:23:45 UTC (rev 10594)
+++ trunk/memcheck/tests/origin1-yes.stderr.exp 2009-07-24 19:09:52 UTC (rev 10595)
@@ -44,19 +44,14 @@
Undef 7 of 8 (brk)
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:101)
- Uninitialised value was created
- at 0x........: brk (in /...libc...)
- by 0x........: sbrk (in /...libc...)
- by 0x........: main (origin1-yes.c:98)
+(currently disabled)
Undef 8 of 8 (MAKE_MEM_UNDEFINED)
Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:110)
+ at 0x........: main (origin1-yes.c:117)
Uninitialised value was created by a client request
- at 0x........: main (origin1-yes.c:108)
+ at 0x........: main (origin1-yes.c:115)
Def 1 of 3
Deleted: trunk/memcheck/tests/origin1-yes.stderr.exp-darwin
===================================================================
--- trunk/memcheck/tests/origin1-yes.stderr.exp-darwin 2009-07-24 11:23:45 UTC (rev 10594)
+++ trunk/memcheck/tests/origin1-yes.stderr.exp-darwin 2009-07-24 19:09:52 UTC (rev 10595)
@@ -1,60 +0,0 @@
-
-Undef 1 of 8 (stack, 32 bit)
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:37)
- Uninitialised value was created by a stack allocation
- at 0x........: main (origin1-yes.c:23)
-
-Undef 2 of 8 (stack, 32 bit)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:49)
- Uninitialised value was created by a stack allocation
- at 0x........: main (origin1-yes.c:23)
-
-Undef 3 of 8 (stack, 64 bit)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:56)
- Uninitialised value was created by a stack allocation
- at 0x........: main (origin1-yes.c:23)
-
-Undef 4 of 8 (mallocd, 32-bit)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:64)
- Uninitialised value was created by a heap allocation
- at 0x........: malloc (vg_replace_malloc.c:...)
- by 0x........: main (origin1-yes.c:61)
-
-Undef 5 of 8 (realloc)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:76)
- Uninitialised value was created by a heap allocation
- at 0x........: realloc (vg_replace_malloc.c:...)
- by 0x........: main (origin1-yes.c:71)
-
-Undef 6 of 8 (MALLOCLIKE_BLOCK)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:85)
- Uninitialised value was created by a heap allocation
- at 0x........: main (origin1-yes.c:82)
-
-Undef 7 of 8 (brk)
-
-(no complaint; sbrk initialises memory on Darwin)
-
-Undef 8 of 8 (MAKE_MEM_UNDEFINED)
-
-Conditional jump or move depends on uninitialised value(s)
- at 0x........: main (origin1-yes.c:110)
- Uninitialised value was created by a client request
- at 0x........: main (origin1-yes.c:108)
-
-Def 1 of 3
-
-Def 2 of 3
-
-Def 3 of 3
|