Commit Graph

930 Commits

Author SHA1 Message Date
Julian Seward
59b2716959 * document gcc code generation shenanigans on ppc32-linux
* add docs for --malloc-fill and --free-fill


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7262
2007-12-02 02:01:09 +00:00
Julian Seward
9ad4d494fa New options for Memcheck, --malloc-fill=<hexnumber> and
--fill-free=<hexnumber>, which cause malloc'd(etc) and free'd(etc)
blocks to be filled with the specified value.  This can apparently be
useful for shaking out hard-to-track-down memory corruption.  The
definedness/addressability of said areas is not affected -- only the
contents.  Documentation to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7259
2007-11-30 21:41:40 +00:00
Julian Seward
755bc0ea22 Make the freed-block-queue volume metrics 64-bit throughout, to avoid
any wierdness on very large machines in the future.  Also, double the
default size from 5MB to 10MB, on the basis that programs are now on
average twice as lardy as they were when it was set to 5MB, whenever
that was.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7256
2007-11-30 17:19:36 +00:00
Julian Seward
953b8549d7 Changes to make Memcheck work sanely on recent incarnations of AIX 5.3:
* add a few more syscall wrappers, and fix a couple of buggy ones

* intercept strcmp et al in a few more libraries



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7249
2007-11-29 03:08:32 +00:00
Julian Seward
c7fbd65201 Make Memcheck work sanely on AIX5.3 (again):
* Don't intercept putenv/getenv/setenv.  Causes a lot of whinging
  about missing TOC pointers.

* Add 'strcmp' to the bundle of 4 functions intercepted in all
  objects.

* xlc now seems to route calls through to malloc_common, free_common,
  calloc_common, realloc_common, memalign_common in libc.  Intercept
  those names too.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7241
2007-11-27 11:42:47 +00:00
Julian Seward
9101880b1f Update documents in preparation for 3.3.0, and restructure them
somewhat to move less relevant material out of the way to some extent.
The main changes are:

* Update date and version info

* Mention other tools in the quick-start guide

* Document --child-silent-after-fork

* Rearrange order of sections in the Valgrind Core chapter, to move
  advanced stuff (client requests) to the end, and compact stuff
  relevant to the majority of users towards the front

* Move MPI debugging stuff from the Core manual (a nonsensical place
  for it) to the Memcheck chapter

* Update the manual's introductory chapter a bit

* Connect up new tech docs summary page, and disconnect old and
  very out of date valgrind/memcheck tech docs

* Add section tags to the Cachegrind manual, to stop xsltproc
  complaining about their absence



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7199
2007-11-22 01:21:56 +00:00
Julian Seward
dfebdf0206 Add regtest for the --child-silent-after-fork added in r7177.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7178
2007-11-17 23:00:47 +00:00
Julian Seward
5e2a8da202 Spelling fixes and misc tidying for the manual. (Brian Gough)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7173
2007-11-17 09:43:25 +00:00
Julian Seward
7cf42600a1 Add a regression test for #152022.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7159
2007-11-15 22:33:32 +00:00
Julian Seward
fd7a6b5363 Intercept __memcpy_chk, which appears in glibc-2.6.1. Also fix some
backslash uglyness.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7155
2007-11-13 20:52:29 +00:00
Julian Seward
5e290312a0 Track vex r1793: make all tools able to handle the new IR memory bus
event statement (Ist_MBE).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7119
2007-11-09 23:06:35 +00:00
Julian Seward
75fd9878c9 Merge (from branches/THRCHECK) the following amd64-linux stack unwind
kludges^H^H^H^H^H^H^Henhancements:

r6802: For VG_(record_ExeContext) et al, add a new parameter
(first_ip_delta) which is added to the initial IP value before the
stack is unwound.  A safe value to pass is zero, which causes the
existing behaviour to be unchanged.  This is a kludge needed to work
around the incomplete amd64 stack unwind info in glibc-2.5's clone()
routine.

