]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
16 years agoMerge drd/ changes from branches/MESSAGING_TIDYUP r10464.
Julian Seward [Wed, 15 Jul 2009 14:49:17 +0000 (14:49 +0000)] 
Merge drd/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.

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

16 years agoMerge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.
Julian Seward [Wed, 15 Jul 2009 14:48:32 +0000 (14:48 +0000)] 
Merge coregrind/ changes from branches/MESSAGING_TIDYUP r10464.

This commit tidies up and rationalises what could be called the
"messaging" system -- that part of V to do with presenting output to
the user.  In particular it brings significant improvements to XML
output.

Changes are:

* XML and normal text output now have separate file descriptors,
  which solves longstanding problems for XML consumers caused by
  the XML output getting polluted by unexpected non-XML output.

* This also means that we no longer have to hardwire all manner
  of output settings (verbosity, etc) when XML is requested.

* The XML output format has been revised, cleaned up, and made
  more suitable for use by error detecting tools in general
  (various Memcheck-specific features have been removed).  XML
  output is enabled for Ptrcheck and Helgrind, and Memcheck is
  updated to the new format.

* One side effect is that the behaviour of VG_(message) has been
  made to be consistent with printf: it no longer automatically
  adds a newline at the end of the output.  This means multiple
  calls to it can be used to build up a single line message; or a
  single call can write a multi-line message.  The ==pid==
  preamble is automatically inserted at each newline.

* VG_(message)(Vg_UserMsg, ..args..) now has the abbreviated form
  VG_(UMSG)(..args..); ditto VG_(DMSG) for Vg_DebugMsg and
  VG_(EMSG) for Vg_DebugExtraMsg.  A couple of other useful
  printf derivatives have been added to pub_tool_libcprint.h,
  most particularly VG_(vcbprintf).

* There's a small change in the core-tool interface to do with
  error handling: VG_(needs_tool_errors) has a new method
  void (*before_pp_Error)(Error* err)  which, if non-NULL, is
  called just before  void (*pp_Error)(Error* err).  This is to
  give tools the chance to look at errors before any part of them
  is printed, so they can print any XML preamble they like.

* coregrind/m_errormgr.c has been overhauled and cleaned up, and
  is a bit simpler and more commented.  In particular pp_Error
  and VG_(maybe_record_error) are significantly changed.

The diff is huge, but mostly very boring.  Most of the changes
are of the form

-   VG_(message)(Vg_UserMsg, "this is a message %d", n);
+   VG_(message)(Vg_UserMsg, "this is a message %d\n", n);

Unfortunately as a result of this, it touches a large number
of source files.

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

16 years agoValidate the file descriptor argument to fallocate.
Tom Hughes [Wed, 15 Jul 2009 07:47:49 +0000 (07:47 +0000)] 
Validate the file descriptor argument to fallocate.

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

16 years agoAdd details about an interior-pointer case that can occur with C++.
Nicholas Nethercote [Wed, 15 Jul 2009 07:18:16 +0000 (07:18 +0000)] 
Add details about an interior-pointer case that can occur with C++.
Addresses bug 136230.

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

16 years agoAdd support on Darwin for mount(). Finishes off bug 198624.
Nicholas Nethercote [Wed, 15 Jul 2009 06:39:15 +0000 (06:39 +0000)] 
Add support on Darwin for mount().  Finishes off bug 198624.

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

16 years agoAdded support for getfsstat64() on Darwin. This partly fixes bug 198624.
Nicholas Nethercote [Wed, 15 Jul 2009 06:24:57 +0000 (06:24 +0000)] 
Added support for getfsstat64() on Darwin.  This partly fixes bug 198624.
Fixed a couple of other minor things too.

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

16 years agoUpdated Subversion ignore list.
Bart Van Assche [Wed, 15 Jul 2009 06:17:18 +0000 (06:17 +0000)] 
Updated Subversion ignore list.

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

16 years agoAdd support on Darwin for fstat_extended() and fstat64_extended(). Partly
Nicholas Nethercote [Wed, 15 Jul 2009 06:01:45 +0000 (06:01 +0000)] 
Add support on Darwin for fstat_extended() and fstat64_extended().  Partly
addresses bug 198624.

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

16 years agoHandle setpgid(). Partly addresses bug 198624.
Nicholas Nethercote [Wed, 15 Jul 2009 05:46:43 +0000 (05:46 +0000)] 
Handle setpgid().  Partly addresses bug 198624.

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

16 years agoHandle fallocate() on 64-bit platforms. Fixes bug 185794.
Nicholas Nethercote [Wed, 15 Jul 2009 03:08:35 +0000 (03:08 +0000)] 
Handle fallocate() on 64-bit platforms.  Fixes bug 185794.

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

16 years agoIgnore MALLOCLIKE_BLOCK/FREELIKE_BLOCK if addr==0. Fixes bug 137073. DRD
Nicholas Nethercote [Wed, 15 Jul 2009 02:31:45 +0000 (02:31 +0000)] 
Ignore MALLOCLIKE_BLOCK/FREELIKE_BLOCK if addr==0.  Fixes bug 137073.  DRD
now has its own copy of custom_alloc.c which is a little different to
Memcheck's;  making them both work with the same version was too difficult.

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

16 years agoMore Subversion ignore list updates.
Bart Van Assche [Tue, 14 Jul 2009 16:45:48 +0000 (16:45 +0000)] 
More Subversion ignore list updates.

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

16 years agoFixed recently introduced compiler warnings.
Bart Van Assche [Tue, 14 Jul 2009 16:36:40 +0000 (16:36 +0000)] 
Fixed recently introduced compiler warnings.

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

16 years agoUpdated Subversion ignore list.
Bart Van Assche [Tue, 14 Jul 2009 11:56:10 +0000 (11:56 +0000)] 
Updated Subversion ignore list.

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

16 years agoShorten the preamble by moving some of it into the --help output. This
Nicholas Nethercote [Tue, 14 Jul 2009 06:55:05 +0000 (06:55 +0000)] 
Shorten the preamble by moving some of it into the --help output.  This
partly fixes bug 197933.

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

16 years agoUpdated subversion ignore list.
Bart Van Assche [Tue, 14 Jul 2009 06:39:10 +0000 (06:39 +0000)] 
Updated subversion ignore list.

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

16 years agoUpdated subversion ignore lists.
Bart Van Assche [Tue, 14 Jul 2009 06:38:38 +0000 (06:38 +0000)] 
Updated subversion ignore lists.

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

16 years agoUpdated filter after the modification of Valgrind's startup message in r10447.
Bart Van Assche [Tue, 14 Jul 2009 06:31:26 +0000 (06:31 +0000)] 
Updated filter after the modification of Valgrind's startup message in r10447.

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

16 years agoDon't put the Vex SVN revision number in the preamble -- it achieves little
Nicholas Nethercote [Tue, 14 Jul 2009 04:49:18 +0000 (04:49 +0000)] 
Don't put the Vex SVN revision number in the preamble -- it achieves little
and is an enormous pain.

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

16 years agoMention BBV in the README.
Nicholas Nethercote [Tue, 14 Jul 2009 04:24:18 +0000 (04:24 +0000)] 
Mention BBV in the README.

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

16 years agoMark exp-bbv filters as executable.
Nicholas Nethercote [Tue, 14 Jul 2009 03:02:30 +0000 (03:02 +0000)] 
Mark exp-bbv filters as executable.

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

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 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 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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

16 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