218 Commits

Author SHA1 Message Date
Julian Seward
080c67f88d Avoid excessive fragmentation in m_mallocfree facility by munmapping
unused superblocks in some circumstances.  Bug 250101 (==269884,
==275852)
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11911
2011-07-24 17:39:10 +00:00
Julian Seward
42ada29286 Add a new client request and pair of macros,
VALGRIND_{DISABLE,ENABLE}_ERROR_REPORTING, which allow a thread to
temporarily disable reporting of errors it makes.  This is useful for
making Memcheck behave sanely in the presence of some MPI
implementations.  Also mark up libmpiwrap.c accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11910
2011-07-24 16:02:33 +00:00
Julian Seward
ad7de5b336 Delete the AIX5 port. The last release this worked for is 3.4.1,
and then only on AIX 5.2 and 5.3.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11842
2011-06-28 07:25:29 +00:00
Julian Seward
5c1e65aa42 Memcheck:
* add delta leak checking functionality
* some editing of related manual sections
(Philippe Waroquiers, philippe.waroquiers@skynet.be).  Bug 214909
comment 105.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11838
2011-06-26 12:41:33 +00:00
Bart Van Assche
64a2d66bdf Silence compiler warnings triggered by certain regression tests programs and that we are not interested in.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11758
2011-05-15 17:06:33 +00:00
Bart Van Assche
9a8cdf03cb Moved two Linux-specific syscalls to the linux subdirectory.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11651
2011-03-17 10:57:49 +00:00
Julian Seward
dae0b7a571 'make dist' fixes following s390x-linux merge. (Christian Borntraeger
<borntraeger@de.ibm.com>)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11616
2011-03-10 12:36:09 +00:00
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
4e4990009a Add a new mempool test resulting from work on #254420, and update
expected output for an existing test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11510
2011-01-23 20:47:26 +00:00
Bart Van Assche
006b3b1228 PowerPC: added expected output files for memcheck/tests/varinfo[1-6], based
on a patch supplied by Maynard Johnson. See also #247526.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11364
2010-09-18 13:34:23 +00:00
Julian Seward
e6d2a8b34e Fix a couple of make-dist bugs, caused by recently added ppc32/64
tests.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11352
2010-09-10 14:57:46 +00:00
Julian Seward
9287d802b4 Add tests for new PowerISA_2.05 instructions available on Power6 CPUs.
(Maynard Johnson, maynardj@us.ibm.com and Pete Eberlein, eberlein@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11338
2010-09-03 23:49:33 +00:00
Bart Van Assche
35eece7dd5 Added command-line option --prefix-to-strip=... Closes #245535.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11312
2010-08-31 15:18:32 +00:00
Bart Van Assche
04eca8b9d6 Updated memcheck/tests/Makefile.am.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11297
2010-08-27 10:55:04 +00:00
Bart Van Assche
8122b2aaef Added new memcheck command-line option --show-possibly-lost. Closes #201170.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11292
2010-08-26 10:56:27 +00:00
Nicholas Nethercote
6fd0eb7b07 Merged the MACOSX106 branch to the trunk. Merge command:
svn merge -r11143:HEAD svn://svn.valgrind.org/valgrind/branches/MACOSX106

There were some easy-to-resolve conflicts.

Then I had to fix up coregrind/link_tool_exe*.in -- those files had been
added independently on both the trunk and the branch, AFAICT.  I just
overwrote the trunk versions with the branch versions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11194
2010-07-01 00:20:20 +00:00
Julian Seward
2d7fcf0f82 Make sure the Memcheck tests are built on arm-linux using hardware
floating point, since the softfloat results are way different from the
hardware one (not to mention, V reports lots of accesses-below-the-SP
in the softfloat helper functions.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10999
2010-01-03 21:24:09 +00:00
Bart Van Assche
73db3de513 Suppressed compiler warnings reported by gcc 4.4.x on the source code
of regression tests about intentionally uninitialized variables and
about intentionally freed non-heap memory.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10794
2009-08-12 12:55:56 +00:00
Nicholas Nethercote
675914e025 Try to fix error_counts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10768
2009-08-10 08:25:39 +00:00
Nicholas Nethercote
6fd1b000e4 Allow custom blocks to overlap with malloc blocks. Fixes bug 100628.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10765
2009-08-10 07:36:54 +00:00
Nicholas Nethercote
e3fc6742cd Add an alternative output for Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10755
2009-08-08 07:38:25 +00:00
Nicholas Nethercote
1165808df3 Make lsframe1, lsframe2 and stack_changes Linux-only since they all fault
natively on Mac.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10645
2009-07-28 05:10:33 +00:00
Nicholas Nethercote
6745c903fc Add a note about our suspect handling of brk(). And disable the brk() part
of origin1-yes.c, because it's a pain, giving different results on different
systems.  This allowed origin1-yes.stderr.exp-darwin to be removed.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10595
2009-07-24 19:09:52 +00:00
Nicholas Nethercote
68efb29503 A fix for bug 186796: suppression symbol names were being truncated if they
were longer than 200 chars.  Now dynamic memory is used and so they can be
arbitrarily long in theory, although in practice it bombs out at 100,000 for
sanity purposes.  This required adjusting the core/tool interface for
read_extra_suppression_info().  


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10581
2009-07-24 07:38:29 +00:00
Nicholas Nethercote
e3f6e42966 Fixed bug 149878 (calloc overflow). This disables some of the calloc silly
arg checking, but that's no great loss.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10578
2009-07-24 06:41:02 +00:00
Nicholas Nethercote
7b5d892035 Fix up xml1 on 32-bit machines; merged the 32 and 64-bit outputs by
extending the filter.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10494
2009-07-21 04:51:55 +00:00
Nicholas Nethercote
5715955132 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
2009-07-13 22:20:00 +00:00
Nicholas Nethercote
6141840b2d Make atomic_incs.c build on Mac.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10435
2009-07-12 22:58:26 +00:00
Julian Seward
62215c01ac Make this test work on PowerPC too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10412
2009-07-04 14:33:53 +00:00
Bart Van Assche
5e4cf07ba5 Un-break PPC build.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10411
2009-07-04 14:20:43 +00:00
Julian Seward
205f7fa457 Add tests to verify behaviour of atomic instruction handling.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10410
2009-07-04 12:44:08 +00:00
Nicholas Nethercote
de25e03eed Abort if a dir is given to --suppressions. Fixes bug 197456.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10366
2009-06-24 03:49:19 +00:00
Nicholas Nethercote
b05a2a18d7 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
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
8795795b55 Merge r9900 (make dist fixes) from the MESSAGING_TIDYUP branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9905
2009-05-18 23:24:26 +00:00
Nicholas Nethercote
fbe37d96a8 Fix bug #191182, where printing the leak checker results was really slow if
there were a lot of loss records.

The fix was:
- Avoid the O(m * n) looping over the chunks when creating the loss
  records, by putting loss records into an OSet instead of a list, which
  makes duplicate detection for each chunk an O(log n) operation instead of
  an O(n) operation.
- Avoid the looping over loss records which was used to do a poor
  man's sort, but was O(n^2).  Instead copy pointers to the loss records
  from the OSet into an array and sort it normally with VG_(ssort) (n log n,
  usually) before printing.

This approach was similar to that used in the patch Philippe attached to the
bug report.

Other changes:
- Added Philippe's test programs in the new memcheck/perf directory.  It
  used to take 57s on my machine, now it takes 1.6s.
- Cleaned up massif/perf/Makefile.am to be consistent with other Makefiles.
- Improved some comments relating to VgHashTable and OSet.
- Avoided a redundant traversal of the hash table in VG_(HT_to_array), also
  identified by Philippe..
- Made memcheck/tests/mempool's results independent of the pointer size, and
  thus was able to remove its .stderr.exp64 file.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9781
2009-05-06 06:15:55 +00:00
Nicholas Nethercote
fe8a8345ee Remove unused .exp files for sigkill.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9743
2009-05-04 01:30:39 +00:00
Nicholas Nethercote
97e628e4be Merged r9741 (make post-syscall more portable) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9742
2009-05-04 01:17:56 +00:00
Nicholas Nethercote
ce4aed0d85 Use -q on varinfo tests to avoid platform-specific differences in number of
allocations.  This allowed two .stderr.exp files to be merged for varinfo6.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9681
2009-04-29 23:21:46 +00:00
Nicholas Nethercote
c601f8a1e4 Merged r9653..r9655 (fixed terminal signal handling in Darwin) from DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9656
2009-04-28 01:55:01 +00:00
Nicholas Nethercote
4481c22c52 Move with-space to linux/, because it's hard to replicate on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9569
2009-04-17 06:52:10 +00:00
Nicholas Nethercote
7731625a92 Remove nanoleak.vgtest, it's a trivial test. nanoleak.c is used by
nanoleak_supp.vgtest, however, so rename it nanoleak_supp.c to make the
connection more obvious.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9562
2009-04-16 01:28:08 +00:00
Nicholas Nethercote
c78a4f9c30 - Turn exit_group() into exit() in the Memcheck filter, for greater
determinism and portability.
- Update the xml1 .exp files accordingly (getting rid of one which is no
  longer necessary).
- Update origin4-many.stderr.exp accordingly.
- Update the handling of scalar_exit_group accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9421
2009-03-16 00:59:17 +00:00
Nicholas Nethercote
190ad4143e - Removed leakotron. It was not a very useful test, and hard to make
portable.
- Rewrote leak-tree to be deterministic and clearer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9372
2009-03-12 03:00:05 +00:00
Bart Van Assche
f8080bd125 Un-break 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9360
2009-03-11 18:30:59 +00:00
Nicholas Nethercote
1d75b1ac58 Some tweaks to make more tests pass, or get closer to passing, on
--enable-only32bit builds on my Ubuntu box:

- For all tests, replace all operator new/new[]/delete/delete[] variants
  with a common form, eg. "...operator new...".  This makes
  exp-ptrcheck/tests/ccc and memcheck/tests/mismatches pass.

- For Helgrind tests, replace all libpthread paths with "/...libpthread...",
  as is done for libc paths.  This avoids problems when /lib32/libpthread.so
  is the path.  No extra tests pass, but many of them get a lot closer to
  passing.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9333
2009-03-10 03:34:00 +00:00
Nicholas Nethercote
bafed25ae9 This commit completely overhauls the leak checker. In particular:
- It heavily refactors the code:  uses better names for things, splits up
  complex functions that behaved very differently depending on how they were
  called, removes some redundancies, and generally makes it much simpler and
  easier to follow.

- It adds lots of comments, both inline, and also a big explanatory one at
  the top which makes it clear exactly how the leak checker works and also
  exactly what is meant by definite, possible, and indirect leaks.  It also
  has some ideas for future improvements.

- All tabs have been converted to spaces.

It also improves the functionality:

- Previously if you did --leak-check=summary, indirect and suppressed
  blocks were counted as definite leaks.  Now they are done properly, and so
  the summary results from --leak-check=summary match those from
  --leak-check=yes.

- Previously, some possibly reachable blocks were miscategorised as
  definitely reachable, because only the pointer to the block itself was
  considered, not any preceding pointers in the chain.  This is now fixed.

- Added memcheck/tests/leak-cases, which fully tests all the possible
  combinations of directly/indirectly reachable and possibly/definitely
  reachable.

And it improves the manual quite a bit, and the FAQ a little bit.

This doesn't fix the leak checker to handle MALLOCLIKE_BLOCK works that have
been taken from within malloc'd blocks, but I think I know how to do it and
hope to do so in a subsequent commit.

It also changes all instances of "<constant>memcheck</constant>" in the
Memcheck manual to "Memcheck", for consistency and because "Memcheck" is
easier to write.  There's one similar case for DRD but I didn't change that.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9330
2009-03-09 22:52:24 +00:00
Nicholas Nethercote
344a003c5c Remove .exp64 files that are identical to their corresponding .exp files and
thus unnecessary.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9322
2009-03-06 02:58:12 +00:00
Nicholas Nethercote
e97076e0f3 Merge r9299..r9303 (various leak-check test fixes) from the DARWIN branch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9304
2009-03-02 05:11:06 +00:00
Nicholas Nethercote
e67c3fc54e Remove toobig-allocs.c -- it was unreliable and didn't test any
functionality of note.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9261
2009-02-25 04:34:44 +00:00