r7059: Add a last-ditch heuristic-hack to the amd64-linux stack
unwinder, which is used when all other methods fail.  Seems like GDB
has something similar.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7118
2007-11-09 23:02:28 +00:00
Julian Seward
5338c831db Don't print warnings about silly args to malloc/calloc in XML mode.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7111
2007-11-09 11:33:02 +00:00
Nicholas Nethercote
7cb817e078 Fix various format string errors, courtesy of Florian Krohm.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6902
2007-09-23 00:51:24 +00:00
Nicholas Nethercote
3f2e579afa Change an Int to a SSizeT to avoid overflows. Fixed bug 148174.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6855
2007-09-17 22:46:45 +00:00
Nicholas Nethercote
0974a299f5 Split the OSet interface into two parts: "OSetGen_", which is the existing
interface and provides full power;  and "OSetWord_", which is an
easier-to-use interface for if you just want to store words.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6841
2007-09-17 05:30:48 +00:00
Julian Seward
57b2c66277 Oops. Fix silly error that gcc-4.3 complained about.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6792
2007-08-31 10:21:40 +00:00
Julian Seward
0ed8fc0ce0 Merge, from CGTUNE branch, a cleaned up version of r6742:
Another optimisation: allow tools to provide a final_tidy function
which they can use to mess with the final post-tree-built IR before it
is handed off to instruction selection.

In memcheck, use this to remove redundant calls to
MC_(helperc_value_check0_fail) et al.  Gives a 6% reduction in code
size for Memcheck on x86 and a smaller (3% ?) speedup.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6787
2007-08-28 06:05:20 +00:00
Julian Seward
acf1f14d7a Merge from CGTUNE branch:
r6738:
Unroll memset; apparently is popular in some places (kpdf).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6780
2007-08-25 23:25:00 +00:00
Julian Seward
349136c739 Merge from CGTUNE branch:
r6736:
Hook up Memcheck to the new Left and CmpwNEZ primops defined in vex r1769.

r6737:
Track vex r1770 (removal of Iop_Neg64/32/16/8 primops)





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6779
2007-08-25 23:09:36 +00:00
Julian Seward
0e70d01bdd Changes to m_hashtable:
Allow hashtables to dynamically resize (patch from Christoph
Bartoschek).  Results in the following interface changes:

* HT_construct: no need to supply an initial table size.
  Instead, supply a text string used to "name" the table, so
  that debugging messages ("resizing the table") can say which
  one they are resizing.

* Remove VG_(HT_get_node).  This exposes the chain structure to 
  callers (via the next_ptr parameter), which is a problem since
  callers could get some info about the chain structure which then
  changes when the table is resized.  Fortunately is not used.

* Remove VG_(HT_first_match) and VG_(HT_apply_to_all_nodes) as
  they are unused.

* Make the iteration mechanism more paranoid, so any adding or
  deleting of nodes part way through an iteration causes VG_(HT_next)
  to assert.

* Fix the comment on VG_(HT_to_array) so it no longer speaks 
  specifically about MC's leak detector.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6778
