Commit Graph

660 Commits

Author SHA1 Message Date
Julian Seward
29058c3576 Fix suspicious code in the memcheck instrumenter which probably
rendered many of the assertions in this file ineffective.  Spotted by
Tom Truscott.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4587
2005-08-30 12:54:36 +00:00
Nicholas Nethercote
e715ae93fa add comment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4491
2005-08-24 19:55:51 +00:00
Nicholas Nethercote
7e60141d65 Remove unnecessary #includes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4490
2005-08-24 19:50:39 +00:00
Nicholas Nethercote
8232209275 Make "silly arg" message 64-bit clean.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4476
2005-08-23 16:10:36 +00:00
Julian Seward
8be9f5eef7 Fix signedness-of-char problem which caused this to segfault on ppc32-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4462
2005-08-19 09:07:34 +00:00
Nicholas Nethercote
224dad480c Make it possible to match against "???" line in suppressions,
using "obj:*" or "fun:*".  Also generate "obj:*" for such lines
with --gen-suppressions.  Includes a regtest.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4447
2005-08-18 15:49:21 +00:00
Nicholas Nethercote
64974a1033 Added VG_(OSet_LookupWithCmp)(), which can be useful.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4444
2005-08-17 21:06:07 +00:00
Nicholas Nethercote
dbae71819c malloc_usable_size() was totally broken, crashing immediately.
I guess it's not very widely used :)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4439
2005-08-17 04:03:31 +00:00
Nicholas Nethercote
39589630bf minor fixes (probably not worth backporting)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4434
2005-08-16 03:42:44 +00:00
Nicholas Nethercote
d5f110a674 wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4433
2005-08-16 03:34:56 +00:00
Nicholas Nethercote
d5738fd68d lots of little wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4432
2005-08-16 03:29:50 +00:00
Nicholas Nethercote
233a1fc175 How do you like this: there was no proper description in the manual
of leak error messages, nor any examples.  So I added one, and moved
what info there was about leaks out of its separate section, and into
the section describing all the kinds of error message.

BACKPORT TO 3_0_X



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4427
2005-08-16 02:20:17 +00:00
Nicholas Nethercote
b329702e3b A few minor manual updates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4419
2005-08-15 04:26:13 +00:00
Nicholas Nethercote
7ec1597605 Bleh, forgot this.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4418
2005-08-15 02:06:39 +00:00
Nicholas Nethercote
e009050880 Whoops... I guess the regtests don't exercise that code...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4416
2005-08-15 01:54:05 +00:00
Nicholas Nethercote
fcdc60441e Something I realised recently: in C, iterators are much better than
higher-order functions for traversing data structures.  The higher-order
approach is too clumsy due to the lack of polymorphism and closures;  you
have to use void* too much and it is more verbose than it should be.

Hence, I replaced all the uses of HT_first_match() and
HT_apply_to_all_nodes() with equivalent uses of the hashtable iterator.
Also replaced higher-order traversal functions for Memcheck's freed-list
and the thread stacks with iterators.  That last change changes the
core/tool interface, so I've increased the version number.







git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4415
2005-08-15 01:52:02 +00:00
Nicholas Nethercote
756f513b51 Add a thorough unit test for m_oset. Note that this is Memcheck
testing code that's part of Valgrind, which is a good thing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4412
2005-08-14 22:43:53 +00:00
Nicholas Nethercote
7062ca6bc7 Remove more now-unnecessary casts, thanks to the recent VgHashTable changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4409
2005-08-14 18:32:16 +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
5d07a9ad26 Changed many, but not all, of the VgHashNode* parameters and return
types in m_hashtable.c to void*.  This requires no changes to code
already using VgHashTables, but it allows some previously-required casts
to be removed.  I also changed Memcheck and Massif by removing some of
these now-unnecessary casts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4404
2005-08-14 06:24:20 +00:00
Nicholas Nethercote
c37f2349c6 fix an output for xml1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4383
2005-08-11 02:48:11 +00:00
Nicholas Nethercote
220b4e8224 Tighten up update_extra() for Memcheck.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4382
2005-08-11 02:46:54 +00:00
Nicholas Nethercote
d892f660ec Streamline handling of realloc() in Memcheck and Massif by using
the newly added VgHashTable functions.  Also some other minor changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4380
2005-08-11 02:09:25 +00:00
Nicholas Nethercote
8515143ce8 Get rid of some stupidity:
- Added some useful hash table functions (vanilla lookup() and remove()).
  [Actually, I accidentally added them with my previous commit]
  
  Replaced various simple uses of VG_(HT_get_node) with these new functions. 

