1103 Commits

Author SHA1 Message Date
Dirk Mueller
a1e28f774d add suppression about common X11 protocol and ICE errors. Please
scream if you don't like this.. Personally I've never seen a valid
warning and all of them were spurious.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1826
2003-09-18 01:49:30 +00:00
Dirk Mueller
0f45de2a6d remove default.supp during clean
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1825
2003-09-18 01:42:24 +00:00
Dirk Mueller
7d1abc6b9e compiler warning fixes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1824
2003-09-18 01:41:48 +00:00
Dirk Mueller
612b8daeac fix compiler warnings
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1823
2003-09-18 01:39:50 +00:00
Dirk Mueller
34af4d4549 fix compiler warning
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1822
2003-09-18 01:15:32 +00:00
Julian Seward
f08f0f0ca3 Suppress a couple more messages when -q applies.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1821
2003-09-17 21:48:26 +00:00
Julian Seward
76b167b551 Add patch from Stephan Kulow to solve the following:
read_procselfmaps calls *record_mapping which
   is startup_segment_callback for init_memory. But this
   again calls through read_symbols read_procselfmaps
   again with read_from_file == True. But this overwrites
   the internal buffer and causes parsing errors.
   (What makes the error a bit funny is that valgrind
    wouldn't have catched that error afaik :)
   Anyway: our solution is to forbid read_from_file from
   with callbacks

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1820
2003-09-17 07:39:28 +00:00
Nicholas Nethercote
c0f0059bf7 Added some skin-visible functions that give skins a bit more control over
how stack snapshots are taken and printed;  they can be used in preference
to VG_(get_ExeContext)() and VG_(pp_ExeContext)().  These are used by
Massif, my heap profiling skin.

Changed --num-callers to allow a backtrace size of 1.

Added code so that when Valgrind fails to disassemble an instruction, the
instructions line/file and address are printed out, which makes it easier to
work out where and what it is.  Required the stack snapshot changes above.

MERGE TO STABLE?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1819
2003-09-16 07:41:43 +00:00
Nicholas Nethercote
977e0eb56f Made the realpath overlap ones apply for Addrcheck too.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1818
2003-09-15 07:19:19 +00:00
Nicholas Nethercote
0c7c912c5b Fix problem with adjtimex.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1817
2003-09-09 11:27:59 +00:00
Nicholas Nethercote
1cfe4c9b5b With -v option, client program's argv[] now printed at startup. Should be
useful when trying to interpret users' problems.  Each argv is printed on a
separate line, to make it extra clear where each one starts and ends.

MERGE TO STABLE (PLEASE!)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1816
2003-09-09 07:26:21 +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
aae64e3630 Forgot to add these files for the writev regression test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1814
2003-09-05 23:02:38 +00:00
Dirk Mueller
be5cd9c8c1 patch for adjtimex syscall by Bob Van Manen <BVanManen@Scene7.com>
appares to compile for me


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1813
2003-09-05 17:46:54 +00:00
Nicholas Nethercote
138ada5bc2 Fixed readv() and writev() so they won't fall over if they are given a negative
count.  Added a regression test for it.

Updated the basic test stderr filter to strip out line numbers from
vg_intercept.c

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1812
2003-09-04 21:57:45 +00:00
Nicholas Nethercote
65461f0427 Trivial assertion fix -- the SSE3 instructions can be of size 8.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1811
2003-09-04 21:12:22 +00:00
Nicholas Nethercote
7b2a49544e Fixed brk(); it was almost completely broken.
Added a regression test for it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1810
2003-09-04 20:57:51 +00:00
Nicholas Nethercote
f1bde14402 Fixed overlap errors so the hacky strdup'ing of strings isn't necessary;
now passing in the relevant parameters via an 'extra' struct, as is proper.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1809
2003-09-04 20:50:47 +00:00
Nicholas Nethercote
e1d0585265 docs typo
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1808
2003-08-29 11:42:50 +00:00
Nicholas Nethercote
f6e8535d25 Minor fix: errors on MMX_MemRd instructions were erroneously being called
writes.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1807
2003-08-28 17:46:16 +00:00
Dirk Mueller
4d7ce5006f implement waitpid syscall. Patch by Benjamin Lee <benjaminlee@users.sf.net>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1806
2003-08-26 17:36:26 +00:00
Nicholas Nethercote
9b074f685f Teach Cachegrind about SSE instructions, courtesy of Josef Weidendorfer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1805
2003-08-25 16:15:40 +00:00
Nicholas Nethercote
f563f81443 Added #17 about how to write suppressions.
MERGE TO STABLE (along with several other FAQ changes I've made recently but
forgot to write this note on)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1804
2003-08-20 11:19:17 +00:00
Nicholas Nethercote
29c92969ff Fix up the way SK_(update_extra)() is called.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1803
2003-08-19 16:14:42 +00:00
Nicholas Nethercote
f55a533a47 Comment-only change
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1802
2003-08-19 12:16:05 +00:00
Nicholas Nethercote
946e95a5b6 Fix inaccuracies in #12.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1801
2003-08-19 07:50:24 +00:00
Nicholas Nethercote
1738927994 Added FAQ #16, about that assertion failure in 'make' when building.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1800
2003-08-15 07:35:20 +00:00
Nicholas Nethercote
d4192ee3b2 comments change only
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1799
2003-08-14 15:23:55 +00:00
Nicholas Nethercote
483211c96d Another update to #12.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1798
2003-08-13 09:56:30 +00:00
Nicholas Nethercote
f824df47c3 Clarified FAQ #14.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1797
2003-08-13 08:34:42 +00:00
Dirk Mueller
ba418da664 its linux 2.6.x these days
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1796
2003-08-10 13:37:01 +00:00
Nicholas Nethercote
37f6cc0c0d Added FAQ 15, about writing to read-only memory.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1795
2003-08-07 21:24:24 +00:00
Julian Seward
568fcc200b Add memcmp() to our collection of functions we do ourselves.
I don't trust the glibc not to be optimised-to-hell-and-beyond.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1794
2003-07-30 21:24:25 +00:00
Julian Seward
d9bc0c3167 more wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1792
2003-07-27 08:04:48 +00:00
Julian Seward
f35b729f82 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1791
2003-07-26 21:39:05 +00:00
Julian Seward
99ab046fe6 --> 20030725
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1790
2003-07-26 17:50:42 +00:00
Julian Seward
439cee2a05 Increase VG_N_FORKHANDLERSTACK from 2 to 4. For reasons known only to
itself, pth_atfork1 and 2 fail on R H 7.3 for a size-2 stack, but only
with certain skins.  Don't ask me.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1789
2003-07-26 17:49:58 +00:00
Julian Seward
36e7c48a43 Update for 20030725.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1788
2003-07-25 21:11:40 +00:00
Julian Seward
c924c63b20 VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH): remove leading spaces and
colon created by this mechanism.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1787
2003-07-25 19:58:11 +00:00
Julian Seward
ffbedad97e Fix the strdup-of-OverlapErr-string problem better. Move the
strdup to MAC_(record_overlap_error), wherein we know that
s is a string.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1786
2003-07-24 23:50:17 +00:00
Julian Seward
2e724ba3df construct_error(): strdup the supplied s (string) param which gives
extra info about some kinds of errors.  It was being allocated on the
stack by complain2/3 in mac_malloc_wrappers.c.

