Commit Graph

3726 Commits

Author SHA1 Message Date
Tom Hughes
babdf0de71 Removed surplus parenthesis.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4835
2005-09-30 08:12:54 +00:00
Tom Hughes
6c610b89c7 Rationalise the mmap system call handling - after examining the kernel
source it turns out that there are five different versions of mmap for
the three platforms we currently support:

  - On x86-linux there is mmap (aka old_mmap) which takes the
    arguments in a memory block and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On ppc32-linux there is mmap (aka sys_mmap) which takes the
    arguments in the normal way and the offset in bytes; and
    mmap2 (aka sys_mmap2) which takes the arguments in the normal
    way and the offset in pages.

  - On amd64-linux everything is simple and there is just the one
    call, mmap (aka sys_mmap)  which takes the arguments in the normal
    way and the offset in bytes.

To reconcile all this I have created a generic handler and then
written five platform specific wrappers which normalise all the
arguments and then call the generic handler.

I have also modified the address space manager to use mmap2 rather
than mmap on x86 and ppc32 so that large offsets can be correctly
handled.

There is still an issue of OffT truncating offsets as we go through
the address space manager that will need to be addressed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4834
2005-09-30 08:07:53 +00:00
Nicholas Nethercote
1805172055 whoops
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4833
2005-09-30 02:17:40 +00:00
Nicholas Nethercote
06e8adae1a add missing file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4832
2005-09-30 02:17:16 +00:00
Julian Seward
69a3fadbde Placate memcheck/tests/x86/scalar, which objected to the rewrite of
the sys_readlink wrapper.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4831
2005-09-30 01:47:12 +00:00
Nicholas Nethercote
e41c7abfe2 Commit Jeroen Witmond's xml-to-text translator, and use it for the FAQ.
Less double maintenance, hoorah!



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4830
2005-09-30 01:43:32 +00:00
Julian Seward
9f5c43b405 Get rid of duplicated STRINGIFY macros.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4829
2005-09-30 01:20:47 +00:00
Julian Seward
44e0ab593a In PRE(sys_readlink), fix up handling of /proc/<pid>/exe and
/proc/self/exe.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4828
2005-09-30 01:09:50 +00:00
Nicholas Nethercote
9024912d93 update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4827
2005-09-30 01:07:14 +00:00
Nicholas Nethercote
00a4e0b162 Enable sys_iopl on AMD64.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4826
2005-09-30 01:05:53 +00:00
Julian Seward
9d61e685ef Oh Arse. This'll teach me to edit the x86-specific sources on a ppc32
box.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4825
2005-09-30 00:49:01 +00:00
Julian Seward
98e527a62c A corresponding fix to 4823: don't deal with MAP_FIXED case directly
here; instead uniformly pass all requests to VG_(am_get_advisory), so
that layout policy is controlled from one place only.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4824
2005-09-30 00:45:47 +00:00
Julian Seward
1f46368c98 Changes to sys_mmap2 wrapper:
- update comment re offset scaling

- ppc32 offset is in bytes, not pages

- don't deal with MAP_FIXED case directly here; instead uniformly pass
  all requests to VG_(am_get_advisory), so that layout policy is controlled
  from one place only.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4823
2005-09-30 00:37:04 +00:00
Nicholas Nethercote
d0b346939c Future-proof a piece of conditional compilation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4822
2005-09-30 00:06:09 +00:00
Tom Hughes
734ffbfb60 On x86 and ppc32 the offset argument to mmap2 is specified in pages
not bytes. This is a horrible kludge of a fix and it should probably
be fixed properly with a separate sys_mmap for amd64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4821
2005-09-29 23:26:06 +00:00
Julian Seward
a8627dede8 Fix a very stupid bug in the new aspacemgr, in which mmap "hint-style"
requests were being granted at the requested address when they should
not have been.  This was causing ppc32-linux to crash at startup
(since the wrongly-granted mapping annihilated 5 others).  This shows
the value of a multiplatform approach -- the bug applies to all
targets, yet x86 and amd64 appeared to work perfectly.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4820
2005-09-29 21:20:41 +00:00
Julian Seward
e0a5f54cf9 Make ppc32-linux build again following aspacem merge. Doesn't work, though:
programs crash before reaching main.  I don't know why.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4819
2005-09-29 11:09:56 +00:00
Julian Seward
002bc6c7e7 Comment-only changes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4818
2005-09-29 10:24:17 +00:00
Nicholas Nethercote
c8792e1e81 Add an explanatory message for when instruction decoding fails.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4817
2005-09-29 00:35:18 +00:00
Nicholas Nethercote
65e1e0b804 Remove redundant function call.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4816
2005-09-29 00:31:40 +00:00
Nicholas Nethercote
21f31418f0 Fix up vg_preload_core.so vs. vgpreload_core.so confusion introduced
during the ASPACEM merge.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4815
2005-09-29 00:25:07 +00:00
Julian Seward
e2f8cc1393 Fix subtle bug in ML_(generic_POST_sys_shmdt) caused by new aspacem.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4814
2005-09-28 20:05:31 +00:00
Julian Seward
75d5c9fbd4 %u -> %lu
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4813
2005-09-28 20:00:30 +00:00
Julian Seward
81852e9bf5 Fix command-line printing.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4812
2005-09-28 19:59:19 +00:00
Julian Seward
e8dc60215c Make --log-socket= work on amd64-linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4811
2005-09-28 19:58:58 +00:00
Nicholas Nethercote
c35f8e6213 Make primes.c a bazillion times faster.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4810
2005-09-28 14:49:40 +00:00
Julian Seward
8055a3a37d Restore correct version number following the aspacem merge.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4809
2005-09-28 11:51:17 +00:00
Julian Seward
40f6598ba4 Increase some sizes to deal better with the new multigigabyte world:
- on 64-bit platforms, double the size of the supported address
  space to 32G.