- Passing record_freemismatch_error() the MAC_Chunk of the freed heap block.
  So now we don't need to call describe_addr() to re-find that block, which
  means that we can remove the MAC_Chunk from the malloc_list earlier, rather
  than having to do a lookup and then later remove it with the stupid removal
  handle returned by VG_(HT_get_node)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4379
2005-08-11 00:47:10 +00:00
Nicholas Nethercote
7f8c275c59 Give variable a better name.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4378
2005-08-11 00:06:36 +00:00
Nicholas Nethercote
a6f1874fd2 Use memcpy() instead of a loop.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4377
2005-08-10 21:25:36 +00:00
Julian Seward
a31dc3adf0 Update regtest output after r4356. Will update 64-bit expected output
tomorrow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4357
2005-08-09 22:21:14 +00:00
Tom Hughes
9ee36c69b4 Fix up the sigaction results.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4347
2005-08-08 18:32:54 +00:00
Julian Seward
b725cfc2e2 Updated expected output following %eflags.ac simulation fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4334
2005-08-06 12:26:26 +00:00
Nicholas Nethercote
4054aeb4c2 Remove temporary file once regtest completes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4301
2005-08-01 15:12:23 +00:00
Nicholas Nethercote
d597c842e5 Add explanation of filename.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4300
2005-08-01 15:11:15 +00:00
Nicholas Nethercote
63f82da63d fix breakage/wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4261
2005-07-25 23:30:24 +00:00
Nicholas Nethercote
a269d9cb78 Clean up command-line args info in the manual and man page for 3.0.0
release.  



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4259
2005-07-25 23:18:44 +00:00
Nicholas Nethercote
20525216ee Tweak order of Memcheck's cmd-line options.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4258
2005-07-25 23:18:04 +00:00
Nicholas Nethercote
1f14543221 Update docs for 3.0.0 release. Still to do: update command line options.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4246
2005-07-25 00:12:19 +00:00
Julian Seward
a421699ed2 Rename tags in XML <status> block.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4240
2005-07-24 07:33:15 +00:00
Tom Hughes
33b11a393c Add some more intercept rules for ld.so on amd64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4222
2005-07-21 15:25:04 +00:00
Nicholas Nethercote
7d2702cc92 Fix broken tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4207
2005-07-20 03:03:44 +00:00
Julian Seward
ae8310aa86 Use %t rather than %s in some places for constructing XML output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4188
2005-07-19 15:00:25 +00:00
Nicholas Nethercote
93634bbe44 Add note about justified pedantry of overlap checking.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4174
2005-07-19 00:48:55 +00:00
Julian Seward
ce1682b2d8 Track API changes in vex r1272.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4159
2005-07-18 11:41:15 +00:00
Tom Hughes
db7c0612f1 Fixed debug code so that it compiles and fixed a printf to report the
start and end as (apparently) intended.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4157
2005-07-18 09:41:57 +00:00
Nicholas Nethercote
1b5839b47a Fixed bug #88678 -- debug info is now correctly gathered for files
containing spaces.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4146
2005-07-12 23:28:59 +00:00
Julian Seward
f13ea11bf8 Clean up endianness macros a bit. Now pub_tool_basics.h defines
VG_LITTLEENDIAN or VG_BIGENDIAN and that's what should be used.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4142
2005-07-10 00:53:42 +00:00
Julian Seward
1f69df95cc Comment wibble.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4132
2005-07-08 09:46:53 +00:00
Julian Seward
87b4da1f0b Create and use bigendian versions of MC_(helperc_{LOAD,STORE}V{2,4,8}).
This involved some serious nastyness from the Department of Cpp Abuse.

Memcheck still bombs on ppc32 for unknown reasons.

There are still endianness issues within these functions, I think.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4129
2005-07-08 01:29:33 +00:00
Julian Seward
613e5c540e Scan the entire BB looking for "bogus literals"* before instrumenting
any of it, so as to avoid any problems arising from switching from one
scheme to the other half-way through.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4117
2005-07-06 19:42:23 +00:00
Julian Seward
af88ef1f2d Add a regression test for memcheck's ability do deal with partially
defined operands in equality comparisons.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4116
2005-07-06 19:01:53 +00:00
Julian Seward
b59cbb45c8 Extensively re-analyse, re-check and revise the scheme for expensive
handling of integer EQ/NE, which can sometimes do better than the
naive scheme when the inputs are partially defined.  I never was
convinced it was correct before, but now I am.  Regtest to follow.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4115
2005-07-06 18:48:59 +00:00
Nicholas Nethercote
e67b65d0eb Changed m_hashtable.c to allow the size of the hash table to be specified
when it is created.  Fortunately this didn't affect code outside this
module except for the calls to VG_(HT_construct)().

As a result, we save some memory because not all tables have to be as big
as the ones needed for malloc/free tracking.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4100
2005-07-03 17:53:11 +00:00