37 Commits

Author SHA1 Message Date
Julian Seward
4acf0bdea5 Make return types for some of the requests 64-bit clean. (following bug
report/investigation by Bernard Solomon).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8048
2008-05-12 15:25:04 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Nicholas Nethercote
aac5718e0a Remove client requests that were deprecated in 3.2.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7274
2007-12-04 21:18:06 +00:00
Julian Seward
172505c978 Update copyright dates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488
2007-01-08 06:01:59 +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
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
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
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
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
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
f9a9e03c7a Merge in function wrapping support from the FNWRAP branch. That
branch hereby becomes inactive.  This currently breaks everything
except x86; fixes for amd64/ppc32 to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5520
2006-01-12 12:32:32 +00:00
Nicholas Nethercote
8028d5a979 Remove ancient backwards compatibility code which is no longer needed, since
backwards compatibility was broken in various other ways by 3.0.0.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4408
2005-08-14 18:24:44 +00:00
Nicholas Nethercote
6a687109c0 De-convolute somewhat the client request usage for reporting overlap errors.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3407
2005-03-22 04:27:14 +00:00
Nicholas Nethercote
05fe123a9e Update copyright notice for 2005 on all relevant files. Don't bother trying
to be selective about it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3303
2005-03-12 16:22:54 +00:00
Julian Seward
0356d27ca6 Merge in changes from the 2.4.0 line. This basically brings in the
overhaul of the thread support.  Many things are now probably broken,
but at least with --tool=none, simple and not-so-simple threaded and
non-thread programs work.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3265
2005-03-10 23:59:00 +00:00
Nicholas Nethercote
9df62e9f85 Rename macros ("SKIN"-->"TOOL")
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3062
2004-11-22 19:12:49 +00:00
Tom Hughes
248c27a3b3 Remove spurious (void) cast from VALGRIND_CHECK_DEFINED so that it
actually does what the comment says it does. Patch from Nathan Kurz.

CCMAIL: 90778-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2728
2004-10-06 12:18:47 +00:00
Nicholas Nethercote
e75f9c2e9c Remove comma from last element of enum; C++ apparently doesn't allow it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2286
2004-03-04 18:05:55 +00:00
Nicholas Nethercote
c756c590cf Convert "skin" to "tool" in various places; almost entirely within comments,
nothing that will affect code.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2217
2004-01-21 15: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
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
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
24b34c91c8 Fixed up the client request info in the docs, which required splitting the core
requests from the Memcheck requests and putting the descriptions in the
appropriate parts of the docs.

Removed the __VALGRIND_SOME_SKIN_H test -- it was designed to prevent people
#including valgrind.h when they probably want memcheck.h, but it's actually a
reasonable thing to do to #include valgrind.h alone, because there are some
requests in valgrind.h.

Removed references to VALGRIND_MAKE_NOACCESS_STACK from the docs, as it doesn't
exist in the implementation.

Fixed a few other minor things.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1880
2003-10-02 13:25:02 +00:00
Julian Seward
9219250741 Add memcheck client requests VALGRIND_GET_VBITS / VALGRIND_SET_VBITS
for fetching/setting metadata so that it can be sent between
unconnected address spaces (or whatever).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1718
2003-07-05 17:53:55 +00:00
Nicholas Nethercote
40571c6f66 Added VALGRIND_MALLOCLIKE_BLOCK and VALGRIND_FREELIKE_BLOCK which allow you to
use a custom-allocator and detect almost as many errors as you could detect if
you used malloc/new/new[].  (eg. leaks detected, free errors, free mismatch,
etc).

Had to fiddle with mac_malloc_wrappers.c a bit to factor out the appropriate
code to be called from the client request handling code.  Also had to add a
new element `MAC_AllocCustom' to the MAC_AllocKind type.

Also added a little documentation, and a regression test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1643
2003-05-20 16:38:24 +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
Nicholas Nethercote
ac7027c441 Updated copyright notices for 2003. Only 4 months late.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1526
2003-04-15 14:58:06 +00:00
Julian Seward
ff56f5e9f3 Various fixes to the client-perms include files to stop gccs yelping
at high warning levels.  Partially due to Andreas Jaeger and
Hans-Peter Nilsson.

MERGE TO STABLE.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1457
2003-03-15 19:20:52 +00:00
Julian Seward
c53966da7c A little cpp magic to cause compilation to fail if valgrind.h is included
directly into sources (it should not be, and was causing people problems).

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1456
2003-03-15 19:12:43 +00:00
Julian Seward
61ee476cc0 Remove the mechanism which allowed clients to set block permissions
on their stacks and have those blocks automatically cleared when the
stack retreats past them.  This never really worked, certainly didn't
work in a multithreaded setting, and slowed everything down due to
having to do even more stuff at %esp changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1399
2002-12-28 12:55:48 +00:00
Julian Seward
9332fb832a Merge patch from Jeremy Fitzhardinge:
08-skin-clientreq
  Introduce a systematic way for skins to distinguish each other's
  client requests. Uses the de-facto standard two-letter identifiers in
  the top two bytes of the client request code. Also changes the
  interface to SK_(handle_client_request) so that a skin can say whether
  or not it handled the request, which allows correct setting of the
  default return value if the request was not handled.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1251
2002-10-22 04:14:35 +00:00
Nicholas Nethercote
089e7e3bcb Updated file descriptions in the copyright notices to reflect the core/skin
split.  Each skin now has its own two-line description.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1166
2002-10-02 13:26:35 +00:00
Nicholas Nethercote
f1689b96db Changed lots of files for the new core/ + skin/ directory structure:
- changed lots of Makefile.am files
   - changed configure.in
   - changed lots of #include lines for changed file names
   - changed lots of file headers n footers for changed file names
   - changed vg_regtest to handle new directory structure -- recursively
     traverses subdirectories for .vgtest test files
   - changed lots of paths in memcheck/ regression test expected outputs


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1090
2002-09-23 11:21:57 +00:00
Nicholas Nethercote
afebe61b37 Files updated, added and removed in order to turn the ERASER branch into HEAD
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1086
2002-09-23 09:36:25 +00:00