From 05725eab3fdbbf82b2c702ca8c1615dea9cc8a1b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 5 Mar 2012 15:42:33 -0600 Subject: Look for valgrind in /opt/local/bin also --- test/fullcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/fullcheck.sh') diff --git a/test/fullcheck.sh b/test/fullcheck.sh index f3c20dd2..f8c671e0 100755 --- a/test/fullcheck.sh +++ b/test/fullcheck.sh @@ -1,7 +1,7 @@ #!/bin/sh VALGRIND='' -if [ -x /usr/bin/valgrind ]; then +if [ -x /usr/bin/valgrind -o -x /opt/local/bin/valgrind ]; then VALGRIND=valgrind fi -- cgit v1.2.3 From 06934e8dd68a0dea1f113911b01dc6b7ed406330 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 17 Mar 2012 16:22:03 -0500 Subject: libgmalloc is no longer available on OS X Lion --- test/fullcheck.sh | 18 +++++++++--------- tools/times.sh | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) (limited to 'test/fullcheck.sh') diff --git a/test/fullcheck.sh b/test/fullcheck.sh index f8c671e0..f607f2d9 100755 --- a/test/fullcheck.sh +++ b/test/fullcheck.sh @@ -5,14 +5,14 @@ if [ -x /usr/bin/valgrind -o -x /opt/local/bin/valgrind ]; then VALGRIND=valgrind fi -export MallocGuardEdges=1 -export MallocScribble=1 -export MallocPreScribble=1 -export MallocCheckHeapStart=100 -export MallocCheckHeapEach=100 -export DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib -export MALLOC_PROTECT_BEFORE=1 -export MALLOC_FILL_SPACE=1 -export MALLOC_STRICT_SIZE=1 +#export MallocGuardEdges=1 +#export MallocScribble=1 +#export MallocPreScribble=1 +#export MallocCheckHeapStart=100 +#export MallocCheckHeapEach=100 +#export DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib +#export MALLOC_PROTECT_BEFORE=1 +#export MALLOC_FILL_SPACE=1 +#export MALLOC_STRICT_SIZE=1 exec $VALGRIND $@ diff --git a/tools/times.sh b/tools/times.sh index 444da993..d15431bc 100755 --- a/tools/times.sh +++ b/tools/times.sh @@ -2,5 +2,5 @@ time test/RegressTests.py ./ledger test/regress time test/RegressTests.py ./ledger test/regress --verify -time test/RegressTests.py ./ledger test/regress --gmalloc -time test/RegressTests.py ./ledger test/regress --verify --gmalloc +#time test/RegressTests.py ./ledger test/regress --gmalloc +#time test/RegressTests.py ./ledger test/regress --verify --gmalloc -- cgit v1.2.3 From 1240ce24b3dd59bb2f48a396043b4115cc49c6e1 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 17 Mar 2012 16:47:33 -0500 Subject: Passing --verify to regression tests uses valgrind --- test/LedgerHarness.py | 7 +++++++ test/fullcheck.sh | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'test/fullcheck.sh') diff --git a/test/LedgerHarness.py b/test/LedgerHarness.py index 564a4d32..3477e720 100755 --- a/test/LedgerHarness.py +++ b/test/LedgerHarness.py @@ -81,6 +81,13 @@ class LedgerHarness: command = re.sub('\$ledger', '%s%s %s' % \ (self.ledger, insert, '--args-only'), command) + valgrind = '/usr/bin/valgrind' + if not os.path.isfile(valgrind): + valgrind = '/opt/local/bin/valgrind' + + if os.path.isfile(valgrind) and '--verify' in insert: + command = valgrind + ' -q ' + command + return Popen(command, shell=True, close_fds=True, env=env, stdin=PIPE, stdout=PIPE, stderr=PIPE) diff --git a/test/fullcheck.sh b/test/fullcheck.sh index f607f2d9..db63921d 100755 --- a/test/fullcheck.sh +++ b/test/fullcheck.sh @@ -2,7 +2,7 @@ VALGRIND='' if [ -x /usr/bin/valgrind -o -x /opt/local/bin/valgrind ]; then - VALGRIND=valgrind + VALGRIND="valgrind -q" fi #export MallocGuardEdges=1 -- cgit v1.2.3 From 79ecbf0c176215349efa458dadffa770c3decebc Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 19 Mar 2012 22:28:00 -0500 Subject: Corrected an uninitialized memory bug --- src/account.h | 12 +++++++++++- test/fullcheck.sh | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'test/fullcheck.sh') diff --git a/src/account.h b/src/account.h index fee12595..fd98a9ac 100644 --- a/src/account.h +++ b/src/account.h @@ -193,7 +193,17 @@ public: TRACE_CTOR(account_t::xdata_t::details_t, ""); } // A copy copies nothing - details_t(const details_t&) { + details_t(const details_t&) + : calculated(false), + gathered(false), + + posts_count(0), + posts_virtuals_count(0), + posts_cleared_count(0), + posts_last_7_count(0), + posts_last_30_count(0), + posts_this_month_count(0) + { TRACE_CTOR(account_t::xdata_t::details_t, "copy"); } ~details_t() throw() { diff --git a/test/fullcheck.sh b/test/fullcheck.sh index db63921d..fc89a13c 100755 --- a/test/fullcheck.sh +++ b/test/fullcheck.sh @@ -2,7 +2,10 @@ VALGRIND='' if [ -x /usr/bin/valgrind -o -x /opt/local/bin/valgrind ]; then - VALGRIND="valgrind -q" + VALGRIND="valgrind -q --track-origins=yes" + if [ `uname` = "Darwin" ]; then + VALGRIND="$VALGRIND --dsymutil=yes" + fi fi #export MallocGuardEdges=1 -- cgit v1.2.3