Julian Seward [Mon, 24 Oct 2011 13:21:57 +0000 (13:21 +0000)]
Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h,
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR
into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value
of the former would be unused. (Bart Van Assche, bart.vanassche@gmail.com)
Julian Seward [Mon, 24 Oct 2011 08:53:03 +0000 (08:53 +0000)]
Don't break fcntl locks when program does mmap. #280965.
(Rusty Russell, rusty@rustcorp.com.au)
tdb uses fcntl locks and mmap, and some of the tests fail under valgrind.
strace showed valgrind opening the tdb file, reading 1024 bytes, then closing
it. This is not allowed: POSIX says if you open and close a file, all fcntl
locks on it are dropped (insane, yes).
Finally got around to hacking the source to track this down: di_notify_mmap is
doing the damage. The simplest fix was to hand in an optional fd for it to
use, then have it do pread.
I had to fix your pread; surely this should seek back even if the platform
doesn't have pread support?
Julian Seward [Mon, 24 Oct 2011 07:36:57 +0000 (07:36 +0000)]
gdbsrv: factorize gdb version handling, fix doc and typos
* fix various typos in doc
* following commit in gdb
http://sourceware.org/ml/gdb-patches/2011-07/msg00742.html
means unlimited length for valgrind watchpoints is understood by the
(future) gdb 7.4 => doc updated
* factorize gdb version detection and reporting in
gdbserver_tests/make_local_links
* replace zignal by signal in a string used in umsg.
* updated gdbserver_tests/README_DEVELOPPERS (ref to --port vgdb option)
No functional change, tested on f12/x86, debian5/amd64, s390/RHEL4
Julian Seward [Mon, 24 Oct 2011 05:59:54 +0000 (05:59 +0000)]
Change the behaviour of VALGRIND_CHECK_MEM_IS_DEFINED slightly, so
that if the range is partially non-addressable and it contains
undefined data, both errors are reported.
Julian Seward [Sat, 22 Oct 2011 20:38:08 +0000 (20:38 +0000)]
Make vgdb.c work on Android, so that the GDB server as a whole
will work on Android. Fixes #283600.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
This patch provides three improvements in the way the free list is
handled in memcheck.
First improvement: a new command line option --freelist-big-blocks
(default 1000000) specifies the size of "free list big blocks".
Such big blocks will be put on the free list, but will be re-cycled first
(i.e. in preference to block having a smaller size).
This fixes the bug https://bugs.kde.org/show_bug.cgi?id=250065.
Technically, the freed list is divided in two lists : small
and big blocks. Blocks are first released from the big block list.
Second improvement: the blocks of the freed list are re-cycled before
a new block is malloc-ed, not after a block is freed.
This gives better error messages for dangling pointer errors
when doing many frees without doing malloc between the frees.
(this does not uses more memory).
Third improvement: a block bigger than the free list volume will be
put in the free list (till a malloc is done, so as the needed memory
is not bigger than before) but will be put at the beginning of the
free list, rather than at the end. So, allocating then freeing such a
block does not cause any blocks in the free list to be released.
Results of the improvements above, with the new regression test
memcheck/test/big_blocks_freed_list: with the patch, 7 errors
are detected, 6 are giving the (correct) allocation stack.
Without the patch, only 6 errors are detected, 5 errors without
allocation stack, 1 with a (wrong) allocation stack.
Julian Seward [Sat, 22 Oct 2011 19:29:51 +0000 (19:29 +0000)]
Allow garbage collection of the LAOG data structure(s). This avoids
quadratic growth on some apparently simple test cases. Fixes #267925.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
Bart Van Assche [Sat, 22 Oct 2011 14:38:47 +0000 (14:38 +0000)]
Revert r12195 because it triggers suspicious error messages on systems where
libtool has not been installed:
Can't exec "libtoolize": No such file or directory at /usr/bin/autoreconf line 196.
Use of uninitialized value in pattern match (m//) at /usr/bin/autoreconf line 196.
Julian Seward [Sat, 22 Oct 2011 09:29:41 +0000 (09:29 +0000)]
Change and simplify the way that Memcheck instruments saturating
narrowing operations. The previous scheme was simply wrong and could
cause false negatives, by causing some narrowing operations to have a
defined output even when the inputs are undefined. This was what
#279698 reported. This patch is a fix for that bug.
Bart Van Assche [Sat, 22 Oct 2011 09:21:24 +0000 (09:21 +0000)]
Ran configure.in through autoupdate:
- Replaced AC_CONFIG_HEADER() by AC_CONFIG_HEADERS().
- Replaced AC_TRY_LINK() by AC_LINK_IFELSE().
- Replaced AC_TRY_COMPILE() by AC_COMPILE_IFELSE().
- Removed AC_TYPE_SIGNAL because RETSIGTYPE isn't used anywhere.
Bart Van Assche [Sat, 22 Oct 2011 08:24:32 +0000 (08:24 +0000)]
XML output: escape XML-metacharacters in executable path and arguments. This is a modified version of the patch submitted by Evgeniy Stepanov <eugeni.stepanov@gmail.com>. See also #284621.
Julian Seward [Fri, 21 Oct 2011 06:16:27 +0000 (06:16 +0000)]
Cause the build to fail when man pages aren't built properly. At
present that doesn't happen. #272967, which is Debian bug 599563.
(Pierre Habouzit, madcoder@debian.org)
Julian Seward [Fri, 21 Oct 2011 04:59:56 +0000 (04:59 +0000)]
Debug printing only: when printing SB translation header lines,
print the object and SVMA too, so as to make it easy to find the
relevant bit of code by objdump -d of the object, even if the
function name is unknown. Also re-order some of the fields.
Florian Krohm [Fri, 21 Oct 2011 02:32:49 +0000 (02:32 +0000)]
Adapt the faultstatus.c testcase to work properly on systems with larger
page size. E.g. ppc64 running SLES 11 has 64k pages.
Patch by Maynard Johnson (maynardj@us.ibm.com) with small modification
to minimize source code changes. Fixes bugzilla #283709.
Florian Krohm [Thu, 20 Oct 2011 21:15:55 +0000 (21:15 +0000)]
Fix timerfd-syscall testcase on s390x.
This was caused by an interaction of resteering and the infamous
EX insn. This sequence
j someplace
ex ....
with the unconditional jump being subject to restering caused madness.
Such a sequence is found in glibc's syscall.S with the effect that all
system calls > 255 would have run into the same problem as timerfd_*.
Patch by Christian Borntraeger (borntraeger@de.ibm.com).
Florian Krohm [Thu, 20 Oct 2011 01:17:12 +0000 (01:17 +0000)]
Add missing filter scripts to Makefile.am so they are included in
the tarball generated by "make dist".
With this change running regtest from the tarball produces the same
results as a regtest on a checked out repository (on x86 that is).
Julian Seward [Wed, 19 Oct 2011 15:26:36 +0000 (15:26 +0000)]
Add test cases for PMULUDQ and PCMPEQQ. Duh -- in future, add test
cases at the end, since adding in the middle changes the random
data used for all tests that follow, and makes the diff huge.