Julian Seward [Wed, 8 Aug 2012 22:22:26 +0000 (22:22 +0000)]
Make the assembler-knows-POWER-DFP test a bit stricter, since it appears
some older assemblers know 'dadd' but not 'dcffix', which also appears
in the DFP tests.
Julian Seward [Wed, 8 Aug 2012 20:38:03 +0000 (20:38 +0000)]
Move older news into its own file, NEWS.old, so as not to overrun TeX
default memory limits when building the PDF docs. Fixes #304754.
(Mark Wielaard, mjw@redhat.com)
Add a testcase for floating point <-> signed conversion that
actually checks the condition code of the conversion instruction
(most programs dont do that)
README_DEVELOPERS: Debugging a tool needs "--tool=..."
Otherwise the function redirections / client requests seem
to get confused. Symptoms are error messages such as
--3031-- VG_USERREQ__CLIENT_CALL1: func=0x0
Petar Jovanovic [Sun, 5 Aug 2012 02:22:52 +0000 (02:22 +0000)]
Fixing incorrect case in putSyscallArgsIntoGuestState for __NR_syscall.
Previously unused arg8 is now used to hold NR_syscall value when that call is
executed. This is important, so putSyscallArgsIntoGuestState can correctly
fill up the guest state. This is MIPS-only change.
Julian Seward [Sat, 4 Aug 2012 19:23:54 +0000 (19:23 +0000)]
Try to fix up ARM stack alignment stuff following r12811. This
fixes two problems: first, r11 (aka fp) can't be used in assembly
for whatever reason. Secondly, the "bic sp,sp,#7" is not allowed
in Thumb mode, so work around that too.
Remove 284540 from NEWS fixed section.
284540 was not about performance but about the presentation
of results.
Revision 12824 (optimising the suppr matching) should not have
marked 284540 as fixed.
fix 284540 (optimise suppression matching)
Before this patch, matching an error stack trace with many suppression
patterns was implying to repeating the translation of the IPs of the
stack trace to the function name or object name for each suppr pattern.
This patch introduces a "lazy input completer" in the generic match
so that an IP is (in the worst case) translated once to its function
name and once to its object name.
It is a "lazy" completer in the sense that only the needed IP to fun or obj
name are done.
On a artificial test case, has given a factor 3 in performance.
On another big (real) application, gave a factor 2 to 3.
(there was less matching to do, but probably more debug info to search).
match-overrun.supp completed to have non matching suppr first to
better exercise the lazy completer.
Florian Krohm [Fri, 3 Aug 2012 20:28:21 +0000 (20:28 +0000)]
Fix testcase. Iterating over an array of invalid insns to test them all
does not work, as conversion will stop at the first invalid character.
So... need to loop over them.
Julian Seward [Thu, 2 Aug 2012 22:08:53 +0000 (22:08 +0000)]
Back off from 32 alignment of various guest state bits. We don't
actually need it, and gcc on MacOS simply fails (for whatever reason)
to actually honour requests for 32 alignment, and fall back to the
previous setting (16 alignment).
Julian Seward [Thu, 2 Aug 2012 10:40:31 +0000 (10:40 +0000)]
Back out r12466, which stopped non-MAP_FIXED mmaps by the client on
Darwin from returning address zero (however insane that is). r12466
appears to cause other applications to break (TextEdit, for one).
Tom Hughes [Thu, 2 Aug 2012 09:23:45 +0000 (09:23 +0000)]
Ensure CALL_FN_xx macros align the stack properly
The CALL_FN_xx macros in valgrind.h perform function calls by
signalling to valgrind using the client request system. Because
they are making function calls which are invisible to the compiler
they need to make sure that any stack alignment constraints
imposed by the ABI are enforced when making the call.
This commit enforces 16 byte alignment for x86, amd64, ppc32 and
ppc64 platforms, and 8 byte alignment for arm platforms.
It does not touch s390x where the ABI requires 8 byte alignment to
be maintained at all times, not just when making a function call.
It also does not touch mips32 as I'm not currently aware what if
any alignment constraints exist there.
Fixes BZ#304054 and observed alignment faults on amd64 when running
the regtests using a valgrind compiled with gcc 4.7 releases.
Avoid asserting when a segment is mapped both rw and rx.
If a segment is mapped with permission rwx, then map->rx
and map->rw will be true.
But due to the if (map->rx) {
...
} else if (map->rw) {
...
the (map->rw) part will not be executed.
If this mapping is the one which "gives" the nonempty rw map,
then this mapping will not be seen, and the following
vg_assert(has_nonempty_rw);
will fail.
This assert can be reproduced by doing
setarch i686 -X
./vg-in-place --tool=none none/tests/map_unmap
Note: the setarch i686 -X above has as effect to make all read
mapping also executable. So, a rw mapping becomes rwx and then
triggers the above asserts.
The setarch i686 -X also introduces a discrepancy between
the kernel mappings (rwx) and the valgrind aspacemgr view
(which believes it is a rw mapping).
This discrepancy causes a crash if giving --sanity-level=3.
A possible fix is to have valgrind calling the personality system call
and detecting if the READ_IMPLIES_EXEC bit (the -X arg to setarch)
was set, and then modify aspacemgr so that all read mapped segments
are automatically mapped x also.
This commit is the minimal fix allowing to run executables
launched with this READ_IMPLIES_EXEC.
* Option --vex-iropt-precise-memory-exns has been removed.
It is replaced by --vex-iropt-register-updates which accepts
3 values : 'unwindregs-at-mem-access' (replacing
--vex-iropt-precise-memory-exns=no), 'allregs-at-mem-access'
(replacing --vex-iropt-precise-memory-exns=yes)
and a new value 'allregs-at-each-insn'.
'allregs-at-each-insn' allows the Valgrind gdbserver to always
show up to date values to GDB.
* For tools replacing the malloc library (e.g. Memcheck, Helgrind, ...),
the option --redzone-size=<number> allows to control the padding
blocks (redzones) added before and after each client allocated block.
Smaller redzones decrease the memory needed by Valgrind. Bigger
redzones increase the chance to detect blocks overrun or underrun.
Petar Jovanovic [Fri, 27 Jul 2012 22:35:35 +0000 (22:35 +0000)]
MIPS specific expected output for memcheck/tests/sigkill.
MIPS has different signal values, so it has to have its own expected output for
the tests that deal with signal values.
This fixes (false) failure in memcheck/tests/sigkill.
Petar Jovanovic [Fri, 27 Jul 2012 16:25:32 +0000 (16:25 +0000)]
MIPS specific exp-out for none/tests/async-sigs.
MIPS has different signal values, so it has to have its own expected output for
the tests that deal with signal values.
This fixes (false) failure in none/tests/async-sigs.