2007-08-25 07:19:08 +00:00
Nicholas Nethercote
250dd17646 Add a comment with a definitive account of when Memcheck does (and does not,
but should do) undefined value checks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6750
2007-05-24 23:14:41 +00:00
Julian Seward
b91b51b42b Merge (from 3.2 branch) r6743 (Edit the manual to bring it up to date
and make some of the wording a bit more professional sounding.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6745
2007-05-23 21:58:33 +00:00
Dirk Mueller
40de8b88ed wrap env related functions to be able to track undefined
values better


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6706
2007-04-19 09:47:32 +00:00
Julian Seward
458d626be4 Use a 64-bit counter to keep track of the total number of bytes
allocated, rather than SizeT which is word-sized.  Your average C++
lardware can easily turn over more than 4G in total in a half hour run
on a 32-bit machine, in which case the counter wraps around.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6649
2007-03-14 11:57:37 +00:00
Julian Seward
51c70bbf4c Back out r6640; I'm pretty sure it is the wrong thing to do now.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6648
2007-03-14 11:55:28 +00:00
Julian Seward
34454d5464 Add a custom stderr filter for memcheck/tests/amd64/defcfaexpr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6644
2007-03-12 01:29:31 +00:00
Julian Seward
bd78cc2d2e Add a test for int3 on x86 (from Peter Maydell)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6643
2007-03-12 00:42:26 +00:00
Julian Seward
599d74dcf0 Add a test for int3 on amd64 (from Peter Maydell)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6642
2007-03-12 00:27:30 +00:00
Julian Seward
e9a5b6ad4e It appears glibc-2.5's getenv() function steps along environment
strings in 16-bit chunks, which can cause false errors in some cases
(sigh).  So do the usual thing and replace it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6640
2007-03-11 13:00:34 +00:00
Nicholas Nethercote
ace4f264b9 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6639
2007-03-10 02:27:44 +00:00
Julian Seward
9218c18f45 Add a regression test for unwind handling of DW_CFA_def_cfa_expression.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6628
2007-02-28 13:27:37 +00:00
Julian Seward
7efbc7213b Track recent XArray changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6625
2007-02-27 22:36:14 +00:00
Julian Seward
4cb951158d Add an intercept for __memmove_chk (another glibc 2.5 artefact)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6608
2007-02-23 09:03:26 +00:00
Julian Seward
56b7f5a6c9 Work around gcc limitations on aix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6579
2007-02-09 02:37:11 +00:00
Julian Seward
5c1eb23d61 __stpcpy_chk: sync with Dirk's original proposal, and show origins
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6556
2007-01-28 06:32:01 +00:00
Julian Seward
dfad5c3381 Intercept __stpcpy_chk. (Dirk Mueller)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6553
2007-01-27 00:49:44 +00:00
Julian Seward
422c3d7eab Add a test that very long function names are safely truncated in
memcheck's XML output.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6541
2007-01-19 20:28:44 +00:00
Julian Seward
2ee6ebe4bf Intercept mempcpy also in ld.so.1.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6537
2007-01-18 18:01:45 +00:00
Julian Seward
648b3b2707 Intercept _intel_fast_memcpy in the main executable. Partial fix for
#139667.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6526
2007-01-16 21:42:28 +00:00
Julian Seward
43fcd4e09e Make sse1-friendly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6525
2007-01-16 20:01:15 +00:00
Julian Seward
0bdcfd7702 Add tests to check that memcheck does not give a false error for 'xor
%reg,%reg' (in various forms) when %reg contains undefined data.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6524
2007-01-16 19:15:19 +00:00
Nicholas Nethercote
824abc79ce Fix a bug reported by Bruce Lowekamp involving the interaction of
--gen-suppressions with leak checking.  Added a regtest for it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6514
2007-01-12 23:59:50 +00:00
Julian Seward
0e343fea86 Regtest for FXSAVE on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6499
2007-01-10 04:57:27 +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
b76cb7d9e6 Replace bcmp in ld.so.1.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6479
2007-01-06 06:30:48 +00:00
Julian Seward
85204d209d Avoid printf in the recursive routines, so that the intercept of
mempcpy which is called from printf does not mess up the
carefully-balanced call-stack overflow checks that this test does on
ppc64-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6471
2007-01-01 22:07:58 +00:00
Julian Seward
20b41c0c23 Provide a replacement for mempcpy.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6469
2006-12-31 18:55:56 +00:00
Julian Seward
daf075a233 Intercept/replace glibc-2.5's __strcpy_chk function for the usual
reasons: it reads word-sized chunks from memory and so produces lots
of errors in SuSE 10.2 (amd64).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6462
2006-12-31 00:22:30 +00:00
Julian Seward
37c3d2ead6 Merge (from 3_2_BRANCH) r6457/8 (Support 64k pages on ppc32/64-linux
(Jakub Jelink, Dave Nomura) )



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6459
2006-12-30 17:45:08 +00:00