]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
16 years agoAdd exp-bbv to the tool-suite. I'm seeing a couple of amd64-linux test
Nicholas Nethercote [Tue, 14 Jul 2009 01:39:54 +0000 (01:39 +0000)] 
Add exp-bbv to the tool-suite.  I'm seeing a couple of amd64-linux test
failures, but they can be fixed up in-repo.  This resolves bug 198395.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10444

16 years agocomment change
Nicholas Nethercote [Tue, 14 Jul 2009 01:29:39 +0000 (01:29 +0000)] 
comment change

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10443

16 years agoMinor update.
Nicholas Nethercote [Tue, 14 Jul 2009 00:29:30 +0000 (00:29 +0000)] 
Minor update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10442

16 years agoSome ioctls don't look at ARG3 at all. Based on patches from Clemens
Nicholas Nethercote [Tue, 14 Jul 2009 00:06:00 +0000 (00:06 +0000)] 
Some ioctls don't look at ARG3 at all.  Based on patches from Clemens
Ladisch.  Fixes bug 159501.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10441

16 years agoFix a couple of tests that could be built with the wrong options, including
Nicholas Nethercote [Mon, 13 Jul 2009 22:20:00 +0000 (22:20 +0000)] 
Fix a couple of tests that could be built with the wrong options, including
the -m32/-m64 option.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10440

16 years agoFix breakage on ppc{32,64}-linux in post_reg_write_nonptr following
Julian Seward [Mon, 13 Jul 2009 10:00:06 +0000 (10:00 +0000)] 
Fix breakage on ppc{32,64}-linux in post_reg_write_nonptr following
r10084 and also update a comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10439

16 years agoSuppress an error within syslog(). Patch from Dan Kegel. Fixes bug 191192.
Nicholas Nethercote [Mon, 13 Jul 2009 07:02:26 +0000 (07:02 +0000)] 
Suppress an error within syslog().  Patch from Dan Kegel.  Fixes bug 191192.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10438

16 years agoFix wrapper for ioctl(VT_GETSTATE). Patch from Garrett D'Amore. Fixes bug
Nicholas Nethercote [Mon, 13 Jul 2009 06:43:19 +0000 (06:43 +0000)] 
Fix wrapper for ioctl(VT_GETSTATE).  Patch from Garrett D'Amore.  Fixes bug
139076.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10437

16 years agoDisable AC_PROG_OBJC -- it's currently not required and apparently causes
Nicholas Nethercote [Sun, 12 Jul 2009 23:07:13 +0000 (23:07 +0000)] 
Disable AC_PROG_OBJC -- it's currently not required and apparently causes
problems on older Linux distros.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10436

16 years agoMake atomic_incs.c build on Mac.
Nicholas Nethercote [Sun, 12 Jul 2009 22:58:26 +0000 (22:58 +0000)] 
Make atomic_incs.c build on Mac.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10435

16 years agoFix identification of sse3 on amd64s. Previously it was identifying
Julian Seward [Sun, 12 Jul 2009 13:19:04 +0000 (13:19 +0000)] 
Fix identification of sse3 on amd64s.  Previously it was identifying
ssse3, not sse3 (sigh).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10434

16 years agoOnly run none/tests/amd64/bug127521-64 on machines supporting cmpxchg16b.
Julian Seward [Sun, 12 Jul 2009 13:17:18 +0000 (13:17 +0000)] 
Only run none/tests/amd64/bug127521-64 on machines supporting cmpxchg16b.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10433

