Commit Graph

848 Commits

Author SHA1 Message Date
Julian Seward
afc64cc112 Expand the first para of the custom-allocator section so it says what
this section actually describes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6199
2006-10-06 11:47:01 +00:00
Julian Seward
d45c6296eb Regression tests for Graydon Hoare's enhanced mempool stuff, from
Graydon himself.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6198
2006-10-06 11:45:00 +00:00
Julian Seward
a81be9f483 A memory pool update from Graydon Hoare.
Here's an update to the mempool move / change client requests and sanity 
checking. The following changes are present:

   - Added one more (hopefully last) client request, a predicate to
     test whether a mempool anchor address is currently tracked.
     It turns out mozilla's arena-using code is sufficiently inconsistent
     in its assumptions that it's very difficult to phrase the valgrind
     client-request annotations without this request. Namely: sometime
     arena-init and arena-free operations are assumed to be idempotent.

   - Fixed a very rapid tool-memory leak in the mempool sanity check
     routine. The previous version of the patch I posted would use all
     memory even on my Very Beefy Test Machine within ~15 minutes of
     browsing with firefox.

   - Added a little logging code to print the counts of pools and chunks
     active every ~10000 sanity checks, when running with -v.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6197
2006-10-05 17:59:23 +00:00
Julian Seward
68a0c28d67 Excellent documentation from Graydon Hoare on his mempool
client-request work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6196
2006-10-05 17:56:14 +00:00
Nicholas Nethercote
cd94343ee3 Add a comment about marking static memory as defined.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6083
2006-09-21 15:59:30 +00:00
Julian Seward
1213e9bcf7 Merge (from 3_2_BRANCH) r6048 (SuSE 10.1 (ppc32) minor fixes)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6051
2006-09-11 20:33:55 +00:00
Julian Seward
5c4ca35185 Add a regtest for #133694 (munmapping of segments below
aspacem_minAddr).  (Tom Hughes)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6050
2006-09-11 20:14:21 +00:00
Julian Seward
ce55e7ecf3 A small fix to the "mempool trim" client request; the previous version
didn't cope with zero-sized chunks properly.  (from Graydon Hoare).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6006
2006-08-16 17:51:28 +00:00
Julian Seward
7086ee4a21 Regression test for #132146.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6000
2006-08-16 00:28:25 +00:00
Julian Seward
45f930039b Update expected output following Graydon H's leak checker fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5996
2006-08-04 12:42:06 +00:00
Julian Seward
1ef8ead90b Followup to r5991: when leak checking, treat zero-sized blocks as if
they had size one.  Otherwise they appear to cover no address space,
so no pointers to them are ever found, and so they are always
incorrectly marked as leaked.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5994
2006-07-29 09:00:25 +00:00
Julian Seward
7586467ab5 Add a mempool-trimming client request (Graydon Hoare).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5992
2006-07-28 00:06:37 +00:00
Julian Seward
013a3c24f3 Leak checking fixes from Graydon Hoare:
- fix off by one error in binary searches
- extend leak checking functionality to memory pools


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5991
2006-07-27 23:48:53 +00:00
Julian Seward
25499151ed When doing leak checks, don't poke around in device segments as this
may hang the entire machine.  (Tom Hughes).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5990
2006-07-27 23:12:17 +00:00
Julian Seward
ddbe46ba1e Fix copy-n-paste error to do with ppc64-linux stack redzone handling
(from r5791).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5973
2006-06-16 21:39:08 +00:00
Julian Seward
ad67fd79fe Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5954
2006-06-05 23:21:15 +00:00
Julian Seward
7091136f7f Sigh .. now fix for 32-bit targets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5936
2006-05-26 12:00:26 +00:00
Julian Seward
80ebf075c9 Fix gcc pedantry on 64-bit platforms
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5934
2006-05-26 11:29:17 +00:00
Julian Seward
3163ae8235 Update expected output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5928
2006-05-25 18:33:56 +00:00
Julian Seward
84f71ab2f3 Assertion is too restrictive; it's possible to validly get an
addressibility error when MC_(clo_undef_value_errors) is True.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5922
2006-05-22 13:59:42 +00:00
Julian Seward
e7c688d4aa A 1 page stack isn't big enough for this test on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5910
2006-05-21 12:40:30 +00:00
Julian Seward
dee9992c32 Update expected output following vex r1619.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5909
2006-05-21 12:18:16 +00:00
Julian Seward
9c6a78154e Yet more messing with masking approximate results.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5902
2006-05-13 02:20:11 +00:00
Julian Seward
436b6ebcdd Apparently Intel's rcpps etc approximations are more approximate than
AMD's.  Kludge everything accordingly.  Sigh.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5900
2006-05-13 01:32:41 +00:00
Julian Seward
40f0baa4ff Update expected results following change in r5898.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5899
2006-05-13 00:34:52 +00:00
Julian Seward
11d8cd39c7 Add masking for results of rcpps/rcpss/rsqrtps/rsqrtps so as to give
consistent results on all platforms.  Expected outputs not updated
yet.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5898
2006-05-13 00:23:56 +00:00
Julian Seward
4950ba1806 Comprehensive tests for bt{s,r,c,}{w,l,q} on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5892
2006-05-12 19:50:44 +00:00
Julian Seward
35b78ba27f Test x86 {push,pop}{w,l}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5891
2006-05-12 14:24:18 +00:00
Julian Seward
23ad3fce2f Vectorise copy_address_range_perms for common cases. This gives about
40% speedup on artificial programs which just do realloc() and nothing
else, and about a 3-4% speedup on starting kpresenter-1.5.0 and
loading a 16-slide presentation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5880
2006-05-03 22:13:57 +00:00
Julian Seward
3f8027095c Add another test of permissions range copying (copy_address_range_perms).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5875
2006-05-03 00:43:20 +00:00
Julian Seward
914a317eb9 Get rid of executable permissions on C source file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5874
2006-05-02 13:02:01 +00:00
Nicholas Nethercote
1a7237d77b Remove tool-specific code (which says which tools allow XML) from the core
by introducing a new "need":  VG_(needs_xml_output)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5854
2006-04-16 10:25:43 +00:00
Julian Seward
c8f60db273 On x86, don't use x87 registers for 8-byte FP loads/stores; instead
use an mmx register (which is the same thing in disguise) since mmx
loads/stores are guaranteed to be the identity.  This should fix
failures of this test on x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5843
2006-04-12 11:42:54 +00:00
Nicholas Nethercote
4cae62d828 Commit a patch from Olly Betts which avoids a possible problem with
COUNT_LEAKS on 64-bit machines.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5832
2006-04-06 14:21:42 +00:00
Nicholas Nethercote
148c02054a Use better variable names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5830
2006-04-06 13:33:48 +00:00
Julian Seward
4f684ed6b9 Test program which uses templates to generate very long stabs (debug
info) strings.  This crashes 3.1.1 when the test is compiled with
-gstabs.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5826
2006-04-04 17:35:48 +00:00
Julian Seward
ee0cc0f1ad Un-break make dist.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5824
2006-04-04 15:43:30 +00:00
Julian Seward
995dfd20ab Add 64-bit test output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5813
2006-04-02 02:59:35 +00:00
Julian Seward
a7a953128b Don't print an address on stdout as it doesn't get automagically
changed into 0x.........


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5812
2006-04-02 02:27:52 +00:00
Julian Seward
5d87e4e98b Another shadow memory test. This one does a huge number of loads and
stores of char/short/int/int64/double at random offsets and hence
alignments in an array.  It does it in a way in which the computation
just computes the expected V bits, and hence can check whether these
seem correct.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5811
2006-04-02 01:53:01 +00:00
Julian Seward
50dc4b58ee In check_all, allow two different acceptable byte values, so as to
cover the behaviour of all possible variants of float loads/stores.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5809
2006-04-02 00:58:01 +00:00
Nicholas Nethercote
8e63d0b5ff Partial fix for the sh-mem.c failure on PPC32. This should make it work
on PPC32 now but break it on the other platforms.  Julian will commit a
change to ensure the 32-bit floats are copied through the FP regs on all
platforms to make the broken ones work again.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5808
2006-04-01 23:06:29 +00:00
Nicholas Nethercote
7852ab7f22 Make the BSD-style license notices slightly more accurate.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5803
2006-03-31 12:05:04 +00:00
Nicholas Nethercote
3d12e0e9db Terminology change: previously in Memcheck we had the four states:
noaccess, writable, readable, other

