Commit Graph

896 Commits

Author SHA1 Message Date
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
Nicholas Nethercote
422afe504a Remove dead code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6449
2006-12-27 23:19:10 +00:00
Julian Seward
ac99d46578 Handle new primop Iop_SarN8x8 introduced in vex r1702.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6441
2006-12-27 01:16:58 +00:00
Julian Seward
1083ded7e2 Non-functional commit: track IR renaming in vex r1689.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6416
2006-12-24 02:24:11 +00:00
Julian Seward
0cc651608a Add missing case, apparently not very popular :-)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6406
2006-12-17 14:20:31 +00:00
Nicholas Nethercote
d162731a2c Completely overhauled the internals of Memcheck's error handling. All the
different error kinds were reusing the same struct for storing their
details.  Each one used some but not all the fields, and the AddrInfo was
similar, and it was very confusing.

So I changed MC_Error and AddrInfo to be tagged unions, like Vex's IRExpr and
IRStmt types.  The resulting code is a little more verbose but much easier
to understand.  I also split up several error kinds, which also made things
simpler.  The user-visible behaviour is identical except for a couple of
very minor things that I've documented in the NEWS file for the 3.3.0
release.

Ideally I'd get rid of the Addr and Char* fields in the core Error type,
which are not always used, and do them similarly within tools.  But that
would require changing the core/tool interface, so I'm leaving it for the
moment.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6402
2006-12-16 00:54:12 +00:00
Nicholas Nethercote
52dfe4cb39 Remove defunct constant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6401
2006-12-15 04:37:25 +00:00
Julian Seward
bd211db8f5 Include missing files in tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6397
2006-12-13 14:35:03 +00:00
Julian Seward
dfa95416d2 Fix error in aix zeropage handling.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6396
2006-12-13 03:16:40 +00:00
Julian Seward
043bf89f2a Minor tidying for regtests on AIX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6395
2006-12-12 01:38:15 +00:00
Julian Seward
b650be145e Fix various regtests, mostly by adding 64-bit outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6394
2006-12-11 03:23:41 +00:00
Julian Seward
b0c6a889c2 Update a couple of expected outputs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6390
2006-12-11 00:19:28 +00:00
Julian Seward
18f9d5c215 Update some expected outputs following r6382. There may be more ..
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6383
2006-12-06 18:53:07 +00:00
Julian Seward
80a670f93c Fix confusing and contradictory "Rerun with ..." messages printed at
the end of MC_(do_detect_memory_leaks).  This causes various leak
regression tests to fail; will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6382
2006-12-06 18:05:54 +00:00
Julian Seward
34a8fb5292 Fix suppression-matching bogon (Paul Floyd).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6378
2006-12-06 03:36:24 +00:00
Julian Seward
7fe15db883 Make it possible to suppress, and auto-generate suppressions for,
"User" errors; that is, errors resulting from client requests (check
memory range is addressible / defined).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6374
2006-11-28 00:15:35 +00:00
Nicholas Nethercote
2c3a6359bb Use the newly-added dopyIRBBExceptStmts() in tools.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6372
2006-11-25 22:38:11 +00:00
Julian Seward
7299831d35 Add a regtest for the false-uninitialised-value-report bug fixed by
vex r1675.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6354
2006-11-14 18:36:02 +00:00
Nicholas Nethercote
0399584b08 Fix a man page bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6345
2006-11-03 19:54:21 +00:00
Julian Seward
68475a1dc5 Fix bug in memcheck's instrumenter introduced in r6319. Big comment
in the code explains it.  Sigh.  Why can't anything be simple?



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6322
2006-10-19 13:22:16 +00:00
Julian Seward
a9a0bafb27 Observe the rule that requires all instrumenters to copy verbatim any
IR preamble preceding the first IMark.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6319
2006-10-18 12:41:55 +00:00
Julian Seward
c7b05679fe - Fix a subtle alignment-check bug I introduced into mc_die_mem_stack_12
- Add comments to many of the functions to make explicit their 
  alignment-check logic



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6314
2006-10-17 23:14:42 +00:00
Julian Seward
4413190e1a Updated expected with-TOC output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6307
2006-10-17 11:33:23 +00:00
Julian Seward
5b26b045dd Change a bunch of pointer <-> int casts to pointer <-> long casts so
as to stop gcc complaining so much on 64-bit platforms.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6306
2006-10-17 11:09:03 +00:00
Julian Seward
cac8c8a1f2 Track VG_(am_find_nsegment) const-ness change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6298
2006-10-17 02:23:23 +00:00
Julian Seward
88d3b910a2 Merge r6112:
Changes resulting from porting to AIX5:

