Julian Seward [Wed, 11 May 2011 15:31:24 +0000 (15:31 +0000)]
When reading Dwarf3 variable type and location information, print a
line showing the number of variables read for each object. Currently
disabled -- is a sanity-check mechanism for exp-sgcheck.
Julian Seward [Tue, 10 May 2011 11:01:07 +0000 (11:01 +0000)]
Improvements for testing and compilation breakage for the GDB server
on various platforms:
* In all gdbserver_tests using gdb:
Made a more general way to remove the initial start message.
* tests using threads burning cpu modified to have only 1 thread.
This makes them independent of the scheduler fairness.
* filter_gdb and filter_vgdb enhanced to anonymise
some debian 6.0/ppc specific things
some s390x/gdb 7.0, gdb 7.1 specific things
* vgdb.c: added an #include <linux/ptrace.h> to fix compilation
on s390x fedora and suse. (Christian Boerntrager)
* fixed a bug in valgrind-low.c debug log :
when a register size is 0, its image cannot be output (and register
should not be transferred).
* added a parameter --keep-unfiltered to vg_regtest.in
This will make it easier to update filter_gdb:
in case gdbserver_tests are failing due to "artificial"
differences to be filtered, re-run the tests using:
perl tests/vg_regtest --keep-unfiltered gdbserver_tests
Then a tar file with all the *.out in gdbserver_tests
will allow me to better/faster update the filter_gdb.
* made a better detection of a working PTRACE_GETREGS at compile time
and/or at run-time.
This is the patch on bug 214909 comment 69.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)
Julian Seward [Mon, 9 May 2011 22:51:14 +0000 (22:51 +0000)]
Back out r11705, which was an attempt to make reading of line number
info created by LLVM 2.9 work properly. As per long discussion in
#272189, this isn't actually possible -- LLVM 2.9 creates bogus line
number info, and the bogusness can't be worked around at the Valgrind
end.
Julian Seward [Mon, 9 May 2011 09:15:28 +0000 (09:15 +0000)]
ppc{32,64}-linux: mark VG_MINIMAL_LONGJMP as noreturn, since it is,
and not doing so leads to compiler warnings for functions that tail
call this one, which themselves are marked "attribute noreturn".
Julian Seward [Wed, 4 May 2011 09:07:38 +0000 (09:07 +0000)]
setup_client_stack: use have_exename to consistently guard uses
of VG_(args_the_exename), thereby avoiding a potential segfault.
Spotted by IBM's BEAM checker.
Julian Seward [Wed, 4 May 2011 09:06:17 +0000 (09:06 +0000)]
calling format_message: when passing frameNo == -1, also pass
tid == VG_INVALID_THREADID rather than an uninitialised ThreadId.
Also in format_message, improve precondition assertions for
frameNo and tid.
There's no error in the current code since if frameNo == -1 then
tid is unused, but it caused IBM's BEAM checker to complain.
Julian Seward [Wed, 4 May 2011 09:01:58 +0000 (09:01 +0000)]
VG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
assertions instead of segfaults. Potential segfaults were detected by
IBM's BEAM checker.
Change the TT_FAST hash function for from "insn_address >> 2" to
"insn_address >> 1". The former is appropriate for ARM code, where
all insns are 4-sized and 4-aligned, but not for Thumb code, where the
minimum size and alignment is 2. The old scheme happened to work for
Thumb (indeed, any hash function would), but caused huge amounts of
conflict misses in the fast cache for some programs.
The change has been observed to reduce conflict misses by up to 100
times, and in some cases, improves performance significantly for Thumb
code. Performance of ARM code is unchanged or possibly a bit worse.
Change the default (minimum) client malloc alignment from 8 to 16
on ppc32-linux. This is needed to make Altivec-using code work
correctly. Noticed when running ./auxprogs/gsl16test with gcc-4.6
with args -mcpu=970 -g -O3 -ftree-vectorize on Memcheck, in
which case a few of the tests failed because malloc() returns
8 byte aligned memory when it should return 16-aligned memory.
Add alternative expected output cases for more recent glibcs (eg,
2.12), which print a minus sign for NaNs. Fixes #262989.
(Maynard Johnson, maynardj@us.ibm.com)
Add support for IBM Power ISA 2.06 -- stage 1. Valgrind-side changes
and test cases. Bug #267630 and followup fix #270794.
(Maynard Johnson, maynardj@us.ibm.com)
s390x: rewrite some testcases. To make my testing and debugging life
simpler, I've rewritten those testcases from none/tests/s390x that
require binutils to recognize opcodes defined in the
extended-immediate and general-instruction-extension facilities. As a
side effect this change removes the special casing in
none/tests/s390x/Makefile.am and the configury bits to support it.
Fixes #270115. (Florian Krohm, britzel@acm.org)
Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4. Related to #259977.
(modified version of patch from Maynard Johnson <maynardj@us.ibm.com>)
Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis. Does not change any
functionality. Related to #259977.
On OSX, post-process the tool executables to adjust the Mach-O headers
in certain circumstances. This works around a bug in the linker that
ships in Xcode 4.0.0 and 4.0.1 causing the 64-bit tool executables to
segfault at startup. Fixes #267997.
Tom Hughes [Mon, 28 Mar 2011 13:51:41 +0000 (13:51 +0000)]
Use two separate assembler argument bindings for loading or storing
a value in an xmm register as trying to do it with offsets from a
single argument apparently causes problems in newer gcc versions.
Bart Van Assche [Thu, 24 Mar 2011 20:27:54 +0000 (20:27 +0000)]
Test separately whether g++ and/or gcc support built-in functions for atomic
memory access. Apparently for some distributions gcc 4.2 has that support but
g++ 4.2 doesn't. This patch has been supplied by Florian Krohm.
Julian Seward [Thu, 17 Mar 2011 19:39:55 +0000 (19:39 +0000)]
When handling client munmaps and mprotects with r=0 & w=0, actually
paint the relevant address range as NoAccess rather than ignoring the
event. This is important for avoiding VTS leaks in libhb_core.
More details in comments in the code.
Also rename the _noaccess_ painters that do nothing to make it clearer
that they do nothing :-)