If the constructed error is found to be a duplicate, free the strdup'd
space.  That limits the worst-case space leak to one strdup'd string
for each different error we keep track of, and the latter by default
is limited to 300.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1785
2003-07-24 21:29:40 +00:00
Nicholas Nethercote
1cc2127659 Moved vg_kerneliface.h from coregrind/ to include/, where it was needed for
external skin compilation to work.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1784
2003-07-24 19:35:00 +00:00
Nicholas Nethercote
c2bfdc506c Changed the behaviour of realloc() in Memcheck, Addrcheck and Helgrind.
Previously, when realloc() was asked to make a block bigger, the ExeContext
describing where that block was allocated was increased;  however, if the block
became smaller or stayed the same size, the original ExeContext remained.  This
is correct in one way (that's where the memory manager actually parcelled out
the block) but it's not very intuitive.  This commit changes things so the
ExeContext of a block is always changed upon realloc().  I added a regression
test for it too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1783
2003-07-24 17:39:59 +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
Julian Seward
53220a1cbb Use init_ExeContext_storage instead of relying (unintentionally) on
properties of 'static'.  Also, de-globalise this function.  Some days
I really yearn for a proper module system in C.  Come back Haskell,
all is forgiven :-)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1781
2003-07-23 23:01:11 +00:00
Nicholas Nethercote
ca5ea7998a Just clarified VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)'s workings a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1780
2003-07-23 09:40:50 +00:00
Nicholas Nethercote
fa19839b93 Fix a problem in VG_(mash_LD_PRELOAD_and_LD_LIBRARY_PATH)(): when removing the
added paths, it was taking out the colon between the removed entry and the
following, which meant the following was interpreted as having a big chunk of
whitespace at the start, which broke some things.

eg. was:

  "foo:bar"  --> "    bar"

now:

  "foo:bar"  --> "   :bar"

in which case "   " is considered a separate path in it's own right, albeit one
that doesn't mean anything.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1779
2003-07-23 09:22:02 +00:00
Nicholas Nethercote
aca466757f Changed behaviour of VALGRIND_COUNT_LEAKS slightly. Previously, the numbers it
returned (bytes leaked, dubious, etc) were incremented for every leak check
performed.  So if you called VALGRIND_DO_LEAK_CHECK twice in a row, the totals
would be updated twice by the same amount.  This was a bit silly.  So now
COUNT_LEAKS just returns the numbers of bytes leaked found from the previous
leak check.  I even updated the docs, and changed the regression test so old
version fail but the new version passes (by doing two DO_LEAK_CHECKS in a row).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1778
2003-07-22 22:03:58 +00:00
Nicholas Nethercote
9a5e615c4b Truncate the cachegrind.out.<pid> file, if it already exists. It wasn't doing
this, which meant that if a shorter file of the same name was written, the old
contents past the new end would remain, which would be bad.  Had (probably)
never happened because the <pid> suffix makes it very unlikely for filenames to
be reused.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1777
2003-07-22 20:45:11 +00:00
Julian Seward
39dac02699 Add to the list of new stuff in 20030716, some things I forgot.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1776
2003-07-22 17:47:42 +00:00