- Auxiliary primary map handling has been redone, so that the
  performance penalty for hitting memory above the magic 32G limit is
  much reduced, and also the number of usable maps is limited only by
  how much memory is available.  The current code has been tested on
  64-bit AIX for processes up to about 8GB in size.

  The auxiliary primary maps are now stored in an OSet, "auxmap_L2".
  However, looking up in an OSet for each memory reference is
  expensive.  So the OSet is 'fronted' by 24-entry array which holds
  pointers to the 24 most recently used auxiliary primary maps.
  Accesses to this array are made faster by incrementally rearranging
  it on every lookup (if the requested map is found in the array, it
  is moved one element closer to the start of the array).

  Logically speaking, auxmap_L1 is a cache of auxmap_L2.  The L2-L1
  relationship is one of inclusion; iow L2 is not a victim cache.

  There is extensive new sanity check code for these structures.

- Along with the auxmap changes are semi-fast cases in mc_LOADVn_slow
  and mc_STOREVn_slow.  These catch naturally aligned, word-size loads
  which fall into addressible memory, and handle them directly rather
  than in a byte-by-byte fashion.

- Fix longstanding error with alignment checks in
  {new,die}_mem_stack_N.  Previously, these checked the alignment of
  the new SP value without taking the stack redzone size into account.
  This is only safe if the redzone size is 8-aligned.  The right thing
  to do is check alignment after adding on the redzone size.

- Add a new mechanism which allows specification, on the command line,
  of address ranges which memcheck is to 'ignore'.  Meaning that it
  regards all writes to those ranges as acceptable and all reads from
  those ranges as acceptable and returning initialised data.  This is
  done without disturbing the existing finally-balanced bitmap 
  machinery.  Instead, in mc_record_address_error, just ignore the
  error if the address falls inside an ignored-range.

  There is a new command-line flag --ignore-ranges= to specify
  the address ranges.  Currently up to 4 non-overlapping ranges may
  be specified.

  This kind of thing is useful if you want to do some strange thing
  like map a high-performance network card into memory and can't be
  bothered to tell memcheck about it through the official channels
  (intercepting syscalls/ioctls and telling aspacem about them.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6256
2006-10-17 01:28:10 +00:00
Julian Seward
3c6f899f71 Merge r6111:
AIX5 changes.  Perhaps this isn't quite the right place to add a
sqrt() replacement.  Hmm.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6255
2006-10-17 01:27:13 +00:00
Julian Seward
a48daec904 Merge r6109:
Various minor changes to make these compile on AIX5.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6254
2006-10-17 01:26:12 +00:00
Julian Seward
9284a14f28 Merge r6108:
Supply our own random number generator; else this test produces different
results on different platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6253
2006-10-17 01:25:13 +00:00
Julian Seward
713b2d46c0 Merge r6086:
Makefile.am changes for AIX5.  Almost all boilerplate stuff fitting in
with the existing factorisation scheme.  The only change of interest
is that configure.in now generates automake symbols of name
VGP_platform and VGO_os, whereas previously it just made VG_platform
which was a bit inconsistent with the VGP/VGO/VGA scheme used in C
code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6242
2006-10-17 00:56:43 +00:00
Julian Seward
03b9d0d3c4 wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6235
2006-10-15 12:47:37 +00:00
Julian Seward
ae8215b3ac Create a new module, m_vki, and move all knowledge about the kernel
interface, except for the syscall numbers, into that.  Mostly this
means moving include/vki-*.h to include/vki/vki-*.h.

include/pub_tool_basics.h previously dragged in the entire kernel
interface.  I've done away with that, so that modules which need to
see the kernel interface now have to include pub_{core,tool}_vki.h
explicitly.  This is why there are many modified .c files -- they have
all acquired an extra #include line.

This certainly breaks all platforms except x86.  Will fix shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6225
2006-10-14 19:26:10 +00:00
Julian Seward
4b572a567e Create a new module, m_vkiscnums, and move all the system call numbers
into that.  Mostly this means moving vki_unistd-<plat>.h to
include/vki/vki-scnums-<plat>.h.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6224
2006-10-14 15:51:32 +00:00
Julian Seward
afc64cc112 Expand the first para of the custom-allocator section so it says what
this section actually describes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6199
2006-10-06 11:47:01 +00:00
Julian Seward
d45c6296eb Regression tests for Graydon Hoare's enhanced mempool stuff, from
Graydon himself.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6198
2006-10-06 11:45:00 +00:00