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
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
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
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
* 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
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
* 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
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
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
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
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