Commit Graph

138 Commits

Author SHA1 Message Date
Julian Seward
6107fd666c Add a port to IBM z/Architecture (s390x) running Linux -- Valgrind
side components. (Florian Krohm <britzel@acm.org> and Christian
Borntraeger <borntraeger@de.ibm.com>).  Fixes #243404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11604
2011-03-07 16:05:35 +00:00
Julian Seward
ce9c5ac16a Size the ARM_LINUX_FAKE_COMMPAGE correctly and add explanatory
comments.  Fixes #254556.  (Peter Maydell, peter.maydell@linaro.org)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11460
2010-10-20 15:43:09 +00:00
Julian Seward
7028b51512 Local-ise some variables that don't need to be visible outside this file.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11409
2010-10-07 10:01:40 +00:00
Julian Seward
0dfc00b23f Don't scan the entire Valgrind stack to check for impending
stack-overflow situations.  This causes an immense number of L2 misses
which are completely pointless, and the recent increase of the
Valgrind per-thread stack size from 64k to 1M greatly aggravates the
situation.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11343
2010-09-08 08:30:31 +00:00
Julian Seward
61dedcc71d Fix \n placement in Darwin sync-check-failure messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11204
2010-07-01 11:42:22 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Julian Seward
ef87f94e94 arm-linux: fake up the commpage entry at a lower level (in
parse_procselfmaps) so that the sync checker still works.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10993
2010-01-03 10:14:03 +00:00
Julian Seward
e9de458500 Merge from branches/ARM, all parts of the ARM-Linux port except for
the changes to do with reading and using ELF and DWARF3 info.
This breaks all targets except amd64-linux and x86-linux.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10982
2010-01-01 11:59:33 +00:00
Bart Van Assche
74246448f4 Removed dependency of include/pub_tool_basics.h on config.h.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10972
2009-12-29 16:56:18 +00:00
Bart Van Assche
d6bedf985d Compiles again on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10863
2009-08-23 11:17:25 +00:00
Bart Van Assche
6b9dcdcd97 The configure-time test whether the proc filesystem is mounted (introduced
in r10156) broke cross-compilation. This patch converts the configure-time
test into a runtime test. Should fix bug #204843.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10860
2009-08-23 09:53:27 +00:00
Nicholas Nethercote
5197db2b3d Fix compile error.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10672
2009-07-31 05:19:29 +00:00
Nicholas Nethercote
6a4973b256 Prettify the messages printed when segment mismatches happen. Also get rid
of two unnecessary gotos.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10671
2009-07-31 05:06:29 +00:00
Nicholas Nethercote
26daa53d28 In VG_(get_changed_segments) use dynamic memory allocation rather than
static memory allocation to avoid hardwiring an upper limit on CSS_SIZE.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10374
2009-06-24 08:32:42 +00:00
Nicholas Nethercote
b05a2a18d7 This commit merges the BUILD_TWEAKS branch onto the trunk. It has the
following improvements:

- Arch/OS/platform-specific files are now included/excluded via the
  preprocessor, rather than via the build system.  This is more consistent
  (we use the pre-processor for small arch/OS/platform-specific chunks
  within files) and makes the build system much simpler, as the sources for
  all programs are the same on all platforms.

- Vast amounts of cut+paste Makefile.am code has been factored out.  If a
  new platform is implemented, you need to add 11 extra Makefile.am lines.
  Previously it was over 100 lines.

- Vex has been autotoolised.  Dependency checking now works in Vex (no more
  incomplete builds).  Parallel builds now also work.  --with-vex no longer
  works;  it's little use and a pain to support.  VEX/Makefile is still in
  the Vex repository and gets overwritten at configure-time;  it should
  probably be renamed Makefile-gcc to avoid possible problems, such as
  accidentally committing a generated Makefile.  There's a bunch of hacky
  copying to deal with the fact that autotools don't handle same-named files
  in different directories.  Julian plans to rename the files to avoid this
  problem.

- Various small Makefile.am things have been made more standard automake
  style, eg. the use of pkginclude/pkglib prefixes instead of rolling our
  own.

- The existing five top-level Makefile.am include files have been
  consolidated into three.

- Most Makefile.am files now are structured more clearly, with comment
  headers separating sections, declarations relating to the same things next
  to each other, better spacing and layout, etc.

- Removed the unused exp-ptrcheck/tests/x86 directory.

- Renamed some XML files.

- Factored out some duplicated dSYM handling code.

- Split auxprogs/ into auxprogs/ and mpi/, which allowed the resulting
  Makefile.am files to be much more standard.

- Cleaned up m_coredump by merging a bunch of files that had been
  overzealously separated.

