128 Commits

Author SHA1 Message Date
Nicholas Nethercote
38ff4e69d1 Comment changes only: s/skin/tool/
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2555
2004-08-03 13:29:09 +00:00
Tom Hughes
8582802cb3 Add instruction tests for the LFENCE/MFENCE/SFENCE instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2523
2004-07-25 15:18:21 +00:00
Nicholas Nethercote
755111b88d Slightly change, with J's approval, startup copyright messages to better
reflect reality.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2489
2004-07-16 17:44:00 +00:00
Nicholas Nethercote
854d2ec10e Fix for bug #78048.
Problem was that the malloc-replacing tools (memcheck, addrcheck, massif,
helgrind) would assert if a too-big malloc was attempted.  Now they return 0 to
the client.  I also cleaned up the code handling heap-block-metadata in Massif
and Addrcheck/Memcheck a little.

This exposed a nasty bug in VG_(client_alloc)() which wasn't checking if
find_map_space() was succeeding before attempting an mmap().  Before I added
the check, very big mallocs (eg 2GB) for Addrcheck were overwriting the client
space at address 0 and causing crashes.

Added a regtest to all the affected skins for this.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2462
2004-07-10 14:56:28 +00:00
Tom Hughes
a2a0946b8a Make VPATH builds work so that valgrind can be built in a different
directory from the source tree. This resolves bug 83040.

Based on patch from Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2450
2004-06-29 09:45:37 +00:00
Tom Hughes
1cd4efbe5a Ignore all addrcheck test output files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2439
2004-06-25 23:25:10 +00:00
Robert Walsh
79b252dfdf Memory pool support.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2428
2004-06-19 18:12:36 +00:00
Nicholas Nethercote
874fc865a4 Fix for bug #80942.
Addrcheck wasn't doing overlap checking as it should.  This is because
mac_replace_strmem.o was being linked with vgskin_addrcheck.so instead of
vgpreload_addrcheck.so.  I fixed the Makefile, and also moved
_VG_USERREQ__MEMCHECK_GET_RECORD_OVERLAP so Addrcheck could see it.  And I
added the 'overlap' test (from memcheck/tests/) to Addrcheck's regression
suite.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2394
2004-05-05 10:46:22 +00:00
Nicholas Nethercote
6fd129635e Addrcheck wasn't instrumenting MMX2a1_MemRd... whoops. Man, those instructions
are a mess.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2376
2004-04-20 10:07:44 +00:00
Nicholas Nethercote
6a0aeb3716 Changed error message from:
Address 0x%x is not stack'd, malloc'd or free'd

to

  Address 0x%x is not stack'd, malloc'd or (recently) free'd

This makes things clearer in some circumstances, particularly when bogusly
accessing heap memory that has been freed, but Memcheck is no longer tracking.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2358
2004-04-13 08:36:35 +00:00
Tom Hughes
91e78b3482 Added more floating point instruction tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2347
2004-03-31 22:47:52 +00:00
Tom Hughes
3330a9f65b Added more floating point instruction tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2343
2004-03-28 10:33:51 +00:00
Tom Hughes
2f1fb3e5f9 Added tests for floating point multiple and divide instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2340
2004-03-28 00:30:57 +00:00
Tom Hughes
cd101bf7b2 Extended instruction test system to handle x87 floating point instructions
and started working on adding tests for the x87 instruction set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2338
2004-03-27 18:02:37 +00:00
Jeremy Fitzhardinge
82aaa16ef9 Fix "make distcheck", and also make sure that the generated archive
contains everything needed to "make regtest".  Bump the version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2308
2004-03-12 10:51:39 +00:00
Tom Hughes
5c5cc2d261 Fix expected standard error output for mmxext tests to resolve
differences in the amount of whitespace left with different skins.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2303
2004-03-09 08:50:02 +00:00
Jeremy Fitzhardinge
5c00880d69 Use Tom's instruction set tests on all tools which do instrumentation, so
we can make it's OK for all instructions.  Helgrind is badly broken in this
test (bug 69856).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2301
2004-03-09 01:44:11 +00:00
Nicholas Nethercote
5630025b84 Patch from Tom Hughes, for bug 72643:
Patch to improve SSE/SS2 support

  This patch should implement most of the missing SSE/SSE2 opcodes. About
  the only ones it doesn't do are the MASKMOVxxx ones as they are quite
  horrible and involved an implicit reference to EDI so I need to think
  about them a bit more.

  The patch also includes a set of tests for the MMX/SSE/SSE2 opcodes to
  validate that they have the same effect under valgrind as they do when
  run normally. In one or two cases this wasn't actually the case even
  for some of the implemented opcodes, so I fixed those as well ;-)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2202