16 years agoFix disassembly printing of cmpxchg insns (don't print "lock" twice).
Julian Seward [Sun, 12 Jul 2009 13:01:17 +0000 (13:01 +0000)] 
Fix disassembly printing of cmpxchg insns (don't print "lock" twice).

git-svn-id: svn://svn.valgrind.org/vex/trunk@1908

16 years agoTrack vex r1907 (introduce Iop_CmpCas{EQ,NE}{8,16,32,64} and use them
Julian Seward [Sun, 12 Jul 2009 13:00:17 +0000 (13:00 +0000)] 
Track vex r1907 (introduce Iop_CmpCas{EQ,NE}{8,16,32,64} and use them
for CAS-success? tests).

Detailed background and rationale in memcheck/mc_translate, comment
"COMMENT_ON_CasCmpEQ".

This commit changes the Memcheck instrumentation of IRCAS so as not to
do a definedness check on the success/failure indication.  Also, by
being able to identify via the Iop_CasCmpEQ primitives any such checks
independently created by front ends, it can avoid instrumenting these
too.

All this is to avoid reporting new false positives observed on Fedora 7
(x86?) and openSUSE 10.2 (x86) following the recent merge of branches/DCAS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10432

16 years agoAdd new integer comparison primitives Iop_CasCmp{EQ,NE}{8,16,32,64},
Julian Seward [Sun, 12 Jul 2009 12:56:53 +0000 (12:56 +0000)] 
Add new integer comparison primitives Iop_CasCmp{EQ,NE}{8,16,32,64},
which are semantically identical to Iop_Cmp{EQ,NE}{8,16,32,64}.  Use
these new primitives instead of the normal ones, in the tests
following IR-level compare-and-swap operations, which establish
whether or not the CAS succeeded.  This is all for Memcheck's benefit,
as it really needs to be able to identify which comparisons are
CAS-success tests and which aren't.  This is all described in great
detail in memcheck/mc_translate.c in the comment
"COMMENT_ON_CasCmpEQ".

git-svn-id: svn://svn.valgrind.org/vex/trunk@1907

16 years agoUpdated Subversion ignore list.
Bart Van Assche [Sat, 11 Jul 2009 15:03:20 +0000 (15:03 +0000)] 
Updated Subversion ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10431

16 years agopth_cleanup_handler test compiles and runs now on systems that do not support reader...
Bart Van Assche [Sat, 11 Jul 2009 15:02:27 +0000 (15:02 +0000)] 
pth_cleanup_handler test compiles and runs now on systems that do not support reader-writer locks too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10430

16 years agoClarified an implementation choice.
Bart Van Assche [Sat, 11 Jul 2009 14:35:59 +0000 (14:35 +0000)] 
Clarified an implementation choice.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10429

16 years agoSuppressed the warnings issued by gcc about unused return values.
Bart Van Assche [Sat, 11 Jul 2009 14:14:58 +0000 (14:14 +0000)] 
Suppressed the warnings issued by gcc about unused return values.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10428

16 years agoHandle epoll_create1. Patch from Sam Varshavchik. Fixes bug 188427.
Nicholas Nethercote [Fri, 10 Jul 2009 12:02:03 +0000 (12:02 +0000)] 
Handle epoll_create1.  Patch from Sam Varshavchik.  Fixes bug 188427.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10427

17 years agoRemoved reference to recursive_mutex.stdout.exp from Makefile.am
Bart Van Assche [Fri, 10 Jul 2009 10:02:46 +0000 (10:02 +0000)] 
Removed reference to recursive_mutex.stdout.exp from Makefile.am

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10426

17 years agoModified recursive_mutex regression test: improved portability by removing usage...
Bart Van Assche [Fri, 10 Jul 2009 09:26:29 +0000 (09:26 +0000)] 
Modified recursive_mutex regression test: improved portability by removing usage of alarm() / all output is now sent to stderr / full output is now compared instead of only a summary.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10425

17 years agoGeneralized two suppression patterns.
Bart Van Assche [Fri, 10 Jul 2009 09:24:27 +0000 (09:24 +0000)] 
Generalized two suppression patterns.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10424

17 years agoMake --leak-resolution=high the default. Fixes bug 197929.
Nicholas Nethercote [Fri, 10 Jul 2009 08:16:29 +0000 (08:16 +0000)] 
Make --leak-resolution=high the default.  Fixes bug 197929.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10423

17 years agoAdded a suppression pattern for call stacks referencing the function _Unwind_ForcedUn...
Bart Van Assche [Fri, 10 Jul 2009 06:48:13 +0000 (06:48 +0000)] 
Added a suppression pattern for call stacks referencing the function _Unwind_ForcedUnwind / generalized the suppression pattern for the function _Unwind_ForcedUnwind_Phase2.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10422

17 years agoAdded missing $(AM_CFLAGS).
Bart Van Assche [Fri, 10 Jul 2009 06:38:20 +0000 (06:38 +0000)] 
Added missing $(AM_CFLAGS).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10421

17 years agoAttempt to improve the {MALLOC,FREE}LIKE_BLOCK documentation, based on
Nicholas Nethercote [Thu, 9 Jul 2009 23:35:44 +0000 (23:35 +0000)] 
Attempt to improve the {MALLOC,FREE}LIKE_BLOCK documentation, based on
seeing them misapplied on a real-world example.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10420

17 years agoThis file was accidentally empty; fill it with the right output.
Nicholas Nethercote [Thu, 9 Jul 2009 22:52:24 +0000 (22:52 +0000)] 
This file was accidentally empty;  fill it with the right output.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10419

17 years agoAdd support for IRStmt_CAS to the h_ instrumenter. This should stop
Julian Seward [Thu, 9 Jul 2009 10:52:03 +0000 (10:52 +0000)] 
Add support for IRStmt_CAS to the h_ instrumenter.  This should stop
exp-ptrcheck asserting on threaded programs on x86 and amd64.  Vast
amounts of fiddly complication that makes my head hurt.  Urr.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10418

17 years agoLiberalise IRTemp bookkeeping in the h_ instrumenter, so as to allow
Julian Seward [Thu, 9 Jul 2009 10:45:11 +0000 (10:45 +0000)] 
Liberalise IRTemp bookkeeping in the h_ instrumenter, so as to allow
addition of non-shadow IRTemps without causing it to collapse into
assertion failures.  This changes is a simplified version of what was
committed in
svn://svn.valgrind.org/valgrind/branches/DCAS/memcheck/mc_translate.c
r10109.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10417

17 years agoUpdated ignore list.
Bart Van Assche [Thu, 9 Jul 2009 09:26:12 +0000 (09:26 +0000)] 
Updated ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10416

17 years agoUpdated ignore lists.
Bart Van Assche [Thu, 9 Jul 2009 09:18:39 +0000 (09:18 +0000)] 
Updated ignore lists.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10415

17 years agoAdded yet another expected output file.
Bart Van Assche [Sat, 4 Jul 2009 15:00:12 +0000 (15:00 +0000)] 
Added yet another expected output file.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10413

17 years agoMake this test work on PowerPC too.
Julian Seward [Sat, 4 Jul 2009 14:33:53 +0000 (14:33 +0000)] 
Make this test work on PowerPC too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10412

17 years agoUn-break PPC build.
Bart Van Assche [Sat, 4 Jul 2009 14:20:43 +0000 (14:20 +0000)] 
Un-break PPC build.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10411

17 years agoFix ppc64 guest layout description following recent DCAS hackery.
Julian Seward [Sat, 4 Jul 2009 13:07:30 +0000 (13:07 +0000)] 
Fix ppc64 guest layout description following recent DCAS hackery.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1906

17 years agoAdd tests to verify behaviour of atomic instruction handling.
Julian Seward [Sat, 4 Jul 2009 12:44:08 +0000 (12:44 +0000)] 
Add tests to verify behaviour of atomic instruction handling.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10410

17 years agoUpdated ignore list.
Bart Van Assche [Sat, 4 Jul 2009 12:20:44 +0000 (12:20 +0000)] 
Updated ignore list.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10409

17 years agoAdded regression test for pthread cleanup handling.
Bart Van Assche [Sat, 4 Jul 2009 12:20:04 +0000 (12:20 +0000)] 
Added regression test for pthread cleanup handling.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10408

17 years agoEnabled the DRD command line flags --var-info=yes and --check-stack-var=yes for the...
Bart Van Assche [Sat, 4 Jul 2009 12:17:58 +0000 (12:17 +0000)] 
Enabled the DRD command line flags --var-info=yes and --check-stack-var=yes for the pth_cancel_locked regression test.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10407

17 years agoRestored configure test for -Wno-empty-body.
Bart Van Assche [Sat, 4 Jul 2009 12:17:07 +0000 (12:17 +0000)] 
Restored configure test for -Wno-empty-body.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10406

17 years agoInclude valgrind.spec in the tarball, as it makes things easier for
Nicholas Nethercote [Sat, 4 Jul 2009 00:38:11 +0000 (00:38 +0000)] 
Include valgrind.spec in the tarball, as it makes things easier for
packagers.  Fixes bug 188560.

Also updated the contents of valgrind.spec.in a bit.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10405

17 years agoBack out r10402 because it completely breaks things on Ubuntu 9.04 and
Nicholas Nethercote [Thu, 2 Jul 2009 20:47:53 +0000 (20:47 +0000)] 
Back out r10402 because it completely breaks things on Ubuntu 9.04 and
OpenSUSE 11.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10404

17 years agoFix missing backslash, which was causing serious weirdness during
Julian Seward [Thu, 2 Jul 2009 16:51:09 +0000 (16:51 +0000)] 
Fix missing backslash, which was causing serious weirdness during
'make install' for Massif.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10403

17 years agoReplace strlen on amd64-linux with a simple version that doesn't
Tom Hughes [Thu, 2 Jul 2009 13:02:12 +0000 (13:02 +0000)] 
Replace strlen on amd64-linux with a simple version that doesn't
generate false positives.

Patch from Jakub Jelinek <jakub@redhat.com>. Fixes #190429.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10402

17 years agoFix handling of the vex svn-version thing following r10400 (tracks vex
Julian Seward [Thu, 2 Jul 2009 12:36:53 +0000 (12:36 +0000)] 
Fix handling of the vex svn-version thing following r10400 (tracks vex
r1905).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10401

17 years agoUnbreak the svn-version thing following r1904.
Julian Seward [Thu, 2 Jul 2009 12:36:08 +0000 (12:36 +0000)] 
Unbreak the svn-version thing following r1904.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1905

17 years agoTrack file renaming in vex r1904, and get rid of temporary kludges
Julian Seward [Thu, 2 Jul 2009 12:23:16 +0000 (12:23 +0000)] 
Track file renaming in vex r1904, and get rid of temporary kludges
needed to handle multiple files of the same name in different
directories.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10400

17 years agoFlatten out the directory structure in the priv/ side, by pulling all
Julian Seward [Thu, 2 Jul 2009 12:21:59 +0000 (12:21 +0000)] 
Flatten out the directory structure in the priv/ side, by pulling all
files into priv/ and giving them unique names.  This makes it easier
to use automake to build all this stuff in Valgrind.  It also tidies
up a directory structure which had become a bit pointlessly complex.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1904

17 years agoFix handling of multiple signal deliveries in a row
Josef Weidendorfer [Wed, 1 Jul 2009 23:56:23 +0000 (23:56 +0000)] 
Fix handling of multiple signal deliveries in a row

This fixes bug 136154.

Background:
The function stack - CLG_(current_fn_stack) - is a stack of
pointers to the fn_node structs of the currently active
functions. This stack is used for determining current context
from call chain to current function, and modified on entering
(via push_cxt) and leaving a function.
Entering a signal handler will push a 0 to the function stack
to make the context only dependend on the call chain inside of
the signal handler.
Thus, delivering two signals in a row should push two times a
0 value onto the function stack. However, the second 0-push was
incorrectly suppressed, leading to a failed assertion when
returning from the 2nd signal handler.

This also fixes a bug with incorrectly zeroing global cost
counters when changing the execution context, introduced with
r10386.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10399

17 years agoSwitched to the just introduced ANNOTATE_*() macro's.
Bart Van Assche [Wed, 1 Jul 2009 18:46:27 +0000 (18:46 +0000)] 
Switched to the just introduced ANNOTATE_*() macro's.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10398

17 years agoAdded four more ANNOTATE_*() macro's / removed the API-warning.
Bart Van Assche [Wed, 1 Jul 2009 18:45:45 +0000 (18:45 +0000)] 
Added four more ANNOTATE_*() macro's / removed the API-warning.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10397

17 years agoUpdated test instructions.
Bart Van Assche [Wed, 1 Jul 2009 18:43:11 +0000 (18:43 +0000)] 
Updated test instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10396

17 years agoReran this script and updated the results table.
Bart Van Assche [Wed, 1 Jul 2009 18:42:36 +0000 (18:42 +0000)] 
Reran this script and updated the results table.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10395

17 years agoWhen looking for the text section in a PE executable ignore any
Tom Hughes [Wed, 1 Jul 2009 11:59:20 +0000 (11:59 +0000)] 
When looking for the text section in a PE executable ignore any
code section which is marked as uninitialised.

This can happen if you have incremental linking enabled in Visual
Studio, which causes a .textbss section to be added before the real
text section. We were picking up that .textbss section and using it to
compute the avma and bias for the code which was giving completely the
wrong results.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10394

17 years agoDouble the size of the spill area. Fixes #195838.
Julian Seward [Wed, 1 Jul 2009 08:45:02 +0000 (08:45 +0000)] 
Double the size of the spill area.  Fixes #195838.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1903

17 years agoUpdate oprofiling notes a bit.
Julian Seward [Wed, 1 Jul 2009 08:12:22 +0000 (08:12 +0000)] 
Update oprofiling notes a bit.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10393

17 years agoMerge in branches/DCAS.
Julian Seward [Wed, 1 Jul 2009 08:10:49 +0000 (08:10 +0000)] 
Merge in branches/DCAS.

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

These changes track the IR changes added by vex r1901.  They primarily
update the instrumentation functions in all tools to handle the
changes, with the exception of exp-ptrcheck, which needs some further
work in order to be able to run threaded code.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10392

17 years agoRename 'Makefile' to 'Makefile-gcc' so as to be compatible with recent
Julian Seward [Wed, 1 Jul 2009 08:07:29 +0000 (08:07 +0000)] 
Rename 'Makefile' to 'Makefile-gcc' so as to be compatible with recent
Valgrind build-system changes.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1902

17 years agoMerge in branches/DCAS:
Julian Seward [Wed, 1 Jul 2009 08:06:34 +0000 (08:06 +0000)] 
Merge in branches/DCAS:

This branch adds proper support for atomic instructions, proper in the
sense that the atomicity is preserved through the compilation
pipeline, and thus in the instrumented code.

The change adds a new IR statement kind, IRStmt_CAS, which represents
single- and doubleword compare-and-swap.  This is used as the basis
for the translation of all LOCK-prefixed instructions on x86 and
amd64.

The change also extends IRExpr_Load and IRStmt_Store so that
load-linked and store-conditional operations can be represented.  This
facilitates correct translation of l[wd]arx and st[wd]cx. on ppc in
the sense that these instructions will now eventually be regenerated
at the end of the compilation pipeline.

git-svn-id: svn://svn.valgrind.org/vex/trunk@1901

17 years agoAdd a comment.
Nicholas Nethercote [Wed, 1 Jul 2009 05:05:38 +0000 (05:05 +0000)] 
Add a comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10391

17 years agoRemove the --all option from vg_perf. It's useless now that there are
Nicholas Nethercote [Wed, 1 Jul 2009 04:50:41 +0000 (04:50 +0000)] 
Remove the --all option from vg_perf.  It's useless now that there are
tool-specific tests in massif/perf/ and memcheck/perf/.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10390

17 years agoAdd some more functions to the default --alloc-fns list. Had to tweak how
Nicholas Nethercote [Wed, 1 Jul 2009 02:44:12 +0000 (02:44 +0000)] 
Add some more functions to the default --alloc-fns list.  Had to tweak how
verbose output is printed so that the tests would be ok, now that different
platforms have different alloc-fns lists.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10389

17 years agoJust whitespace and comment changes.
Nicholas Nethercote [Wed, 1 Jul 2009 02:39:26 +0000 (02:39 +0000)] 
Just whitespace and comment changes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10388

17 years agoFix a problem with r10384: it was failing to read the ELF header if the
Nicholas Nethercote [Tue, 30 Jun 2009 06:06:14 +0000 (06:06 +0000)] 
Fix a problem with r10384:  it was failing to read the ELF header if the
executable was less than 4096 bytes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10387

17 years agoFix statistics with multiple changes of instrumentation state
Josef Weidendorfer [Mon, 29 Jun 2009 21:00:33 +0000 (21:00 +0000)] 
Fix statistics with multiple changes of instrumentation state

This fixeds bug 150606.

When switching on instrumentation, the current function got the
wrong (too large) inclusive cost when instrumentation ever was on before.

The reason was that the global (ever increasing) event counters where
not reset on toggling instrumentation state. The global counters
are used to calculate inclusive cost of a function by getting the
difference of the global counters at leaving minus their value at
enter time. When leaving a function which was not encountered
to be entered before (a stack underrun of the shadow stack), it is
assumed that this function was entered with instrumentation switched
off. Then, the absolute value of global counters is used to calculate
the inclusive cost. Thus, these global counters have to be zeroed
at instrumentation change to allow for senseable inclusive costs
of functions which were not observed to be entered.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10386

17 years agoChange demangler to not use excessive space from stack
Josef Weidendorfer [Mon, 29 Jun 2009 16:13:25 +0000 (16:13 +0000)] 
Change demangler to not use excessive space from stack

Replaces alloca with xmalloc calls.
This should fix bug 197988.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10385

17 years agoMake the Linux launcher more like the Darwin one in how it reads the
Nicholas Nethercote [Mon, 29 Jun 2009 06:57:30 +0000 (06:57 +0000)] 
Make the Linux launcher more like the Darwin one in how it reads the
executable headers.  This means it no longer crashes on an empty executable.
Fixes bug 156065.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10384

17 years agoAdd a comment.
Nicholas Nethercote [Mon, 29 Jun 2009 05:19:15 +0000 (05:19 +0000)] 
Add a comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10383

17 years agoSuppression wasn't general enough. Caught by Jeroen Witmond.
Nicholas Nethercote [Sat, 27 Jun 2009 01:06:04 +0000 (01:06 +0000)] 
Suppression wasn't general enough.  Caught by Jeroen Witmond.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10382

17 years agoApplied the patch attached to http://bugs.kde.org/show_bug.cgi?id=165468: fixed some...
Bart Van Assche [Fri, 26 Jun 2009 19:03:53 +0000 (19:03 +0000)] 
Applied the patch attached to http://bugs.kde.org/show_bug.cgi?id=165468: fixed some formatting inconsistencies.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10381

17 years agoSuppress a leak in setenv(). Fixes bug 188572.
Nicholas Nethercote [Fri, 26 Jun 2009 07:00:00 +0000 (07:00 +0000)] 
Suppress a leak in setenv().  Fixes bug 188572.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10380

17 years agoAn fd in the Darwin launcher wasn't being closed.
Nicholas Nethercote [Fri, 26 Jun 2009 04:35:51 +0000 (04:35 +0000)] 
An fd in the Darwin launcher wasn't being closed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10379

17 years agoFix 'make check' for automake-1.7. Fixes bugs 197898 and 197901.
Nicholas Nethercote [Thu, 25 Jun 2009 23:46:23 +0000 (23:46 +0000)] 
Fix 'make check' for automake-1.7.  Fixes bugs 197898 and 197901.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10378

17 years agoUse the value set in the environment variable DRD_SEGMENT_MERGING_INTERVAL if the...
Bart Van Assche [Wed, 24 Jun 2009 18:35:02 +0000 (18:35 +0000)] 
Use the value set in the environment variable DRD_SEGMENT_MERGING_INTERVAL if the segment merging interval has not been specified as a command-line option.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10377

17 years agoChanged default segment merging interval from 64 to 10.
Bart Van Assche [Wed, 24 Jun 2009 18:34:10 +0000 (18:34 +0000)] 
Changed default segment merging interval from 64 to 10.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10376

17 years agoAdded tool option --drd-stats=yes.
Bart Van Assche [Wed, 24 Jun 2009 18:33:47 +0000 (18:33 +0000)] 
Added tool option --drd-stats=yes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10375

17 years agoIn VG_(get_changed_segments) use dynamic memory allocation rather than
Nicholas Nethercote [Wed, 24 Jun 2009 08:32:42 +0000 (08:32 +0000)] 
In VG_(get_changed_segments) use dynamic memory allocation rather than
static memory allocation to avoid hardwiring an upper limit on CSS_SIZE.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10374

17 years agoRemove some unnecessary tests.
Nicholas Nethercote [Wed, 24 Jun 2009 08:32:07 +0000 (08:32 +0000)] 
Remove some unnecessary tests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10373

17 years agoThe previous commit broke the 32-bit build, which is now fixed.
Bart Van Assche [Wed, 24 Jun 2009 06:44:49 +0000 (06:44 +0000)] 
The previous commit broke the 32-bit build, which is now fixed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10372

17 years agoAdd support for various aio_*() syscalls on Darwin. With them, Quicktime
Nicholas Nethercote [Wed, 24 Jun 2009 06:25:36 +0000 (06:25 +0000)] 
Add support for various aio_*() syscalls on Darwin.  With them, Quicktime
runs, albeit incredibly slowly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10371

17 years agoSuppress a Cond error in pthread_rwlock_init(). Fixes bug 196528.
Nicholas Nethercote [Wed, 24 Jun 2009 05:01:41 +0000 (05:01 +0000)] 
Suppress a Cond error in pthread_rwlock_init().  Fixes bug 196528.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10370

17 years agoAdd a comment.
Nicholas Nethercote [Wed, 24 Jun 2009 04:40:22 +0000 (04:40 +0000)] 
Add a comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10369

17 years agoSupport and test mincore() on Darwin.
Nicholas Nethercote [Wed, 24 Jun 2009 04:15:29 +0000 (04:15 +0000)] 
Support and test mincore() on Darwin.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10368

17 years agoEnable mincore() on AMD64/Linux. Hopefully fixes bug 197591.
Nicholas Nethercote [Wed, 24 Jun 2009 04:02:19 +0000 (04:02 +0000)] 
Enable mincore() on AMD64/Linux.  Hopefully fixes bug 197591.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10367

17 years agoAbort if a dir is given to --suppressions. Fixes bug 197456.
Nicholas Nethercote [Wed, 24 Jun 2009 03:49:19 +0000 (03:49 +0000)] 
Abort if a dir is given to --suppressions.  Fixes bug 197456.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10366

17 years agoThis commit merges the BUILD_TWEAKS branch onto the trunk. It has the
Nicholas Nethercote [Wed, 24 Jun 2009 00:37:09 +0000 (00:37 +0000)] 
This commit merges the BUILD_TWEAKS branch onto the trunk.  It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364

17 years agoFixed typo.
Bart Van Assche [Mon, 22 Jun 2009 18:06:29 +0000 (18:06 +0000)] 
Fixed typo.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10360

17 years agoStatistics: fixed bug introduced in r10356.
Bart Van Assche [Sun, 21 Jun 2009 18:09:02 +0000 (18:09 +0000)] 
Statistics: fixed bug introduced in r10356.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10359

17 years agoStatistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls...
Bart Van Assche [Sun, 21 Jun 2009 18:08:31 +0000 (18:08 +0000)] 
Statistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls as level one bitmap creation events.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10358

17 years agoCombined DRD_(thread_new_segment)() and DRD_(thread_combine_vc_sync)()
Bart Van Assche [Sun, 21 Jun 2009 18:07:35 +0000 (18:07 +0000)] 
Combined DRD_(thread_new_segment)() and DRD_(thread_combine_vc_sync)()
into the function DRD_(thread_new_segment_and_combine_vc)() because
before DRD_(thread_combine_vc_sync)() was called the function
DRD_(thread_new_segment)() was always called.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10357

17 years agoMade --drd-stats=yes output even more verbose.
Bart Van Assche [Sun, 21 Jun 2009 11:51:23 +0000 (11:51 +0000)] 
Made --drd-stats=yes output even more verbose.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10356

17 years agoMerged revisions 10129:10130 from the DRDDEV branch to the trunk.
Bart Van Assche [Sun, 21 Jun 2009 10:11:15 +0000 (10:11 +0000)] 
Merged revisions 10129:10130 from the DRDDEV branch to the trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10355

17 years agoUpdated code for statistics printed by --drd-stats=yes.
Bart Van Assche [Sun, 21 Jun 2009 09:26:27 +0000 (09:26 +0000)] 
Updated code for statistics printed by --drd-stats=yes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10354

17 years agoGeneralized a suppression pattern.
Bart Van Assche [Sat, 20 Jun 2009 17:42:59 +0000 (17:42 +0000)] 
Generalized a suppression pattern.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10353

17 years agoUpdated test plan.
Bart Van Assche [Sat, 20 Jun 2009 10:56:45 +0000 (10:56 +0000)] 
Updated test plan.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10352

17 years agoReran SPLASH-2 benchmark.
Bart Van Assche [Sat, 20 Jun 2009 10:55:12 +0000 (10:55 +0000)] 
Reran SPLASH-2 benchmark.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10351

17 years agoMake the sys_newlstat wrapper more like those of similar *stat() syscalls.
Nicholas Nethercote [Mon, 15 Jun 2009 07:43:50 +0000 (07:43 +0000)] 
Make the sys_newlstat wrapper more like those of similar *stat() syscalls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10339

17 years agoCallgrind: fix instrumentation for arbitrary events per guest instruction
Josef Weidendorfer [Mon, 15 Jun 2009 00:16:36 +0000 (00:16 +0000)] 
Callgrind: fix instrumentation for arbitrary events per guest instruction

(should fix bug 169505)

This uses the same event queue scheme as cachegrind and lackey, and
same kind of helpers (1/2/3 Ir events, Ir+Dr, Dr, Ir+Dw, Dw).
Note that in contrast to Cachegrind, Callgrind interpretes a modify event
as Dw (otherwise the cache model generating write back events would not work).

Callgrind uses per-(guest)instruction event sets for cost counters.
An per-instruction eventset is incrementally extended as events for the
same guest instruction are flushed. Event sets always start with Ir counters,
but depending on Dr/Dw order afterwards, there exist IrDr(Dw) and IrDw(Dr).
Per-instruction event sets now are consistently named according to event ordering.
Event set "sim" is a subset of "full", was never used and was removed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10321

17 years agoAvoid variable name "new", use more concrete name instead
Josef Weidendorfer [Mon, 15 Jun 2009 00:16:32 +0000 (00:16 +0000)] 
Avoid variable name "new", use more concrete name instead

Also confusing for syntax highlighter/indexer of some editors/IDEs

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10320