The net result is 630 fewer lines of Makefile.am code, or 897 if you exclude
the added Makefile.vex.am, or 997 once the hacky file copying for Vex is
removed.  And the build system is much simpler.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10364
2009-06-24 00:37:09 +00:00
Nicholas Nethercote
3829cffbcf Increase a hard limit that was reached in the wild.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10250
2009-06-05 05:28:17 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
a55fec7df9 DARWIN sync: UInt -> Int.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10006
2009-05-20 03:20:05 +00:00
Nicholas Nethercote
131ab00744 Merged non-Darwin-specific parts of r9397,r9423,r9490, 9461, 9462 from the
DARWIN branch.  A big ugly DARWIN/trunk sync commit, mostly to do with
changing the representation of SysRes and vki_sigset_t.  Functionality of
the trunk shouldn't be changed by it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9876
2009-05-18 02:12:08 +00:00
Nicholas Nethercote
9e15c2feea Merge r9754 (#includes tweak) from the DARWIN branch. Also remove a
Darwin-specific code snippet that crept in from a previous commit.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9756
2009-05-04 06:12:37 +00:00
Nicholas Nethercote
71da8cd3e1 Merged r9750, r9751 (remove m_aspacemgr layering violation) from the DARWIN
branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9752
2009-05-04 05:55:46 +00:00
Nicholas Nethercote
b15e3d9a45 Fix all the non-VEX problems identified with the Clang Static Analyzer.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9416
2009-03-15 23:25:38 +00:00
Nicholas Nethercote
2001629c3f Updated copyright years.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344
2009-03-10 22:02:09 +00:00
Nicholas Nethercote
5ad1dd61f9 Introduce a new type, PtrdiffT. Replace lots of uses of OffT (all those
that are memory offsets) with PtrdiffT;  OffT should only be used for file
sizes and offsets.

Change Off64T from a ULong to a Long, as it should be.  Replace some uses
of ULong in the address space manager with Off64T to match.

Also add a comment explaining the meanings of the basic types like Addr,
OffT, SizeT, etc.

Also fix the prototype for VG_(pread) -- the last arg is an OffT, not an
Int.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8959
2009-01-15 21:29:24 +00:00
Julian Seward
d658fbf429 Speed up VG_(am_find_nsegment). This is kind-of required by r8712,
which in turn is a fix for #156404.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8713
2008-10-27 01:25:14 +00:00
Julian Seward
811f102388 The address space manager, and in particular the NSegment type,
hardwire the assumption that an inode number is a UWord, that is, a
host word.  There's no reason for that assumption to be valid; an
inode number could be a 64-bit int even on a 32 bit platform (eg w.r.t
sys_stat64).  This commit changes inode numbers and, for good measure,
dev numbers, to be 64-bit regardless.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8521
2008-08-18 21:47:11 +00:00
Julian Seward
4cae5c3ed5 Merge branches/OTRACK_BY_INSTRUMENTATION into the trunk. This adds
support to Memcheck for tracking the origin of uninitialised values,
if you use the --track-origins=yes flag.

This currently causes some Memcheck regression tests to fail, because
they now print an extra line of advisory text in their output.  This
will be fixed.

The core-tool interface is slightly changed.  The version number for
the interface needs to be incremented.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7982
2008-05-01 20:24:26 +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
Tom Hughes
4ad22500c0 Made the argument to VG_(am_get_filename) const as it doesn't need
to be modified and the routine to find the segment for an address now
returns a const pointer.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7325
2008-01-08 16:48:30 +00:00
Julian Seward
652c5531b1 AIX5 counterpart to r7302: Improve handling of programs which require
very large main thread stacks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7306
2007-12-22 14:12:42 +00:00
Julian Seward
984e45e88f Add disclaimers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6709
2007-04-29 09:06:40 +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
019520f7a8 Merge r6480 (parse_procselfmaps: don't hand zero-length mappings to
*record_mapping)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6481
2007-01-07 02:03:01 +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
Julian Seward
d1034ee415 When being an 'inner valgrind' on 64-bit platforms, ensure the stack
is allocated below the magic 32G mark as it would be normally.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6375
2006-12-01 02:35:02 +00:00
Julian Seward
0124fc911d Merge r6105:
Refactor the address space manager, so there are two implementations
of it, plus a small common supporting library.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6252
2006-10-17 01:23:57 +00:00
Julian Seward
0f3600bb0f Split m_aspacemgr into a generic part and a Linux-specific part.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6230
2006-10-14 22:25:30 +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
b074dfb65f When unmapping segments from below aspacem_minAddr, convert them back
into SkResvns, not SkFrees.  Fixes #133694.  Thanks to Tom Hughes for
patch and test case.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6049
2006-09-11 19:49:35 +00:00
Julian Seward
b96b49cbc8 Increase number of segnames available (Stu Robinson).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6030
2006-08-28 13:05:48 +00:00
Julian Seward
054de9b1f3 Extra paranoia that should really have been committed in r6003.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6004
2006-08-16 15:06:53 +00:00
Julian Seward
070042a4c5 When handling mremap, disallow an expanding in-place remap if it would
trash some other segment as a result of the expansion.  This fixes
#129866.  I don't know if it is a good solution though.  Causes
none/tests/mremap{,2} to fail now, although I think it is still OK.
mremap really is a semantic disaster area.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6003
2006-08-16 14:22:29 +00:00
Julian Seward
a794b9e781 When a segment becomes free, and it is above aspacem_maxAddr, mark it
as SkResvn rather than SkFree, since doing otherwise causes the area
above aspacem_maxAddr - which starts out as SkResvn - to be polluted
with SkFree bits.  Fixes an assertion failure found by Alex Bennee
(users list, 9 Aug 06).

Also allow the preener to merge fixed-sized SkResvns so as to avoid
fragmentation that otherwise results.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6001
2006-08-16 01:48:19 +00:00
Julian Seward
ecca8a0ff9 Allow even more segments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5986
2006-07-24 08:07:28 +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
Tom Hughes
ea96388e51 When moving an address range add the new range before marking the old
one as free otherwise the filename referred to by the temporary copy
of the segment may be dropped from the segment name table when the old
range is freed even though the new range is going to use it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5920
2006-05-22 11:20:15 +00:00
Tom Hughes
593b49c32b Validate the fnIdx for a file segment when doing a sanity check.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5919
2006-05-22 11:15:47 +00:00
Nicholas Nethercote
a50c624ded Add a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5890
2006-05-09 18:46:01 +00:00
Tom Hughes
7ea1789a97 Ignore offset information in anonymous mmap calls. Fixes bug #126722.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5888
2006-05-09 09:06:56 +00:00