809 Commits

Author SHA1 Message Date
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
Julian Seward
a452b1fca6 TRASH_IREGS: add enough live variables to make ppc32 spill (not easy)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5753
2006-03-12 13:38:46 +00:00
Julian Seward
b74d8afad0 Majorly beef up this test:
* test all wrapped-function arities from 0 to 12

* try hard to run both callers and callees out of integer registers,
  so as to detect problems where the CALL_FN_* macros do not
  properly save registers around the call

This will cause failure in building the regtests on all non-x86
platforms.  Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5747
2006-03-11 13:20:41 +00:00
Julian Seward
4aa28584f5 Fix comment typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5746
2006-03-11 12:58:03 +00:00
Julian Seward
522cf5944f Add a new kind of memory-painting primitive, which is: 'make_defined'.
For each byte in the range, if the byte is addressible, make it be
initialised, but if it isn't addressible, leave it alone.  So it's
like a version of make_readable which doesn't alter addressibility.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5736
2006-03-10 13:41:58 +00:00
Julian Seward
ea762eae30 Oops, missed out of r5724.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5725
2006-03-08 13:24:21 +00:00
Julian Seward
a8587eef99 Regression test for memcheck's SET/GET_VBITS client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5724
2006-03-08 13:21:07 +00:00
Julian Seward
aee8146a06 Reinstate the SET/GET_VBITS client requests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5723
2006-03-08 13:20:09 +00:00
Julian Seward
eedadc5fb3 get_abit_and_vbyte/get_abit can be a significant bottleneck when
painting/checking huge numbers of bytes resulting from client check
requests.  Inlining them helps significantly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5710
2006-03-03 21:02:18 +00:00
Julian Seward
25ff562b43 Apparently on SLES9 the dynamic linker is called (soname'd) ld64.so.1.
Add a corresponding strcmp redirect.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5650
2006-02-14 21:55:11 +00:00
Julian Seward
aa35c50723 Extend stack-permissions-change fast-case machinery to handle +/- 112,
128, 144 and 160.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5640
2006-02-12 15:42:20 +00:00
Julian Seward
aafec91eed Fix minor anomaly pointed out by icc9.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5627
2006-02-10 11:57:17 +00:00
Julian Seward
501fa0ca99 Get rid of general case in mkLazy3 and instead add new cases as they appear.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5621
2006-02-09 03:25:06 +00:00
Julian Seward
32a7eb402d Track vex r1573 (introduction of 4-arg IR primops for ppc fmadd/fmsub).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5619
2006-02-08 19:32:02 +00:00
Julian Seward
c2a48e3498 This causes problems on setups where ld.so is mapped at just over 1M:
it zeroes out that area (as a result of one of the mmaps) and the
program consequently goes into an infinite loop.  Change the map sizes
to just one page to avoid that.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5616
2006-02-06 23:22:31 +00:00
Julian Seward
4fc858a562 Test program aimed at exercising x87 insns a bit on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5613
2006-02-06 04:49:58 +00:00
Julian Seward
c63a2f2e3b Add a check for fsincos.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5610
2006-02-04 15:43:14 +00:00
Julian Seward
b8904fc241 Yet more x86 instruction tests, mostly aimed at wierd/transcendental
x87 insns.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5609
2006-02-04 15:26:11 +00:00
Julian Seward
3cee6256f4 Tidy up a couple more x86-related primops following rounding changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5608
2006-02-04 15:25:23 +00:00
Julian Seward
19bcf4be02 Followup to r5605: fixes for x86
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5607
2006-02-03 22:55:04 +00:00
Julian Seward
5163ea2aed * Track introduction of IR ternary primops and rounding modes, at least as
to the extent needed to make ppc32 work.

* As a result, remove the replacements for glibc's floor/ceil fns on 
  ppc32/64, since vex can now correctly simulate the real ones.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5605
2006-02-03 16:12:27 +00:00
Julian Seward
72dd07b7ef Change the number of client request args from 4 to 5 as that may
be useful in future.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5603
2006-02-01 14:59:42 +00:00
Julian Seward
7ade90ed8d Track vex r1553 (addition of Iop_Est8FRecip, case Iop_Est5FRSqrt)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5596
2006-01-27 15:11:31 +00:00
Julian Seward
a8be862b0f Test program to check the behaviour of a bunch of FP functions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5590
2006-01-24 00:40:35 +00:00
Julian Seward
bb6217e7a1 Use perf/fbench as a simple FP test too. This is a modified copy, not a symlink.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5588
2006-01-23 03:36:40 +00:00
Julian Seward
0a19390e1d Use the bz2 test in perf/ as a regression-test, just as a moderately
complex integer program which exercises Vex a bit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5585
2006-01-22 16:44:35 +00:00
Julian Seward
e05481ea7a Wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5574
2006-01-20 16:47:20 +00:00
Julian Seward
83c10ad5b7 Make amd64 function wrapping work again following recent changes.
Includes expected outputs for wrap8 for the non ppc64-linux case.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5570
2006-01-20 15:17:20 +00:00
Julian Seward
6af183ac21 Changes to make function wrapping work better on ppc64-linux:
- when recording the non-redirected address in guest_NRADDR, also
  snapshot the current R2 value, as that will be needed to run the
  original safely

- As a consequence, the original-function information extracted by
  VALGRIND_GET_ORIG_FN is different on ppc64-linux (2 words) from
  all other platforms (1 word).  So change the type of it from
  void* to a new type OrigFn which can be defined differently for
  each platform.

- Change the CALL_FN_* macros for ppc64-linux to save/restore
  R2 values appropriately.

- ppc64-linux: detect overflow/underflow of the redirect stack
  and bring Valgrind to a halt if this happens

- Update VG_CLREQ_SZB for ppc32/64 (was out of date).





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5569
2006-01-20 14:31:57 +00:00
Julian Seward
de99f0aaeb More function wrapping tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5568
2006-01-20 14:21:28 +00:00
Julian Seward
26587144d3 Track line number changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5565
2006-01-19 04:40:35 +00:00
Julian Seward
7cc6a0d482 More __libc_start_main -> "(below_main)" changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5564
2006-01-19 04:33:39 +00:00
Julian Seward
79ed27280a Update with new expected outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5563
2006-01-19 03:57:06 +00:00
Julian Seward
49e7f0baa1 Suppressions-tests fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5562
2006-01-19 03:56:33 +00:00
Julian Seward
dc5d273309 Fixes to track the "(below main)" change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5561
2006-01-19 03:55:54 +00:00
Julian Seward
e83b876384 Don't try sys_sigprocmask on ppc64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5560
2006-01-19 03:55:01 +00:00
Julian Seward
a7e7378dae getcontext() seems to be unimplemented on glibc-2.3.3 on ppc64-linux.
Handle that eventuality.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5559
2006-01-19 03:53:53 +00:00
Julian Seward
aaacb37226 Clever handling of partially defined equality does not work on
ppc32/64 at the moment.  Make this test handle that whilst still
testing the facility on x86/amd64.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5558
2006-01-19 03:52:19 +00:00
Julian Seward
0307628a86 This was segfaulting on ppc64-linux, even natively. These changes
stop it doing that.  Am not convinced this is a good fix -- I don't
really understand how this program works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5557
2006-01-19 03:50:48 +00:00
Julian Seward
70c82ce292 Make a bit less nonsensical on 64-bit platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5556
2006-01-19 03:48:47 +00:00