Now they are:

   noaccess, undefined, defined, partdefined

As a result, the following names:

   make_writable, make_readable,
   check_writable, check_readable, check_defined

have become:

   make_mem_undefined, make_mem_defined,
   check_mem_is_addressable, check_mem_is_defined, check_value_is_defined

(and likewise for the upper-case versions for client request macros).
The old MAKE_* and CHECK_* macros still work for backwards compatibility.

This is much better, because the old names were subtly misleading.  For
example:

  - "readable" really meant "readable and writable".
  - "writable" really meant "writable and maybe readable, depending on how
    the read value is used".
  - "check_writable" really meant "check writable or readable"

The new names avoid these problems.

The recently-added macro which was called MAKE_DEFINED is now
MAKE_MEM_DEFINED_IF_ADDRESSABLE.

I also corrected the spelling of "addressable" in numerous places in
memcheck.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5802
2006-03-31 11:57:59 +00:00
Nicholas Nethercote
e6abeb8b0a Change to some better function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5797
2006-03-28 12:51:02 +00:00
Nicholas Nethercote
ad92170332 Change some uses of bytes to bits for consistency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5796
2006-03-28 12:35:08 +00:00
Nicholas Nethercote
991367c922 Merge in the COMPVBITS branch to the trunk. This is a big change to
Memcheck, replacing the 9-bits-per-byte shadow memory representation to a
2-bits-per-byte representation (with possibly a little more on the side) by
taking advantage of the fact that extremely few memory bytes are partially
defined.

For the SPEC2k benchmarks with "test" inputs, this speeds up Memcheck by a
(geometric mean) factor of 1.20, and reduces the size of shadow memory by a
(geometric mean) factor of 4.26.

At the same time, Addrcheck is removed.  It hadn't worked for quite some
time, and with these improvements in Memcheck its raisons-d'etre have
shrivelled so much that it's not worth the effort to keep around.  Hooray!

Nb: this code hasn't been tested on PPC.  If things go wrong, look first in
the fast stack-handling functions (eg. mc_new_mem_stack_160,
MC_(helperc_MAKE_STACK_UNINIT)).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5791
2006-03-27 11:37:07 +00:00
Julian Seward
23218c0ec8 Update expected output following r5785; also add a missing 's'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5788
2006-03-22 11:18:50 +00:00
Julian Seward
14fc0c54bb Mess with this even more so that fn_1 doesn't return zero.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5759
2006-03-12 16:57:07 +00:00
Julian Seward
41cc1d0804 Updated expected output following r5753.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5755
2006-03-12 14:15:23 +00:00