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
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
1
(10) |
2
(8) |
3
(17) |
4
(28) |
5
(22) |
6
(8) |
|
7
(8) |
8
(22) |
9
(12) |
10
(17) |
11
(14) |
12
(15) |
13
(6) |
|
14
(9) |
15
(9) |
16
(16) |
17
(13) |
18
(18) |
19
(7) |
20
(5) |
|
21
(6) |
22
(5) |
23
(11) |
24
(5) |
25
(11) |
26
(7) |
27
(15) |
|
28
(11) |
29
(12) |
30
(12) |
31
(15) |
|
|
|
|
From: Tom H. <th...@cy...> - 2007-10-22 02:23:54
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-22 03:05:06 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-22 02:23:00
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-22 03:10:04 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-22 02:15:58
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-22 03:00:03 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-10-22 00:17:34
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-22 02:00:01 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == 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 == 228 tests, 6 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/res_search (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Mon Oct 22 02:08:57 2007 --- new.short Mon Oct 22 02:17:35 2007 *************** *** 8,10 **** ! == 228 tests, 6 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) --- 8,10 ---- ! == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) *************** *** 17,19 **** none/tests/mremap2 (stdout) - none/tests/res_search (stdout) --- 17,18 ---- |
|
From: <sv...@va...> - 2007-10-21 23:08:45
|
Author: sewardj
Date: 2007-10-22 00:08:26 +0100 (Mon, 22 Oct 2007)
New Revision: 7026
Log:
First cut at supporting POSIX "unnamed semaphores".
Modified:
branches/THRCHECK/thrcheck/tc_intercepts.c
branches/THRCHECK/thrcheck/tc_main.c
branches/THRCHECK/thrcheck/thrcheck.h
Modified: branches/THRCHECK/thrcheck/tc_intercepts.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_intercepts.c 2007-10-18 23:14:48 UTC (rev 7025)
+++ branches/THRCHECK/thrcheck/tc_intercepts.c 2007-10-21 23:08:26 UTC (rev 7026)
@@ -825,9 +825,149 @@
/*----------------------------------------------------------------*/
-/*--- ---*/
+/*--- POSIX semaphores ---*/
/*----------------------------------------------------------------*/
+#include <semaphore.h>
+
+#define TRACE_SEM_FNS 0
+
+/* Handled:
+ int sem_init(sem_t *sem, int pshared, unsigned value);
+ int sem_destroy(sem_t *sem);
+ int sem_wait(sem_t *sem);
+ int sem_post(sem_t *sem);
+
+ Unhandled:
+ int sem_trywait(sem_t *sem);
+ int sem_timedwait(sem_t *restrict sem,
+ const struct timespec *restrict abs_timeout);
+*/
+
+/* glibc-2.5 has sem_init@@GLIBC_2.2.5; match sem_init@* */
+PTH_FUNC(int, semZuinitZAZa, sem_t* sem, int pshared, unsigned long value)
+{
+ OrigFn fn;
+ int ret;
+ VALGRIND_GET_ORIG_FN(fn);
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, "<< sem_init(%p,%d,%lu) ", sem,pshared,value);
+ fflush(stderr);
+ }
+
+ CALL_FN_W_WWW(ret, fn, sem,pshared,value);
+
+ if (ret == 0) {
+ /* Probably overly paranoid, but still ... */
+ DO_CREQ_v_W(_VG_USERREQ__TC_POSIX_SEM_ZAPSTACK, sem_t*,sem);
+ } else {
+ DO_PthAPIerror( "sem_init", errno );
+ }
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, " sem_init -> %d >>\n", ret);
+ fflush(stderr);
+ }
+
+ return ret;
+}
+
+
+/* glibc-2.5 has sem_destroy@@GLIBC_2.2.5; match sem_destroy@* */
+PTH_FUNC(int, semZudestroyZAZa, sem_t* sem)
+{
+ OrigFn fn;
+ int ret;
+ VALGRIND_GET_ORIG_FN(fn);
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, "<< sem_destroy(%p) ", sem);
+ fflush(stderr);
+ }
+
+ DO_CREQ_v_W(_VG_USERREQ__TC_POSIX_SEM_ZAPSTACK, sem_t*,sem);
+
+ CALL_FN_W_W(ret, fn, sem);
+
+ if (ret != 0) {
+ DO_PthAPIerror( "sem_destroy", errno );
+ }
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, " sem_destroy -> %d >>\n", ret);
+ fflush(stderr);
+ }
+
+ return ret;
+}
+
+
+/* glibc-2.5 has sem_wait; match sem_wait */
+/* wait: decrement semaphore - acquire lockage */
+PTH_FUNC(int, semZuwait, sem_t* sem)
+{
+ OrigFn fn;
+ int ret;
+ VALGRIND_GET_ORIG_FN(fn);
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, "<< sem_wait(%p) ", sem);
+ fflush(stderr);
+ }
+
+ CALL_FN_W_W(ret, fn, sem);
+
+ if (ret == 0) {
+ DO_CREQ_v_W(_VG_USERREQ__TC_POSIX_SEMWAIT_POST, sem_t*,sem);
+ } else {
+ DO_PthAPIerror( "sem_wait", errno );
+ }
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, " sem_wait -> %d >>\n", ret);
+ fflush(stderr);
+ }
+
+ return ret;
+}
+
+
+/* glibc-2.5 has sem_post; match sem_post */
+/* post: increment semaphore - release lockage */
+PTH_FUNC(int, semZupost, sem_t* sem)
+{
+ OrigFn fn;
+ int ret;
+
+ VALGRIND_GET_ORIG_FN(fn);
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, "<< sem_post(%p) ", sem);
+ fflush(stderr);
+ }
+
+ DO_CREQ_v_W(_VG_USERREQ__TC_POSIX_SEMPOST_PRE, sem_t*,sem);
+
+ CALL_FN_W_W(ret, fn, sem);
+
+ if (ret != 0) {
+ DO_PthAPIerror( "sem_post", errno );
+ }
+
+ if (TRACE_SEM_FNS) {
+ fprintf(stderr, " sem_post -> %d >>\n", ret);
+ fflush(stderr);
+ }
+
+ return ret;
+}
+
+
+/*----------------------------------------------------------------*/
+/*--- Qt 4 threading functions (w/ GNU name mangling) ---*/
+/*----------------------------------------------------------------*/
+
/* Handled: QMutex::lock()
QMutex::unlock()
QMutex::tryLock
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-18 23:14:48 UTC (rev 7025)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-21 23:08:26 UTC (rev 7026)
@@ -113,6 +113,8 @@
// 2 = as 1 + segments at condition variable signal/broadcast/wait too
static Int clo_happens_before = 2; /* default setting */
+/* Generate .vcg output of the happens-before graph? */
+static Bool clo_gen_vcg = False;
// FIXME: when a SecMap is completely set via and address range
// setting operation to a non-ShR/M state, clear its .mbHasShared
@@ -293,7 +295,7 @@
struct _Segment* other; /* Possibly a segment from some other
thread, which happened-before me */
/* DEBUGGING ONLY: what does 'other' arise from?
- c=thread creation, j=join, s=cvsignal */
+ c=thread creation, j=join, s=cvsignal, S=semaphore */
Char other_hint;
}
Segment;
@@ -1698,6 +1700,7 @@
Green -- thread creation, link to parent
Red -- thread exit, link to exiting thread
Yellow -- signal edge
+ Ping -- semaphore-up edge
*/
Segment* seg;
VG_(printf)(PFX "graph: { title: \"Segments\"\n");
@@ -1708,9 +1711,16 @@
VG_(printf)(PFX "y: 20\n");
VG_(printf)(PFX "color: lightgrey\n");
for (seg = admin_segments; seg; seg=seg->admin) {
+
VG_(printf)(PFX "node: { title: \"%p\" color: lightcyan "
- "textcolor: darkgreen label: \"Seg %x\\nThr %x\" }\n",
- seg, seg, seg->thr);
+ "textcolor: darkgreen label: \"Seg %x\\n",
+ seg, seg);
+ if (seg->thr->errmsg_index == 1) {
+ VG_(printf)("ROOT_THREAD\" }\n");
+ } else {
+ VG_(printf)("Thr# %d\" }\n", seg->thr->errmsg_index);
+ }
+
if (seg->prev)
VG_(printf)(PFX "edge: { sourcename: \"%p\" targetname: \"%p\""
"color: black }\n", seg->prev, seg );
@@ -1720,6 +1730,7 @@
case 'c': colour = "darkgreen"; break; /* creation */
case 'j': colour = "red"; break; /* join (exit) */
case 's': colour = "orange"; break; /* signal */
+ case 'S': colour = "pink"; break; /* signal */
case 'u': colour = "cyan"; break; /* unlock */
default: tl_assert(0);
}
@@ -5552,6 +5563,183 @@
}
+/* --------------- events to do with semaphores --------------- */
+
+/* This is similar but not identical the handling for condition
+ variables. */
+
+/* For each semaphore, we maintain a stack of Segments. When a 'post'
+ operation is done on a semaphore (unlocking, essentially), a new
+ segment is created for the posting thread, and the old segment is
+ pushed on the semaphore's stack.
+
+ Later, when a (probably different) thread completes 'wait' on the
+ semaphore, we pop a Segment off the semaphore's stack (which should
+ be nonempty). We start a new segment for the thread and make it
+ also depend on the just-popped segment. This mechanism creates
+ dependencies between posters and waiters of the semaphore.
+
+ It may not be necessary to use a stack - perhaps a bag of Segments
+ would do. But we do need to keep track of how many unused-up posts
+ have happened for the semaphore.
+
+ Imagine T1 and T2 both post once on a semphore S, and T3 waits
+ twice on S. T3 cannot complete its waits without both T1 and T2
+ posting. The above mechanism will ensure that T3 acquires
+ dependencies on both T1 and T2.
+*/
+
+/* sem_t* -> XArray* Segment* */
+static WordFM* map_sem_to_Segment_stack = NULL;
+
+static void map_sem_to_Segment_stack_INIT ( void ) {
+ if (map_sem_to_Segment_stack == NULL) {
+ map_sem_to_Segment_stack = TC_(newFM)( tc_zalloc, tc_free, NULL );
+ tl_assert(map_sem_to_Segment_stack != NULL);
+ }
+}
+
+static void push_Segment_for_sem ( void* sem, Segment* seg ) {
+ XArray* xa;
+ tl_assert(seg);
+ map_sem_to_Segment_stack_INIT();
+ if (TC_(lookupFM)( map_sem_to_Segment_stack,
+ NULL, (Word*)&xa, (Word)sem )) {
+ tl_assert(xa);
+ VG_(addToXA)( xa, &seg );
+ } else {
+ xa = VG_(newXA)( tc_zalloc, tc_free, sizeof(Segment*) );
+ VG_(addToXA)( xa, &seg );
+ TC_(addToFM)( map_sem_to_Segment_stack, (Word)sem, (Word)xa );
+ }
+}
+
+static Segment* mb_pop_Segment_for_sem ( void* sem ) {
+ XArray* xa;
+ Segment* seg;
+ map_sem_to_Segment_stack_INIT();
+ if (TC_(lookupFM)( map_sem_to_Segment_stack,
+ NULL, (Word*)&xa, (Word)sem )) {
+ /* xa is the stack for this semaphore. */
+ Word sz = VG_(sizeXA)( xa );
+ tl_assert(sz >= 0);
+ if (sz == 0)
+ return NULL; /* odd, the stack is empty */
+ seg = *(Segment**)VG_(indexXA)( xa, sz-1 );
+ tl_assert(seg);
+ VG_(dropTailXA)( xa, 1 );
+ return seg;
+ } else {
+ /* hmm, that's odd. No stack for this semaphore. */
+ return NULL;
+ }
+}
+
+static void evh__TC_POSIX_SEM_ZAPSTACK ( ThreadId tid, void* sem )
+{
+ Segment* seg;
+
+ /* Empty out the semaphore's segment stack. Occurs at
+ sem_init and sem_destroy time. */
+ if (SHOW_EVENTS >= 1)
+ VG_(printf)("evh__TC_POSIX_SEM_ZAPSTACK(ctid=%d, sem=%p)\n",
+ (Int)tid, (void*)sem );
+
+ /* This is stupid, but at least it's easy. */
+ do {
+ seg = mb_pop_Segment_for_sem( sem );
+ } while (seg);
+
+ tl_assert(!seg);
+}
+
+static void evh__TC_POSIX_SEMPOST_PRE ( ThreadId tid, void* sem )
+{
+ /* 'tid' has posted on 'sem'. Start a new segment for this thread,
+ and push the old segment on a stack of segments associated with
+ 'sem'. This is later used by other thread(s) which successfully
+ exit from a sem_wait on the same sem; then they know what the
+ posting segment was, so a dependency edge back to it can be
+ constructed. */
+
+ Thread* thr;
+ SegmentID new_segid;
+ Segment* new_seg;
+
+ if (SHOW_EVENTS >= 1)
+ VG_(printf)("evh__TC_POSIX_SEMPOST_PRE(ctid=%d, sem=%p)\n",
+ (Int)tid, (void*)sem );
+
+ thr = map_threads_maybe_lookup( tid );
+ tl_assert(thr); /* cannot fail - Thread* must already exist */
+
+ // error-if: sem is bogus
+
+ if (clo_happens_before >= 2) {
+ /* create a new segment ... */
+ new_segid = 0; /* bogus */
+ new_seg = NULL;
+ evhH__start_new_segment_for_thread( &new_segid, &new_seg, thr );
+ tl_assert( is_sane_SegmentID(new_segid) );
+ tl_assert( is_sane_Segment(new_seg) );
+ tl_assert( new_seg->thr == thr );
+ tl_assert( is_sane_Segment(new_seg->prev) );
+
+ /* ... and add the binding. */
+ push_Segment_for_sem( sem, new_seg->prev );
+ }
+}
+
+static void evh__TC_POSIX_SEMWAIT_POST ( ThreadId tid, void* sem )
+{
+ /* A sem_wait(sem) completed successfully. Start a new segment for
+ this thread. Pop the posting-segment for the 'sem' in the
+ mapping, and add a dependency edge from the new segment back to
+ it. */
+
+ Thread* thr;
+ SegmentID new_segid;
+ Segment* new_seg;
+ Segment* posting_seg;
+
+ if (SHOW_EVENTS >= 1)
+ VG_(printf)("evh__TC_POSIX_SEMWAIT_POST(ctid=%d, sem=%p)\n",
+ (Int)tid, (void*)sem );
+
+ thr = map_threads_maybe_lookup( tid );
+ tl_assert(thr); /* cannot fail - Thread* must already exist */
+
+ // error-if: sem is bogus
+
+ if (clo_happens_before >= 2) {
+ /* create a new segment ... */
+ new_segid = 0; /* bogus */
+ new_seg = NULL;
+ evhH__start_new_segment_for_thread( &new_segid, &new_seg, thr );
+ tl_assert( is_sane_SegmentID(new_segid) );
+ tl_assert( is_sane_Segment(new_seg) );
+ tl_assert( new_seg->thr == thr );
+ tl_assert( is_sane_Segment(new_seg->prev) );
+ tl_assert( new_seg->other == NULL);
+
+ /* and find out which thread posted last on sem; then add a
+ dependency edge back to it. */
+ posting_seg = mb_pop_Segment_for_sem( sem );
+ if (posting_seg) {
+ tl_assert(is_sane_Segment(posting_seg));
+ new_seg->other = posting_seg;
+ new_seg->other_hint = 'S';
+ } else {
+ /* Hmm. How can a wait on 'sem' succeed if nobody posted to
+ it? If this happened it would surely be a bug in the
+ threads library. */
+ record_error_Misc( thr, "Bug in libpthread: sem_wait succeeded on"
+ " semaphore without prior sem_post");
+ }
+ }
+}
+
+
/*--------------------------------------------------------------*/
/*--- Lock acquisition order monitoring ---*/
/*--------------------------------------------------------------*/
@@ -6525,6 +6713,18 @@
evh__TC_PTHREAD_RWLOCK_UNLOCK_POST( tid, (void*)args[1] );
break;
+ case _VG_USERREQ__TC_POSIX_SEMPOST_PRE: /* sem_t* */
+ evh__TC_POSIX_SEMPOST_PRE( tid, (void*)args[1] );
+ break;
+
+ case _VG_USERREQ__TC_POSIX_SEMWAIT_POST: /* sem_t* */
+ evh__TC_POSIX_SEMWAIT_POST( tid, (void*)args[1] );
+ break;
+
+ case _VG_USERREQ__TC_POSIX_SEM_ZAPSTACK: /* sem_t* */
+ evh__TC_POSIX_SEM_ZAPSTACK( tid, (void*)args[1] );
+ break;
+
default:
/* Unhandled Thrcheck client request! */
tl_assert2(0, "unhandled Thrcheck client request!");
@@ -7306,6 +7506,11 @@
else if (VG_CLO_STREQ(arg, "--happens-before=condvars"))
clo_happens_before = 2;
+ else if (VG_CLO_STREQ(arg, "--gen-vcg=no"))
+ clo_gen_vcg = False;
+ else if (VG_CLO_STREQ(arg, "--gen-vcg=yes"))
+ clo_gen_vcg = True;
+
else
return VG_(replacement_malloc_process_cmd_line_option)(arg);
@@ -7324,6 +7529,8 @@
static void tc_print_debug_usage ( void )
{
VG_(replacement_malloc_print_debug_usage)();
+ VG_(printf)(" --gen-vcg=no|yes show happens-before graph "
+ "in .vcg format [no]\n");
}
static void tc_post_clo_init ( void )
@@ -7337,7 +7544,7 @@
if (sanity_flags)
all__sanity_check("SK_(fini)");
- if (0)
+ if (clo_gen_vcg)
segments__generate_vcg();
if (VG_(clo_verbosity) >= 2) {
Modified: branches/THRCHECK/thrcheck/thrcheck.h
===================================================================
--- branches/THRCHECK/thrcheck/thrcheck.h 2007-10-18 23:14:48 UTC (rev 7025)
+++ branches/THRCHECK/thrcheck/thrcheck.h 2007-10-21 23:08:26 UTC (rev 7026)
@@ -87,7 +87,10 @@
_VG_USERREQ__TC_PTHREAD_RWLOCK_LOCK_PRE, // pth_rwlk_t*, long isW
_VG_USERREQ__TC_PTHREAD_RWLOCK_LOCK_POST, // pth_rwlk_t*, long isW
_VG_USERREQ__TC_PTHREAD_RWLOCK_UNLOCK_PRE, // pth_rwlk_t*
- _VG_USERREQ__TC_PTHREAD_RWLOCK_UNLOCK_POST // pth_rwlk_t*
+ _VG_USERREQ__TC_PTHREAD_RWLOCK_UNLOCK_POST, // pth_rwlk_t*
+ _VG_USERREQ__TC_POSIX_SEMPOST_PRE, // sem_t*
+ _VG_USERREQ__TC_POSIX_SEMWAIT_POST, // sem_t*
+ _VG_USERREQ__TC_POSIX_SEM_ZAPSTACK // sem_t*
} Vg_TCheckClientRequest;
/* Clean memory state. This makes Thrcheck forget everything it knew
|
|
From: Tom H. <th...@cy...> - 2007-10-21 02:31:47
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-21 03:15:02 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 == 260 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-21 02:24:12
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-21 03:05:06 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-21 02:23:11
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-21 03:10:04 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-21 02:11:05
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-21 03:00:02 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-10-21 00:48:23
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-21 02:00:01 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-20 02:31:25
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-20 03:15:01 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 == 260 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-20 02:23:49
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-20 03:05:06 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-20 02:23:11
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-20 03:10:03 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_cvsimple (stdout) ================================================= == 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Oct 20 03:16:40 2007 --- new.short Sat Oct 20 03:23:08 2007 *************** *** 15,17 **** none/tests/mremap2 (stdout) ! none/tests/pth_detached (stdout) --- 15,17 ---- none/tests/mremap2 (stdout) ! none/tests/pth_cvsimple (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-20 02:10:50
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-20 03:00:02 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-10-20 00:17:08
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-20 02:00:01 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Rich C. <Ric...@me...> - 2007-10-19 16:00:38
|
I made the required changes and sent the patch to the list and Julian. There were just a few minor changes required to get it to work. R. On Fri, 19 Oct 2007 09:09:26 +1000 (EST) Nicholas Nethercote <nj...@cs...> wrote: > On Thu, 18 Oct 2007, Julian Seward wrote: > > >> the later was a very optimistic guess to replace the missing with what > >> sounds similar. it still does not build and I know next to nothing of > >> VG internals. Thanks for looking into this! > > > > Stefan, I guess you are building against 3.2.3 instead of against the > > current svn trunk. There are a number of differences. If you check out > > the trunk (see http://www.valgrind.org/downloads/repository.html) > > then I imagine this will build and work no problem. > > I thought it sounded the other way around -- he was building against the > trunk, and Omega still is using the 3.2.3 names? Either way, the fixes > should be very easy, just small name changes. > > Nick > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > -- Rich Coe ric...@me... Virtual Principle Engineer General Electric Healthcare Technologies Global Software Platforms, Computer Technology Team |
|
From: Stefan K. <en...@ho...> - 2007-10-19 06:26:14
|
Hi, Quoting Julian Seward <js...@ac...>: > On Thursday 18 October 2007 16:26, Stefan Kost wrote: > >> the later was a very optimistic guess to replace the missing with what >> sounds similar. it still does not build and I know next to nothing of >> VG internals. Thanks for looking into this! > > Stefan, I guess you are building against 3.2.3 instead of against the > current svn trunk. There are a number of differences. If you check out > the trunk (see http://www.valgrind.org/downloads/repository.html) > then I imagine this will build and work no problem. > > J > I used svn://svn.valgrind.org/valgrind/trunk and I got the url from the valgrind webpage. Stefan |
|
From: Tom H. <th...@cy...> - 2007-10-19 02:31:14
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2007-10-19 03:15:02 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 == 260 tests, 27 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-19 02:23:49
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2007-10-19 03:05: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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-19 02:23:29
|
Nightly build on dellow ( x86_64, Fedora 7 ) started at 2007-10-19 03:10:04 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 == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_detached (stdout) ================================================= == 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 == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) memcheck/tests/xml1 (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Oct 19 03:16:42 2007 --- new.short Fri Oct 19 03:23:07 2007 *************** *** 8,10 **** ! == 293 tests, 4 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 293 tests, 4 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,16 **** --- 15,17 ---- none/tests/mremap2 (stdout) + none/tests/pth_detached (stdout) |
|
From: Tom H. <th...@cy...> - 2007-10-19 02:15:41
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2007-10-19 03:00:03 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 == 295 tests, 6 stderr failures, 1 stdout failure, 0 posttest failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) |
|
From: <js...@ac...> - 2007-10-19 00:17:23
|
Nightly build on g5 ( SuSE 10.1, ppc970 ) started at 2007-10-19 02:00:02 CEST 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 == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) ================================================= == 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 == 228 tests, 6 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/pointer-trace (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_cmsg (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/res_search (stdout) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Fri Oct 19 02:08:55 2007 --- new.short Fri Oct 19 02:17:23 2007 *************** *** 8,10 **** ! == 228 tests, 6 stderr failures, 3 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) --- 8,10 ---- ! == 228 tests, 6 stderr failures, 2 stdout failures, 0 posttest failures == memcheck/tests/deep_templates (stdout) *************** *** 17,19 **** none/tests/mremap2 (stdout) - none/tests/res_search (stdout) --- 17,18 ---- |
|
From: <sv...@va...> - 2007-10-18 23:14:46
|
Author: njn Date: 2007-10-19 00:14:48 +0100 (Fri, 19 Oct 2007) New Revision: 7025 Log: Suggest compiling with --Wall. Modified: trunk/docs/xml/manual-core.xml Modified: trunk/docs/xml/manual-core.xml =================================================================== --- trunk/docs/xml/manual-core.xml 2007-10-18 23:02:29 UTC (rev 7024) +++ trunk/docs/xml/manual-core.xml 2007-10-18 23:14:48 UTC (rev 7025) @@ -116,8 +116,12 @@ this often makes things unmanagably slow, a reasonable compromise is to use <computeroutput>-O</computeroutput>. This gets you the majority of the benefits of higher optimisation levels whilst keeping relatively small the -chances of false positives or false negatives from Memcheck. All other -tools (as far as we know) are unaffected by optimisation level.</para> +chances of false positives or false negatives from Memcheck. Also, you +should compile your code with <computeroutput>-Wall</computeroutput> because +it can identify some or all of the problems that Valgrind can miss at the +higher optimisations levels. (Using <computeroutput>-Wall</computeroutput> +is also a good idea in general.) All other tools (as far as we know) are +unaffected by optimisation level.</para> <para>Valgrind understands both the older "stabs" debugging format, used by gcc versions prior to 3.1, and the newer DWARF2 and DWARF3 formats |
|
From: Nicholas N. <nj...@cs...> - 2007-10-18 23:09:38
|
On Thu, 18 Oct 2007, Julian Seward wrote: >> the later was a very optimistic guess to replace the missing with what >> sounds similar. it still does not build and I know next to nothing of >> VG internals. Thanks for looking into this! > > Stefan, I guess you are building against 3.2.3 instead of against the > current svn trunk. There are a number of differences. If you check out > the trunk (see http://www.valgrind.org/downloads/repository.html) > then I imagine this will build and work no problem. I thought it sounded the other way around -- he was building against the trunk, and Omega still is using the 3.2.3 names? Either way, the fixes should be very easy, just small name changes. Nick |
|
From: <sv...@va...> - 2007-10-18 23:02:33
|
Author: sewardj
Date: 2007-10-19 00:02:29 +0100 (Fri, 19 Oct 2007)
New Revision: 7024
Log:
Tidy up a bit, move some code around etc. No functional changes.
Modified:
branches/THRCHECK/thrcheck/tc_main.c
Modified: branches/THRCHECK/thrcheck/tc_main.c
===================================================================
--- branches/THRCHECK/thrcheck/tc_main.c 2007-10-18 20:26:41 UTC (rev 7023)
+++ branches/THRCHECK/thrcheck/tc_main.c 2007-10-18 23:02:29 UTC (rev 7024)
@@ -770,6 +770,32 @@
tl_assert(is_sane_LockN(lk));
}
+static void remove_Lock_from_locksets_of_all_owning_Threads( Lock* lk )
+{
+ Thread* thr;
+ if (!lk->heldBy) {
+ tl_assert(!lk->heldW);
+ return;
+ }
+ /* for each thread that holds this lock do ... */
+ TC_(initIterBag)( lk->heldBy );
+ while (TC_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) {
+ tl_assert(is_sane_Thread(thr));
+ tl_assert(TC_(elemWS)( univ_lsets,
+ thr->locksetA, (Word)lk ));
+ thr->locksetA
+ = TC_(delFromWS)( univ_lsets, thr->locksetA, (Word)lk );
+
+ if (lk->heldW) {
+ tl_assert(TC_(elemWS)( univ_lsets,
+ thr->locksetW, (Word)lk ));
+ thr->locksetW
+ = TC_(delFromWS)( univ_lsets, thr->locksetW, (Word)lk );
+ }
+ }
+ TC_(doneIterBag)( lk->heldBy );
+}
+
/* --------- xxxID functions --------- */
/* Proposal (for debugging sanity):
@@ -2106,29 +2132,6 @@
#undef BAD
}
-/* Generic template for iterating over all words in a SecMap:
-static void zzzzz ( SecMap* sm, void (*F)(UInt) )
-{
- Word zi, zj;
- CacheLineZ* lineZ;
- CacheLineF* lineF;
- for (zi = 0; zi < N_SECMAP_ZLINES; zi++) {
- get_ZF_by_index( &lineZ, &lineF, sm, zi );
- if (lineZ) {
- tl_assert(!lineF);
- for (zj = 0; zj < 4; zj++) {
- if (lineZ->dict[zj])
- F(lineZ->dict[zj]);
- }
- } else {
- tl_assert(!lineZ);
- for (zj = 0; zj < N_LINE_W8s; zj++) {
- F( lineF->fw32[zj] );
- }
- }
- }
-}
-*/
/* Sanity check shadow memory, as far as possible */
static void shmem__sanity_check ( Char* who )
@@ -2670,6 +2673,12 @@
/*--- Shadow value and address range handlers ---*/
/*----------------------------------------------------------------*/
+static void laog__pre_thread_acquires_lock ( Thread*, Lock* ); /* fwds */
+static void laog__handle_lock_deletions ( WordSetID ); /* fwds */
+
+
+/* ------------ CacheLineF and CacheLineZ related ------------ */
+
static void write_twobit_array ( UChar* arr, UWord ix, UWord b2 ) {
Word bix, shft, mask, prep;
tl_assert((b2 & ~3) == 0);
@@ -2691,7 +2700,8 @@
/* Given a lineZ index and a SecMap, return the CacheLineZ* and CacheLineF*
for that index. */
-static void get_ZF_by_index ( /*OUT*/CacheLineZ** zp, /*OUT*/CacheLineF** fp,
+static void get_ZF_by_index ( /*OUT*/CacheLineZ** zp,
+ /*OUT*/CacheLineF** fp,
SecMap* sm, Int zix ) {
CacheLineZ* lineZ;
tl_assert(zp);
@@ -2713,9 +2723,8 @@
}
}
-static
-void find_ZF_for_reading ( /*OUT*/CacheLineZ** zp,
- /*OUT*/CacheLineF** fp, Addr tag ) {
+static void find_ZF_for_reading ( /*OUT*/CacheLineZ** zp,
+ /*OUT*/CacheLineF** fp, Addr tag ) {
CacheLineZ* lineZ;
CacheLineF* lineF;
UWord zix;
@@ -2741,10 +2750,9 @@
*fp = lineF;
}
-static
-void find_Z_for_writing ( /*OUT*/SecMap** smp,
- /*OUT*/Word* zixp,
- Addr tag ) {
+static void find_Z_for_writing ( /*OUT*/SecMap** smp,
+ /*OUT*/Word* zixp,
+ Addr tag ) {
CacheLineZ* lineZ;
CacheLineF* lineF;
UWord zix;
@@ -2771,10 +2779,8 @@
*zixp = zix;
}
-static
-void alloc_F_for_writing ( /*MOD*/SecMap* sm,
- /*OUT*/Word* fixp )
-{
+static
+void alloc_F_for_writing ( /*MOD*/SecMap* sm, /*OUT*/Word* fixp ) {
Word i, new_size;
CacheLineF* nyu;
@@ -2832,6 +2838,9 @@
tl_assert(0);
}
+
+/* ------------ CacheLine and implicit-tree related ------------ */
+
__attribute__((unused))
static void pp_CacheLine ( CacheLine* cl ) {
Word i;
@@ -2960,6 +2969,7 @@
# undef BYTE
}
+__attribute__((unused))
static Bool is_sane_Descr ( UShort descr ) {
return descr_to_validbits(descr) != 0;
}
@@ -3045,35 +3055,7 @@
return False;
}
-static void laog__pre_thread_acquires_lock ( Thread*, Lock* ); /* fwds */
-static void laog__handle_lock_deletions ( WordSetID ); /* fwds */
-static void remove_Lock_from_locksets_of_all_owning_Threads( Lock* lk )
-{
- Thread* thr;
- if (!lk->heldBy) {
- tl_assert(!lk->heldW);
- return;
- }
- /* for each thread that holds this lock do ... */
- TC_(initIterBag)( lk->heldBy );
- while (TC_(nextIterBag)( lk->heldBy, (Word*)&thr, NULL )) {
- tl_assert(is_sane_Thread(thr));
- tl_assert(TC_(elemWS)( univ_lsets,
- thr->locksetA, (Word)lk ));
- thr->locksetA
- = TC_(delFromWS)( univ_lsets, thr->locksetA, (Word)lk );
-
- if (lk->heldW) {
- tl_assert(TC_(elemWS)( univ_lsets,
- thr->locksetW, (Word)lk ));
- thr->locksetW
- = TC_(delFromWS)( univ_lsets, thr->locksetW, (Word)lk );
- }
- }
- TC_(doneIterBag)( lk->heldBy );
-}
-
static UShort normalise_tree ( /*MOD*/UInt* tree ) {
Word i;
UShort descr;
@@ -3131,7 +3113,7 @@
/* This takes a cacheline where all the data is at the leaves
(w8[..]) and builds a correctly normalised tree. */
-static void cacheline_normalise ( /*MOD*/CacheLine* cl )
+static void normalise_CacheLine ( /*MOD*/CacheLine* cl )
{
Word tno, cloff;
for (tno = 0, cloff = 0; tno < N_LINE_TREES; tno++, cloff += 8) {
@@ -3191,7 +3173,7 @@
/* Write the cacheline 'wix' to backing store. Where it ends up
is determined by its tag field. */
static
-Bool sequentialise_into ( /*OUT*/UInt* dst, Word nDst, CacheLine* src )
+Bool sequentialise_CacheLine ( /*OUT*/UInt* dst, Word nDst, CacheLine* src )
{
Word tno, cloff;
Bool anyShared = False;
@@ -3252,7 +3234,7 @@
/* Generate the data to be stored */
/* EXPENSIVE: tl_assert(is_sane_CacheLine( cl )); */
- anyShared = sequentialise_into( shvals, N_LINE_ARANGE, cl );
+ anyShared = sequentialise_CacheLine( shvals, N_LINE_ARANGE, cl );
lineZ->dict[0] = lineZ->dict[1]
= lineZ->dict[2] = lineZ->dict[3] = 0;
@@ -3353,7 +3335,7 @@
}
stats__cache_Z_fetches++;
}
- cacheline_normalise( cl );
+ normalise_CacheLine( cl );
}
static void shmem__invalidate_scache ( void ) {
@@ -3365,6 +3347,7 @@
}
stats__cache_invals++;
}
+
static void shmem__flush_and_invalidate_scache ( void ) {
Word wix;
Addr tag;
@@ -3384,6 +3367,9 @@
stats__cache_invals++;
}
+
+/* ------------ Basic shadow memory read/write ops ------------ */
+
static inline Bool aligned16 ( Addr a ) {
return 0 == (a & 1);
}
@@ -3450,8 +3436,6 @@
return cl;
}
-/////////////////////////////vvvvvvvvvvvvvvvvvvvvvvvvvvvvv
-
static UShort pulldown_to_32 ( /*MOD*/UInt* tree, UWord toff, UShort descr ) {
stats__cline_64to32pulldown++;
switch (toff) {
@@ -3728,6 +3712,7 @@
shadow_mem_read32_SLOW( thr_acc, a, uuOpaque );
}
+inline
static void shadow_mem_read64 ( Thread* thr_acc, Addr a, UInt uuOpaque ) {
CacheLine* cl;
UWord cloff, tno, toff;
@@ -3804,38 +3789,6 @@
shadow_mem_write8( thr_acc, a + 1, 0/*unused*/ );
}
-#if 0
-static void shadow_mem_write32 ( Thread* thr_acc, Addr a, UInt uuOpaque ) {
- CacheLine* cl;
- UWord cloff, tno, toff;
- UInt svOld, svNew;
- UShort descr;
- stats__cline_write32s++;
- if (UNLIKELY(!aligned32(a))) goto slowcase;
- cl = get_cacheline(a);
- cloff = get_cacheline_offset(a);
- tno = get_treeno(a);
- toff = get_tree_offset(a); /* == 0 or 4 */
- descr = cl->descrs[tno];
- if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) {
- if (valid_value_is_above_me_32(descr, toff)) {
- UInt* tree = &cl->svals[tno << 3];
- cl->descrs[tno] = pulldown_to_32(tree, toff, descr);
- } else {
- goto slowcase;
- }
- /* EXPENSIVE: tl_assert(is_sane_CacheLine(cl)); */
- }
- svOld = cl->svals[cloff];
- svNew = msm__handle_write( thr_acc, a, svOld, 4 );
- cl->svals[cloff] = svNew;
- return;
- slowcase: /* misaligned, or must go further down the tree */
- stats__cline_32to16splits++;
- shadow_mem_write16( thr_acc, a + 0, 0/*unused*/ );
- shadow_mem_write16( thr_acc, a + 2, 0/*unused*/ );
-}
-#else
__attribute__((noinline))
static void shadow_mem_write32_SLOW ( Thread* thr_acc, Addr a, UInt uuOpaque ) {
CacheLine* cl;
@@ -3886,8 +3839,8 @@
slowcase: /* misaligned, or must go further down the tree */
shadow_mem_write32_SLOW( thr_acc, a, uuOpaque );
}
-#endif
+inline
static void shadow_mem_write64 ( Thread* thr_acc, Addr a, UInt uuOpaque ) {
CacheLine* cl;
UWord cloff, tno, toff;
@@ -4000,6 +3953,7 @@
shadow_mem_set16( uu_thr_acc, a + 0, svNew );
shadow_mem_set16( uu_thr_acc, a + 2, svNew );
}
+inline
static void shadow_mem_set64 ( Thread* uu_thr_acc, Addr a, UInt svNew ) {
CacheLine* cl;
UWord cloff, tno, toff;
@@ -4049,10 +4003,9 @@
shadow_mem_set8( NULL/*unused*/, dst, sv );
}
-/////////////////////////////^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+/* ------------ Shadow memory range setting ops ------------ */
-
static void shadow_mem_modify_range(
Thread* thr,
Addr a,
|