Petar Jovanovic [Fri, 22 Jun 2012 13:44:04 +0000 (13:44 +0000)]
Initializing destination reg for MoveIns test for MIPS.
The test none/tests/mips32/MoveIns.c did not initialize destination register,
and that is important for movn.s and movn.d instructions. This improves the
test as we will get the same stdout with different compilers and options now.
Julian Seward [Fri, 22 Jun 2012 09:34:58 +0000 (09:34 +0000)]
Update these for Linaro's pre-release build of Ubuntu 12.04, with
Linaro gcc 4.6.3, running on an A9. Not sure why these need to be
updated, but they results are same as native on said platform, so am
not worried.
Petar Jovanovic [Thu, 21 Jun 2012 17:33:35 +0000 (17:33 +0000)]
Correcting sys_shmdt wrapper for MIPS Linux.
This patch fixes incorrect handling of sys_shmdt for MIPS. Linux wrappers have
been added for sys_sigprocmask, sys_timerfd_create, sys_timerfd_gettime, and
sys_timerfd_settime on MIPS.
The bug has been reported at https://bugs.kde.org/show_bug.cgi?id=270777 as
sh_mat issue, and it can be reproduced with shmat-sample.c from
https://bugs.kde.org/show_bug.cgi?id=222545.
The change also fixes sigprocmask from memcheck tests.
Petar Jovanovic [Tue, 19 Jun 2012 18:30:23 +0000 (18:30 +0000)]
Adding MIPS-specific wrapper for syscall pipe.
Syscall pipe returns two descriptors in two registers, and thus a generic
Linux wrapper is not sufficient. This fixes none/tests/fdleak_pipe.
MIPS port is currently tracked as bug #270777.
Bart Van Assche [Sun, 17 Jun 2012 08:46:32 +0000 (08:46 +0000)]
drd: Make sure that frame unwind information is generated for DRD intercepts
such that pthread_cancel() works properly. See also Ulrich Drepper, Cancellation
and C++ Exceptions, 2010 (http://udrepper.livejournal.com/21541.html).
Fix 203877 and 301229 increase to 16Mb maximum allowed alignment for memalign() and posix_memalign
Note that VG_(arena_memalign) is not used by core or tools for the moment.
We have one single maxima for both the V core/tools and the client.
Enhanced memcheck/tests/memalign2.c to test 4 Mb and 16 Mb alignments.
Julian Seward [Fri, 15 Jun 2012 16:20:23 +0000 (16:20 +0000)]
Add a hack (disabled by default) that attempts to unwind the stack on
ARM by simply scanning up and looking for words that look like they
might be return addresses. Last-ditch hack for when the CFI trail
goes cold.
Have the inner Valgrind registering the interim_stack asap.
This is needed to have the outer valgrind able to do stack
traces of the inner Valgrind before the main thread runs.
Without this, the outer crashes (segv) when doing a stack trace.
In mtV.txt, an ugly kludge was described to avoid this crash.
This is the clean solution replacing the kludge.
Fix assert in gdbserver for watchpoints watching the same address
GDB can create watchpoints watching the same address.
This was causing assertion failures.
To handle this, hash table (with key watched address) is replaced
by an xarray of address/lengh/kind.
Fully identical watches are ignored (either not inserted, and
not causing a problem if already deleted).
gdbserver_tests/mcwatchpoint enhanced to test duplicated watchpoints
CDSG needs quad word (16 byte) aligned data structures. Since the stack
on s390 has only 8 byte alignment gcc cant guarantee 16 byte alignment
for local variables. As a global variable gcc can do that.
Julian Seward [Tue, 5 Jun 2012 07:12:15 +0000 (07:12 +0000)]
Add macros I_REPLACE_SONAME_FNNAME_Z{U,Z} for general end-user use.
The I_WRAP_SONAME_FNNAME_Z{U,Z} equivalents have been present for
years. Seems inconsistent for the REPLACE versions to be missing.
Julian Seward [Sun, 3 Jun 2012 22:40:07 +0000 (22:40 +0000)]
m_machine: add new function VG_(machine_get_size_of_largest_guest_register)
cachegrind: use the new function to abort startup if the minumum line
size is smaller than the size of the largest guest register.
Partially derived from a patch by Josef Weidendorfer.
Julian Seward [Sat, 2 Jun 2012 23:48:06 +0000 (23:48 +0000)]
POWER Processor decimal FP support, part 5. (Valgrind side). Bug #299694.
(Carl Love, carll@us.ibm.com and Maynard Johnson, maynardj@us.ibm.com)
This patch adds support for Power Decimal Floating Point (DFP) . This
is the fifth patch set in the series of five to add the DFP
instruction support to Valgrind. Adds support for the ddedpd,
ddedpdq, denbcd, denbcdq, dtstsf, and dtstsfq instructions.
Florian Krohm [Thu, 31 May 2012 15:48:13 +0000 (15:48 +0000)]
Reduce size of an IRStmt from 40 bytes to 32 bytes on LP64
by allocating the details of a PutI statement into a struct
of its own and link to that (as is being done for Dirty and CAS).
Fix MacOS passsigalrm.c compilation error due to SIGRTMIN not existing on MacOS
The test will very probably fail on MacOS (as gdb output will contain SIGUSR1
rather than signal SIGRTMIN, but at least it should compile).
(not tested on MacOS; just tested that it still works on linux)
fix the warning introduced by fixing SETTLS clone flag PRE_READ logic
on amd64, vki_modify_ldt_t was defined as void (not very clear why).
sizeof (void) cannot be taken (or more precisely can be taken,
but nobody knows what that means and what gcc does).
So, uncommended the (supposedly) correct definition of the type.
Note that I checked the definition on debian 6.0, kernel 2.6.32
and the structure is still ok.
Still needed to look at the other platforms not properly
handling the *SETTID and the SETTLS flags in clone PRE_READ
logic and/or not defining the type vki_modify_ldt_t
Julian Seward [Sun, 27 May 2012 13:52:54 +0000 (13:52 +0000)]
Add more test cases for VCMPSS, and reenable disabled tests for VCMPSD
and VEXTRACTF128, now that the implementation has been fixed. Current
status that all so-far implemented AVX instructions are tested by this
file, and none have any detectable failures.
Fix false positive in sys_clone on amd64 when optional args are not given (e.g. child_tidptr)
rev 10493 fixed bug 117564 in syswrap-x86-linux.c.
This commit fixes the same problem in syswrap-amd64-linux.c.
The problem makes memcheck/tests/linux/stack_switch fails (at least on gcc20)
with unexpected
==802== Syscall param clone(child_tidptr) contains uninitialised byte(s)
The problem originates from always checking 3 optional args PRE_read,
while these should be checked only if the corresponding flags are set.
syswrap-{arm,ppc32,ppc64}-linux.c seems to have the same problem
(but no visible effect) : VKI_CLONE_PARENT_SETTID,VKI_CLONE_CHILD_SETTID
and VKI_CLONE_SETTLS not properly handled in the PRE part.
syswrap-s390x-linux.c seems to have the VKI_CLONE_SETTLS part wrong,
but VKI_CLONE_PARENT_SETTID and VKI_CLONE_CHILD_SETTID correct.
Commiting a fix just for amd64 for now.
We probably better make some common code in syswrap-generic.c
to regroup all similar platforms.
gdbserver: introduce support to show the AVX registers.
This implies to change the interface between the
arch independent gdbserver files and the arch dependent files
as AVX implies a choice of xml files at run time.
In valgrind-low-amd64.c, the xml files and the nr of registers
are different depending on AVX support or not.
Other platforms still have a fully static nr of registers.
Prepare for AVX support : restructure gdbsrv/target/valgrind-low/arch low
AVX support implies to have target xml files which are selected
according to the machine hwcaps.
This change improves the structure of the gdbserver software layering
to prepare for this.
Basically, the protocol files (e.g. server.c) are now calling directly
the valgrind target operations which are now defined in target.h/target.c
(before, there was a level of indirection inheritated from the GDB
structure which was useless for valgrind gdbserver).
+ clarified some comments
Florian Krohm [Mon, 21 May 2012 16:18:23 +0000 (16:18 +0000)]
Add -fomit-frame-pointer for s390. The GCC maintainer was telling me that
this has been the preferred way to compile for quite a while. So let's follow
suit. The perf bucket did not reveal any measurable difference.