2004-01-19 19:14:18 +00:00
Jeremy Fitzhardinge
f4cf196dad Make badrw.c conform to C89; split things onto separate lines so it's
clear what the messages are talking about.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2192
2004-01-07 08:47:03 +00:00
Julian Seward
cafeef8e48 Support for FXSAVE/FXRSTOR (Tom Hughes). Fixes #71180.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2183
2004-01-04 23:30:55 +00:00
Julian Seward
5c0e0d0595 In the fast sanity check for these tools which use shadow memory,
remove the test that the first page of memory is inaccessible.  This
is now getting in the way.

Fixes #69886.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2180
2004-01-04 23:08:04 +00:00
Nicholas Nethercote
07b8e3438b Updated copyright dates for 2004. Also added a couple of missing headers and
footers to some new files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2177
2004-01-04 16:43:23 +00:00
Jeremy Fitzhardinge
918c3a7b7e This jumbo-checkin is the Full Virtualization checkin. This eliminates
Valgrind's dependency on the dynamic linker for getting started, and
instead takes things into its own hands.

This checkin doesn't add much in the way of new functionality, but it
is the basis for all future work on Valgrind.  It allows us much more
flexibility in implementation, and well as increasing the reliability
of Valgrind by protecting it more from its clients.

This patch requires some changes to tools to update them to the changes
in the tool API, but they are straightforward.  See the posting "Heads
up: Full Virtualization" on valgrind-developers for a more complete
description of this change and its effects on you.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2118
2003-12-16 02:05:15 +00:00
Nicholas Nethercote
fc9a6bbced Updated the README file. It had lots of out-of-date and incorrect information
in it, much of it from 1.0.X days.  Did it in such a way that if it doesn't get
touched (and it undoubtedly won't) it won't really go out of date, eg. by
removing temporary details like version numbers, dates, details of specific
software incompatibilities.  It's much better to be vague but correct, than
precise but incorrect;  having incorrect info in a file as important as the
README is bad.  Also removed the README_KDE3_FOLKS file because it's pretty
redundant now.  Also added some changes that had been made in the stable branch
but not the HEAD.

Did similar, but smaller changes to README_DEVELOPERS and README_PACKAGERS.

Also updated the valgrind.spec.in file to use the new, post-1.0.X description
in the README.

Also fixed a minor omission in Addrcheck's docs.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2089
2003-12-03 21:44:45 +00:00
Nicholas Nethercote
d6d804d382 Updated all "report bugs to..." messages to point to valgrind.kde.org; also
updated the docs to refer to valgrind.kde.org instead of the old website.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2055
2003-11-20 16:20:55 +00:00
Dirk Mueller
7b252e6097 updating .cvsignore
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2038
2003-11-19 00:55:44 +00:00
Nicholas Nethercote
fb2d543ee8 Started to rescind the name "skin", replacing it with "tool". Did this in all
the places that normal users will see:

  - command line: --tool=foo (although --skin=foo still works)
  - docs: removed all traces (included renaming coregrind_skins.html to
    coregrind_tools.html)
  - in the usage messages
  - in error messages

Also did in in some places that I judged were unlikely to cause clashes with
existing workspaces:

  - in the header comments of many files (eg. "This file is part of Memcheck, a
    Valgrind tool for...")
  - in the regtests script
  - in the .supp files
  - in AUTHORS
  - in README_MISSING_SYSCALL_OR_IOCTL

Also update the AUTHORS file to mention Jeremy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2027
2003-11-14 17:47:54 +00:00
Nicholas Nethercote
e9a3bff869 Changed error messages: subsidiary explanations within an error message are now
indented one space;  previously it was mixed, but Memcheck/Addrcheck indented
"Address" lines 3, which made them hard to see in the stack trace.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2021
2003-11-13 17:53:43 +00:00
Nicholas Nethercote
d7bfd760a8 Changed error messages: now don't print anything below main() unless the new
option --show-below-main is on.  It's on by default.  It also affects
suppressions generated with --gen-suppressions=yes.  Updated reg tests
accordingly.

Also updated docs for this.  And added some missing command-line args to docs.
Also compartmentalised the options a little in the docs, and rearranged the
order of options in the usage message, in anticipation of a bigger
rearrangement that will be necessary soon -- to distinguish options used by all
skins from those used by error-checking skins, to skin-specific ones.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2020
2003-11-13 17:35:04 +00:00
Julian Seward
195939592a SSE/SSE2 fixes needed to run the entire test suite of the GNU
Scientific Library (gsl-1.4) compiled with Intel Icc 7.1 20030307Z '-g
-O -xW'.  I think this gives pretty good coverage of SSE/SSE2 floating
point instructions, or at least the subset emitted by Icc.  So far
tested on memcheck and nulgrind; addrcheck and cachesim still testing.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1955
2003-10-19 08:18:52 +00:00
Julian Seward
b820f69079 Delete some "inline" directives on functions that gcc-3.3.1 declined
to inline.  This is needed to get a warning-free compilation on 3.3.1.
It seems we had "inline" on some pretty huge functions in places.
Also it appears gcc-3.3.1 won't inline a function call in a tail call
position, reasonably enough.  I assume in that case it prefers to
create a tailcall to the callee, rather than inlining it.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1907
2003-10-12 10:27:06 +00:00
Nicholas Nethercote
4877ebb17e Moved the MALLOCLIKE and FREELIKE client requests out of memcheck.h, and into
valgrind.h.  Although these requests are not implemented by the core, they can
be implemented by skins that track heap blocks, eg. Memcheck, Annelid, Massif.
This is in preparation for committing Massif to the repository.

I think I managed to make the change in a binary-compatible way.  The only
inconvenience for users is that if they have a client program compiled with the
old requests in, Valgrind will abort with an explanatory message that tells
them to recompile.  Once they've done that (no changes to their program are
required), it works again.

I even updated the docs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1881
2003-10-02 13:44:04 +00:00
Nicholas Nethercote
7303425ddd Tiny formatting changes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1866
2003-09-30 13:33:24 +00:00
Nicholas Nethercote
f8762eb55d Remove two pieces of identical code used by Memcheck and Addrcheck, and put
them in a shared place.  (They used to be different, when Addrcheck didn't
distinguish between reads and writes, but now they're the same.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1837
2003-09-26 14:55:31 +00:00
Nicholas Nethercote
0db1843d96 Made Addrcheck distinguish between invalid reads and invalid writes (previously
was just saying "invalid memory access").

Added a regression test for this, for memcheck and addrcheck.  Also made
Addrcheck use Memcheck's fprw regtest.  Was able to remove the not-very-useful
'true' test for Addrcheck now that it has a couple of real tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1815
2003-09-05 23:29:33 +00:00
Nicholas Nethercote
0f871c249c A big commit size-wise, but small concept-wise: removed the ThreadState type
from skin's view, replacing all instances with ThreadId.  Much cleaner.  Had to
change the way VG_(get_ExeContext)() worked a little.  Changed the core/skin
major interface because this breaks the old version.  Also fixed a few minor
related things here and there.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1782
2003-07-24 08:45:32 +00:00
Nicholas Nethercote
ca84f991d3 Added overlap checking to Addrcheck, mostly just moving things around. In
particular, renamed mc_replace_strmem.c as mac_replace_strmem.c;  the 'mac'
prefix indicates it's shared between Memcheck and Addrcheck.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1774
2003-07-22 09:12:33 +00:00
Julian Seward
dd2abcb8e0 In vg_memory.c, startup_segment_callback, fix initialisation ordering
problem which caused the leak checker to misbehave following recent
PLT-bypass workaround.

In short, it is an error to announce to the skin, segments found which
belong to the low-level memory manager, because the skin may then mark
them as accessible to the client.  This is wrong, and the client
should only acquire accessible memory via malloc etc and stack
movement.  Now we carefully avoid mentioning any segment belonging to
the low level memory manager.

Take the opportunity to improve VG_(within_m_state_static) so that it
also detects pointers within the thread table.  This can reduce the
number of blocks the leak checker spuriously thinks are still
reachable.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1751
2003-07-12 12:11:39 +00:00
Julian Seward
4cdfda823b Fix a whole lot more regression tests on Red Hat 7.3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1739
2003-07-07 23:56:10 +00:00
Julian Seward
96c3057550 Add patch from Nick to get proper backtraces in
MC_(get_or_set_vbits_for_client).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1719
2003-07-06 00:54:47 +00:00
Julian Seward
31afdd2051 Add some more SSE/SSE2 floating point instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1701
2003-06-15 23:26:04 +00:00
Julian Seward
db24b72034 - Continue to clear up SSE insn emitters following recent cleanups re
G vs E register fields in encoding
- Add SSE3e_RegWr and use it to implement a case in MOVD.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1699
2003-06-15 22:28:05 +00:00
Julian Seward
a37fdf4d16 Rename the SSE and MMX uinstrs which read/write integer registers, in
a way consistent with the position of the register field in the
instruction.  In Intel encoding parlance, the G register is in bits
5,4,3 and the E register is bits 2,1,0, and so we adopt this scheme
consistently.  Considering how much confusion this has caused me in
this recent bout of SSE hacking, consistent renaming can only be a
good thing.  It makes it a lot easier to figure out if parts of the
SSE handling machinery are correct, or not.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1698
2003-06-15 21:54:34 +00:00
Julian Seward
eeb449497f Yet more SSE insns.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1696
2003-06-15 03:13:48 +00:00
Julian Seward
534b51138b - Comment out SSE uinstrs which have not so far been used.
- Fix bug in implementation of MOVD (mmxreg <--> ireg).  This
  fixes various segfaults and strange behaviour.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1695
2003-06-15 01:40:58 +00:00
Julian Seward
4d367c6112 Teach AddrCheck about some SSE uinstrs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1693
2003-06-14 16:01:32 +00:00
Nicholas Nethercote
83ef1ca2ed Some Makefile.am changes. Lots of them affected:
- changed deprecated INCLUDES variable to AM_CPPFLAGS

- moved the -DVG_LIBDIR definition from AM_CFLAGS into AM_CPPFLAGS

- generally neatened them up a bit -- removed old commented out stuff, fixed a
  couple of other minor things

Everything works for me, hopefully it won't break things for anyone else...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1680
2003-06-12 14:13:05 +00:00
Nicholas Nethercote
092c9b944b Added "Int exitcode" argument to SK_(fini)(), because it could be useful
for skins.

Changed lackey to print out the exit code.

Changed AUTOMAKE_OPTIONS back to 1.5 (whoops)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1538
2003-04-22 21:41:40 +00:00
Nicholas Nethercote
1b48c55fc5 Added two client requests: VALGRIND_COUNT_ERRORS and VALGRIND_COUNT_LEAKS.
The first returns the number of errors found so far, and is a core request.
The second returns the number of bytes found
reachable/dubious/leaked/suppressed by all leak checks so far, for Memcheck and
Addrcheck.

Both are useful for using Valgrind in regression test suites where multiple
tests are present in a single file -- one can run Valgrind with no output
(using --logfile-fd=-1) and use the requests after each test to determine if
any errors happened.

Had to rename and make public vg_n_errs_found --> VG_(n_errs_found) to do so.
Nb: leak errors are not counted as errors for the purposes of
VALGRIND_COUNT_ERRORS.  This was decided as the best thing to do after
discussion with Olly Betts, who original suggested these changes.

Pulled out common client request code shared between Memcheck and Addrcheck.

Added a regression test for this.

Added some documentation too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1533
2003-04-21 13:24:40 +00:00
Dirk Mueller
02b63b3ba8 reapply automake fixes. make check will now generate the binaries which
are only required for regression testing.

If this breaks something, please mail me first instead of reverting.
Thank you.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1530
2003-04-17 17:00:43 +00:00