- Increase the size of the ExeContext table 6 times.  Some very
  large apps have been observed to have been doing a lot of 
  searching in the old 4999 entry table.  This table may be
  OSetified in the fullness of time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4808
2005-09-28 11:50:20 +00:00
Julian Seward
f8b0e0df14 Handy program for finding prime numbers (small ones!)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4807
2005-09-28 11:25:10 +00:00
Julian Seward
b98ac01c9f Get rid of pub_core_main.h, so that m_main is not imported by anyone,
and so is not part of a module cycle.  This requires a moderately
grotty hack of passing a continuation-function pointer in a global
variable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4806
2005-09-28 10:47:38 +00:00
Julian Seward
a03a1fa3bd Privatise parse_procselfmaps() and move it into aspacemgr.c in order
to benefit from the module-cycle-breaking functions in aspacemgr.c.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4805
2005-09-28 09:37:16 +00:00
Julian Seward
c3d915e97b Rename m_launcher.c to launcher.c to make clear it's not part of the
normal module scheme -- it's a standalone program.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4804
2005-09-28 01:53:07 +00:00
Julian Seward
d13622abed VG_(am_extend_into_adjacent_reservation_client): Do not allow the
reservation segment to be shrunk below one page.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4803
2005-09-28 01:46:31 +00:00
Julian Seward
68ccd98f62 Get rid of some macros used only by the old aspacemgr, and tidy up
m_main even more.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4802
2005-09-28 01:36:01 +00:00
Julian Seward
f75575351e Clean up the m_debuginfo interface a bit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4801
2005-09-28 01:23:25 +00:00
Julian Seward
38b71df161 Get rid of the "ioctl-mmap" weird-hack flag.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4800
2005-09-28 01:14:32 +00:00
Julian Seward
8bf81005ae Small cleanups, mostly of m_main:
- Move VG_(fd_{soft,hard}_limit) into m_clientstate
- m_main: clean up auxv handling.  Get rid of scan_auxv().
- m_main: move scan_colsep() to somewhere more sensible.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4799
2005-09-28 00:53:09 +00:00
Julian Seward
114b0d2967 Don't reserve space for trampoline page on the stack, since it isn't
used any more.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4798
2005-09-27 23:53:09 +00:00
Nicholas Nethercote
60aae81ae6 Remove now-unused "shadow_memory" need.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4797
2005-09-27 21:35:01 +00:00
Nicholas Nethercote
01ace453bb Record an observation about addr_is_in_MAC_Chunk().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4796
2005-09-27 20:51:12 +00:00
Nicholas Nethercote
f339e45fe3 Remove ancient unused test files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4795
2005-09-27 20:28:00 +00:00
Nicholas Nethercote
d9c2f2f027 Fix up Makefile.core.am which got a little confused during the ASPACEM
merging.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4794
2005-09-27 20:27:04 +00:00
Julian Seward
6dadd73562 Unbreak build on amd64 following aspacem merge.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4792
2005-09-27 19:57:35 +00:00
Nicholas Nethercote
97f1d67fb7 Disable vgtest_ume, which is broken.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4791
2005-09-27 19:52:02 +00:00
Nicholas Nethercote
11dfb2e8a0 Fix scalar and cmdline[12].
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4790
2005-09-27 19:46:46 +00:00
Julian Seward
cc8ccbbfb4 This commit merges in changes from branches/ASPACEM (specifically,
changes from r4341 through r4787 inclusive).  That branch is now dead.
Please do not commit anything else to it.

For the most part the merge was not troublesome.  The main areas of
uncertainty are:

- build system: I had to import by hand Makefile.core-AM_CPPFLAGS.am
  and include it in a couple of places.  Building etc seems to still
  work, but I haven't tried building the documentation.

- syscall wrappers: Following analysis by Greg & Nick, a whole lot of
  stuff was moved from -generic to -linux after the branch was created.
  I think that is satisfactorily glued back together now.

- Regtests: although this appears to work, no .out files appear, which
  is strange, and makes it hard to diagnose regtest failures.  In
  particular memcheck/tests/x86/scalar.stderr.exp remains in a 
  conflicted state.

- amd64 is broken (slightly), and ppc32 will be unbuildable.  I'll
  attend to the former shortly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4789
2005-09-27 19:20:21 +00:00
Nicholas Nethercote
737ff99047 wibbles
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4788
2005-09-27 18:52:39 +00:00
Nicholas Nethercote
5d3e60b591 add note
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4784
2005-09-26 14:50:39 +00:00
Nicholas Nethercote
407df87c69 record an email
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4781
2005-09-26 01:55:14 +00:00
Nicholas Nethercote
cb422674f0 update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4780
2005-09-26 01:49:39 +00:00