Commit Graph

3769 Commits

Author SHA1 Message Date
Tom Hughes
193e4670fc When looking for a heap segment to extend look for the heap limit
address rather than the base address as the heap may have been split
into more than one segment by using mprotect on it...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4882
2005-10-06 14:49:21 +00:00
Tom Hughes
ea78a16074 Document memalign fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4881
2005-10-06 12:06:03 +00:00
Tom Hughes
c0893e8f7d Stop memalign crashing if it fails to allocate the memory. Bug 112538.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4879
2005-10-06 12:04:26 +00:00
Tom Hughes
7f18f0910d The amd64 BOUND bug turned out to be bogus.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4878
2005-10-06 09:15:20 +00:00
Tom Hughes
3290f4ffc1 Document realloc fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4877
2005-10-06 09:07:14 +00:00
Tom Hughes
daf507dee2 Fix realloc wrappers to handle the out of memory case properly - if
the call to VG_(cli_malloc) returns NULL then don't try and copy the
data or register a new block and just leave the old block in place
instead, but still return NULL to the caller.

Fixes bug 109487 and it's duplicates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4875
2005-10-06 09:00:17 +00:00
Nicholas Nethercote
85545d1a1c Changed some overflow-prone counters from UInt to ULong.
Changed some printf specifiers accordingly, plus some more that were
incorrect.

Also put commas in various output numbers, eg. the leak check stats.  
This makes them much easier to read when they get big.  One
exception is in XML number-only fields such as <leakedbytes>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4874
2005-10-06 03:32:42 +00:00
Julian Seward
287d92271f The m_syswrap subsystem is Valgrind's model of how the kernel behaves
with respect to syscalls.  It is detailed and comprehensive but does
not offer a way to deal with minor deviations in behaviour from the
vanilla kernel sources, either due to running a hacked kernel or
running a vanilla kernel with a custom kernel module loaded.

This commit adds a flexible way to handle such cases without polluting
the vanilla handler syswrap-*.c files or their supporting vki_*.h
header files.  For each OS, a syswrap-OS-variants.c file is added,
containing wrappers for variants of OS.  A new command line flag
--kernel-variants= carries a comma separated list of variant names
that apply to the current run.  There are no other changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4873
2005-10-06 03:19:49 +00:00
Julian Seward
47130dd9f9 Adjustments to the sync-checker:
* show the filename, if any, when printing out disagreeing mappings

* if the kernel offers us a mapping to a file with the name 
  "/dev/zero (deleted)", don't do a /dev/ino comparison.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4872
2005-10-06 03:04:22 +00:00
Julian Seward
8a0d5a0b46 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4871
2005-10-06 02:31:49 +00:00
Julian Seward
1cbbde41ae Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4870
2005-10-05 18:05:01 +00:00
Julian Seward
05c7773957 Test for jrcxz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4869
2005-10-05 17:12:23 +00:00
Julian Seward
baceec15d9 Update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4868
2005-10-05 11:03:19 +00:00
Julian Seward
a2ed402a26 Even more regtests
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4867
2005-10-05 11:02:00 +00:00
Tom Hughes
7593ed5f2e Fix for 112031 is actually in two parts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4866
2005-10-05 08:28:59 +00:00
Tom Hughes
6cdbf0b2f4 Update README_MISSING_SYSCALL_OR_IOCTL to reflect reality - patch
from Reimar Döffinger via bug 112031.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4864
2005-10-05 08:27:08 +00:00
Tom Hughes
b807fac324 Document fix for 112031.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4863
2005-10-05 08:24:20 +00:00
Julian Seward
4ce62c9445 If the launcher can't figure out what it's own name is, don't bail
out.  Instead, print a warning message, continue, and cause any
attempt to trace into a child process to fail with ECHILD.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4861
2005-10-04 23:07:33 +00:00
Julian Seward
4a47f441f2 Rewrite ML_(fd_allowed):
* include explaination from Tom
* make logic easier to follow, and add comments
* remove veto on the -d file descriptor (detailed comments in code)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4860
2005-10-04 22:27:22 +00:00
Julian Seward
a817329967 Add regtests for SSE2 pmaddwd.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4859
2005-10-04 20:00:20 +00:00
Julian Seward
77663f8a84 Update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4858
2005-10-04 19:33:44 +00:00
Tom Hughes
4bfd9edeba Document fix for 113642.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4857
2005-10-04 16:55:22 +00:00
Tom Hughes
1b42aba084 Make sure we have all the DWARF2 sections before trying to decode
any DWARF2 debug information. All make sure we don't fall over if
the .debug_info is less than four bytes long. Fixed bug 113642.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4856
2005-10-04 16:54:54 +00:00
Tom Hughes
7b1575bb77 Document bug 113796.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4855
2005-10-04 16:45:28 +00:00
Tom Hughes
65bd3eb367 Create a new SkShmC segment type for shared memory segments so that we
can ensure they are never merged with adjacent segments. This makes
sure that we can find the right piece of memory to release when the
shmdt system call occurs.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4854
2005-10-04 15:59:54 +00:00
Tom Hughes
a31e921b7e Check permissions when sanity checking the segment list against
the kernel's memory map.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4853
2005-10-04 13:02:31 +00:00
Tom Hughes
760dbdc42a Get the SHM_RDONLY test the right way round. Fixes bug #113796.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4852
2005-10-04 12:04:06 +00:00
Julian Seward
742e6107a1 Reenable SSE2 psadbw test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4851
2005-10-04 11:44:11 +00:00
Julian Seward
3c01a734d6 Update
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4850
2005-10-03 11:40:44 +00:00
Tom Hughes
2b5092f64c Allow scripts less that a page in length to be executed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4849
2005-10-03 09:06:36 +00:00
Julian Seward
80e0b1c3a5 Test misc sbb/adc insns.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4848
2005-10-03 02:23:17 +00:00
Julian Seward
0d69e98e8a Test simulation of x86 'fxtract'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4847
2005-10-03 01:22:29 +00:00
Nicholas Nethercote
72dd8496df compile fix for an Ubuntu box I just tried
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4846
2005-10-02 17:50:31 +00:00
Julian Seward
45b7830107 Unbreak compilation. Duh.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4845
2005-10-02 17:33:07 +00:00
Julian Seward
b7cd9cb3de Plumb 64-bit file offsets throughout the address space manager.
Untested.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4844
2005-10-02 17:01:41 +00:00
Nicholas Nethercote
4ef4aabbd0 Make the dispatch files platform-specific, not just arch-specific,
as requested by Greg Parker.  (The ppc32/Darwin dispatch loop is
different to the ppc32/Linux one, for example.)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4843
2005-10-02 14:48:09 +00:00
Julian Seward
ed4a883393 Update the depressingly long list of bugs.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4842
2005-10-02 13:10:41 +00:00
Julian Seward
f0f1b729c9 ppc32-linux only: redirect strcmp right from the start.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4841
2005-10-01 19:12:08 +00:00
Tom Hughes
9bddb4c141 Document mmap insanity in a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4840
2005-09-30 16:09:12 +00:00
Tom Hughes
49ad5e75e7 Update ignore lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4839
2005-09-30 13:43:52 +00:00
Julian Seward
7672845acb ML_(generic_PRE_sys_mmap): reject non-page-aligned offsets.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4838
2005-09-30 10:48:27 +00:00
Julian Seward
773c32d9c6 When a sector is full, debug-print TC/TT loading for it, so as to give
better info on sizing decisions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4837
2005-09-30 10:34:06 +00:00
Julian Seward
3564f53893 Placate gcc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4836
2005-09-30 10:32:39 +00:00
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