]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agos390: First round of changes to support the PFPO insn.
Florian Krohm [Sat, 11 May 2013 15:02:58 +0000 (15:02 +0000)] 
s390: First round of changes to support the PFPO insn.
Support these IROps:
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128,

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113

git-svn-id: svn://svn.valgrind.org/vex/trunk@2719

13 years agocomplainIfUndefined: reinstate the 3rd argument (guard) so as to make
Julian Seward [Sat, 11 May 2013 13:42:08 +0000 (13:42 +0000)] 
complainIfUndefined: reinstate the 3rd argument (guard) so as to make
the definedness check and possible shadow temp set-to-defined be
optional.  Use this to properly instrument IRLoadG and IRStoreG, so
that if the load/store does not happen, not only is the validity of
the address not checked, neither is the definedness.

This fixes a regression introduced by the COMEM branch on ARM, in
which conditional loads/stores with addresses which are undefined at
runtime and with guards which are false, would generate false errors.

Also extensively re-checked the check-generation machinery and updated
a bunch of comments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13386

13 years agomips: add allexec tests for mips64
Petar Jovanovic [Fri, 10 May 2013 13:14:54 +0000 (13:14 +0000)] 
mips: add allexec tests for mips64

Initial patch for none/tests/mips64/.
allexec tests added.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13385

13 years agofix 319235 --db-attach=yes is broken with Yama ptrace scoping enabled
Philippe Waroquiers [Thu, 9 May 2013 21:29:23 +0000 (21:29 +0000)] 
fix 319235 --db-attach=yes is broken with Yama ptrace scoping enabled
On Ubuntu systems, ptrace_scoping could forbid a process to ptrace another.
This ptrace scoping was already handled for vgdb by using SET_PTRACER
(the valgrind process must be ptraced by vgdb when it is blocked
in a syscall).
set_ptracer is however also needed when the old mechanism --db-attach=yes
is used.
The following changes are done:
* make the set_ptracer logic callable outside gdbserver
* make set_ptracer less restrictive (i.e. allow all
  processes of the user to ptrace). This removes a limitation for vgdb.
* call the set_ptracer in the child launched for --db-attach=yes
* cleaned up the ptrace scope restriction message and doc as vgdb
  is now working properly by default, even with ptrace_scope enabled.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13384

13 years agoGet rid of gcc warning on non-MIPS platforms.
Julian Seward [Wed, 8 May 2013 08:56:45 +0000 (08:56 +0000)] 
Get rid of gcc warning on non-MIPS platforms.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2718

13 years agoAdd syscall suport for system calls sys_mbind, sys_set_mempolicy and
Carl Love [Tue, 7 May 2013 15:47:35 +0000 (15:47 +0000)] 
Add syscall suport for system calls sys_mbind, sys_set_mempolicy and
sys_get_mempolicy.

This patch add support for the PPC64 sytem calls:
        259 - sys_mbind
260 - sys_get_mempolicy
261 - sys_set_mempolicy

This patch also adds the Add syscall 259, sys_mbind, support for the PPC32
platform.

The patch fixes bugzilla 318932.

Signed-off-by: Carl Love <cel@us.ibm.com>
---

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13383

13 years agovalgrind side support for
Florian Krohm [Sun, 5 May 2013 15:05:42 +0000 (15:05 +0000)] 
valgrind side support for
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128

Companion patch of VEX r2717.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13382

13 years agoAdd the following IROPs which are needed for s390 DFP support:
Florian Krohm [Sun, 5 May 2013 15:04:30 +0000 (15:04 +0000)] 
Add the following IROPs which are needed for s390 DFP support:
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128,

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113

git-svn-id: svn://svn.valgrind.org/vex/trunk@2717

13 years agofix gdbsrv inferior calls when PT_GNU_STACK declares stack not executable
Philippe Waroquiers [Thu, 2 May 2013 22:06:31 +0000 (22:06 +0000)] 
fix gdbsrv inferior calls when PT_GNU_STACK declares stack not executable
With rev 13368, Valgrind obeys PT_GNU_STACK making the stack not
executable. This makes inferior function call with GDB >= 7.5 failing,
as GDB places a breakpoint on the stack, which must be decoded
and translated by Valgrind to have the inferior function call properly done.
=> introduce a special case in the conditions to allow translation
when a segment is not executable but is readable and there is a
breakpoint at the address.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13381

13 years agomips: fix some style issues, non-functional change
Petar Jovanovic [Sat, 27 Apr 2013 02:18:11 +0000 (02:18 +0000)] 
mips: fix some style issues, non-functional change

Minor cleanup, no real functional change.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2716

13 years agomips: extending the existing test for INS and EXT instructions
Petar Jovanovic [Sat, 27 Apr 2013 01:34:05 +0000 (01:34 +0000)] 
mips: extending the existing test for INS and EXT instructions

Follow up to r2715 in VEX in which we fix INS instruction for lsb = 0.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13380

13 years agomips: fix corner case for INS instruction
Petar Jovanovic [Sat, 27 Apr 2013 01:15:48 +0000 (01:15 +0000)] 
mips: fix corner case for INS instruction

This change fixes corner case for INS instruction when lsb = 0.
The test in none/tests/mips32/MIPS32int.c will be extended to include
additional test cases that trigger this condition.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2715

13 years agomips: fixup blksys_restart address for mips64
Petar Jovanovic [Fri, 26 Apr 2013 19:01:04 +0000 (19:01 +0000)] 
mips: fixup blksys_restart address for mips64

Restart logic has changed in kernel, this is counterpart in Valgrind.

This change fixes:

none/tests/syscall-restart1
none/tests/syscall-restart2

for mips64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13379

13 years agoSTRD (both ARM and Thumb): for push-like cases -- specifically, STRD
Julian Seward [Fri, 26 Apr 2013 10:24:31 +0000 (10:24 +0000)] 
STRD (both ARM and Thumb): for push-like cases -- specifically, STRD
rD1,rD2, [sp, #-8], generate IR for the SP writeback before the
stores.  This loses restartability of the instruction but avoids
Memcheck complaining that we're writing below the stack pointer.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2714

13 years agoIncrease size of the CIEs array to 5000.
Julian Seward [Fri, 26 Apr 2013 08:59:40 +0000 (08:59 +0000)] 
Increase size of the CIEs array to 5000.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13378

13 years agoWhitespace changes only -- no functional change.
Julian Seward [Tue, 23 Apr 2013 12:15:37 +0000 (12:15 +0000)] 
Whitespace changes only -- no functional change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13377

13 years agoImplement SMMLA{r}, both ARM and Thumb. n-i-bz.
Julian Seward [Tue, 23 Apr 2013 08:56:43 +0000 (08:56 +0000)] 
Implement SMMLA{r}, both ARM and Thumb.  n-i-bz.
(Ben Cheng <bccheng@google.com>)

Also, move ARM encoding of SMMUL{R} to a more sensible place.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2713

13 years agoAdd test cases for SMMLA{R}.
Julian Seward [Tue, 23 Apr 2013 08:52:35 +0000 (08:52 +0000)] 
Add test cases for SMMLA{R}.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13376

13 years agoAndroid's elf.h doesn't have PT_GNU_STACK (sigh) and so r13368 broke
Julian Seward [Mon, 22 Apr 2013 09:57:01 +0000 (09:57 +0000)] 
Android's elf.h doesn't have PT_GNU_STACK (sigh) and so r13368 broke
the build.  This conditionalises that fragment on the present of
PT_GNU_STACK.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13375

13 years agoGenerate better code for Shl64(x, imm8) since the Neon front end
Julian Seward [Sun, 21 Apr 2013 00:45:18 +0000 (00:45 +0000)] 
Generate better code for Shl64(x, imm8) since the Neon front end
produces a lot of those for V{LD,ST}{1,2,3,4}.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2712

13 years agoMinor changes to how V{LD}{1,2,3,4} are tested:
Julian Seward [Sat, 20 Apr 2013 23:43:49 +0000 (23:43 +0000)] 
Minor changes to how V{LD}{1,2,3,4} are tested:
* print the output 64-bit results in most-to-least-significant
  lane format
* change the memory values used in these tests to ones which
  are reliably able to detect confusion of 8-bit lanes.  The
  previous values couldn't to that reliable.  This change causes
  the diff to be huge because the stdout.exp changes a lot.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13374

13 years agoVLD4/VST4: generate in-line interleave/de-interleave code, so that
Julian Seward [Sat, 20 Apr 2013 23:27:36 +0000 (23:27 +0000)] 
VLD4/VST4: generate in-line interleave/de-interleave code, so that
loads can always be done in 8 byte units.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2711

13 years agoVLD3/VST3: generate in-line interleave/de-interleave code, so that
Julian Seward [Sat, 20 Apr 2013 21:19:44 +0000 (21:19 +0000)] 
VLD3/VST3: generate in-line interleave/de-interleave code, so that
loads can always be done in 8 byte units.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2710

13 years agoCalculate offsets in read_dwarf2_lineblock based on is64
Petar Jovanovic [Fri, 19 Apr 2013 15:23:44 +0000 (15:23 +0000)] 
Calculate offsets in read_dwarf2_lineblock based on is64

Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:

https://bugs.kde.org/show_bug.cgi?id=313267#c20

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13373

13 years agomips: fix endian issues for LWL, LWR, LDR and LDL for mips64
Petar Jovanovic [Fri, 19 Apr 2013 12:35:00 +0000 (12:35 +0000)] 
mips: fix endian issues for LWL, LWR, LDR and LDL for mips64

This change:
- fixes endian issues for unaligned loads for MIPS64,
- (re)moves endian dependencies in guest-to-IR for Iop_ReinterpI32asF32
   and Iop_ReinterpI64asF64 to host-mips-isel,
- adds minor style changes in the area touched by the code.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2709

13 years agoNon-functional changes: flush stdout frequently, so as to make
Julian Seward [Thu, 18 Apr 2013 11:52:19 +0000 (11:52 +0000)] 
Non-functional changes: flush stdout frequently, so as to make
it easier to sync with stderr output.  Also, add some more helpful
data for testing Neon loads/stores.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13372

13 years agoImproved front end translations for Neon V{LD,ST}{1,2} instructions,
Julian Seward [Thu, 18 Apr 2013 11:50:58 +0000 (11:50 +0000)] 
Improved front end translations for Neon V{LD,ST}{1,2} instructions,
that do deinterleaving/interleaving via IROps and so generate far
fewer memory references.  As a side effect, fix incorrect ARM back end
implementation of many of the SIMD lane interleaving/deinterleaving
and concatenation IROps.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2708

13 years agoFix -Ttext-segment configure check.
Mark Wielaard [Wed, 17 Apr 2013 19:11:05 +0000 (19:11 +0000)] 
Fix -Ttext-segment configure check.

Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13371

13 years agostrchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.
Mark Wielaard [Wed, 17 Apr 2013 15:23:22 +0000 (15:23 +0000)] 
strchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.

Add memcheck/tests/filter_strchr to make it so for the testcase.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13370

13 years agoSimplify read_unitinfo_dwarf2. Only try to read the first DIE.
Mark Wielaard [Wed, 17 Apr 2013 13:48:29 +0000 (13:48 +0000)] 
Simplify read_unitinfo_dwarf2. Only try to read the first DIE.

Bug #305513. We should only read the first DIE of a compilation unit.
Each compilation unit header is followed by a single DW_TAG_compile_unit
(or DW_TAG_partial_unit, but those aren't important here) and its children.
There is no reason to read any of the children at this point. If the first
DIE isn't a DW_TAG_compile_unit we are done, none of the child DIEs will
provide any useful information.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13369

13 years agoRemove some unused ifdeffery that allowed disabling QC flag updating
Julian Seward [Wed, 17 Apr 2013 11:21:58 +0000 (11:21 +0000)] 
Remove some unused ifdeffery that allowed disabling QC flag updating
for Neon.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2707

13 years agoPay attention to PT_GNU_STACK when deciding what permissions to
Tom Hughes [Wed, 17 Apr 2013 10:08:04 +0000 (10:08 +0000)] 
Pay attention to PT_GNU_STACK when deciding what permissions to
use for the client stack.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13368

13 years agoread_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.
Mark Wielaard [Thu, 11 Apr 2013 17:55:39 +0000 (17:55 +0000)] 
read_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.

Bug #305513 contained a patch for some extra robustness checks. But
the real cause of crashing in the read_unitinfo_dwarf2 DWARF reader
seemed to have been this issue where DWARF version 2 DWZ partial_units
were read and DW_FORM_ref_addr had an unexpected size. This combination
is rare. DWARF version 4 is the current default version of GCC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13367

13 years agoUpdate.
Julian Seward [Thu, 11 Apr 2013 16:17:45 +0000 (16:17 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13366

13 years agoAdd test cases for SDIV and UDIV. Pertains to #314178.
Julian Seward [Thu, 11 Apr 2013 13:58:48 +0000 (13:58 +0000)] 
Add test cases for SDIV and UDIV.  Pertains to #314178.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13365

13 years agoImplement ARM SDIV and UDIV instructions. Fixes #314178. Partially
Julian Seward [Thu, 11 Apr 2013 13:57:43 +0000 (13:57 +0000)] 
Implement ARM SDIV and UDIV instructions.  Fixes #314178.  Partially
based on a patch by Ben Cheng, bccheng@android.com.  Also renames two
misnamed PPC helpers.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2706

13 years agoAdd test cases for (T1) LDRT reg+#imm8. See #315689.
Julian Seward [Thu, 11 Apr 2013 10:58:18 +0000 (10:58 +0000)] 
Add test cases for (T1) LDRT reg+#imm8.  See #315689.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13364

13 years agoImplement (T1) LDRT reg+#imm8. Fixes #315689.
Julian Seward [Thu, 11 Apr 2013 10:56:42 +0000 (10:56 +0000)] 
Implement (T1) LDRT reg+#imm8.  Fixes #315689.
(Vasily, w.golubev@mail.ru)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2705

13 years agoFix double 'the the' in documentation.
Mark Wielaard [Fri, 5 Apr 2013 13:19:12 +0000 (13:19 +0000)] 
Fix double 'the the' in documentation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13363

13 years agotemporarily disable memalign part of the undef_malloc_args.c test
Philippe Waroquiers [Fri, 5 Apr 2013 12:53:16 +0000 (12:53 +0000)] 
temporarily disable memalign part of the undef_malloc_args.c test
as this is breaking Darwin.

A better fix should follow

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13362

13 years agoSolve false negative for various malloc replaced functions arguments
Philippe Waroquiers [Thu, 4 Apr 2013 21:10:22 +0000 (21:10 +0000)] 
Solve false negative for various malloc replaced functions arguments

The replacement functions are running on the simulated CPU.
The code on the simulated CPU does not necessarily use
all arguments. E.g. args can be ignored and/or only given
to a NON SIMD call.
The definedness of such 'unused' arguments will not be verified
by memcheck.
A call to 'trigger_memcheck_error_if_undefined' allows
memcheck to detect such errors for the otherwise unused args.
Apart of allowing memcheck to detect an error, the function
trigger_memcheck_error_if_undefined has no effect and
has a minimal cost for other tools replacing malloc functions.

(suggestion of the 'no operation check' from Julian).

tested on f12/x86, debian6/amd64, f18/ppc64
Note that some Darwin specific code has been modified
in coregrind/m_replace_malloc/vg_replace_malloc.c.
(Some of) this code has not been compiled (no access to a
Darwin system). The code changed is trivial, so there is
some chance it will compile and even maybe work.

Added a new test verifying that various malloc related
functions undefined args are triggering an error in memcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13361

13 years agomips: enable helgrind test tc08_hbl2 for mips64
Petar Jovanovic [Thu, 4 Apr 2013 15:33:27 +0000 (15:33 +0000)] 
mips: enable helgrind test tc08_hbl2 for mips64

Enable the test for mips64.
Minor improvement in macro INC.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13360

13 years agomips: add different value for SOCK_STREAM
Petar Jovanovic [Thu, 4 Apr 2013 10:55:09 +0000 (10:55 +0000)] 
mips: add different value for SOCK_STREAM

MIPS uses different values for socket types.
This is protected by ARCH_HAS_SOCKET_TYPES in Linux kernel and we introduce
it here too. This is important for log-socket feature, and it resolves the
issue reported in https://bugs.kde.org/show_bug.cgi?id=313267#c21.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13359

13 years agomips: enable several system call wrappers on mips64
Petar Jovanovic [Wed, 3 Apr 2013 23:43:11 +0000 (23:43 +0000)] 
mips: enable several system call wrappers on mips64

Enable wrappers on mips64 for the following calls:

- dup3
- accept4
- epoll_create1
- timerfd_settime
- newfstatat

Also, allow additional flock64 values in sys_fcntl for mips64.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13358

13 years agomips: add mips64le support for atomic_incs and annotate_hbefore tests
Petar Jovanovic [Wed, 3 Apr 2013 22:51:23 +0000 (22:51 +0000)] 
mips: add mips64le support for atomic_incs and annotate_hbefore tests

Add mips64-le implementation of:

- atomic_add_8bit
- atomic_add_16bit
- atomic_add_32bit
- atomic_add_64bit
- do_acasW

Minor fixes for mips32 implementations are included as well.

These functions are needed to execute atomic_incs and annotate_hbefore
tests on mips64le.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13357

13 years agoUpdate bug status.
Julian Seward [Tue, 2 Apr 2013 08:24:48 +0000 (08:24 +0000)] 
Update bug status.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13356

13 years agomemcheck, Darwin 10: Add a suppression pattern
Bart Van Assche [Mon, 1 Apr 2013 08:23:32 +0000 (08:23 +0000)] 
memcheck, Darwin 10: Add a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13355

13 years agoannounce an old bug (wishlist) which rev 13223 fixed
Philippe Waroquiers [Sun, 31 Mar 2013 16:20:02 +0000 (16:20 +0000)] 
announce an old bug (wishlist) which rev 13223 fixed

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13354

13 years agodrd, Darwin: Generalize a suppression pattern
Bart Van Assche [Sun, 31 Mar 2013 07:40:53 +0000 (07:40 +0000)] 
drd, Darwin: Generalize a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13353

13 years agodrd, Darwin: Add a suppression pattern
Bart Van Assche [Sat, 30 Mar 2013 09:38:11 +0000 (09:38 +0000)] 
drd, Darwin: Add a suppression pattern

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13352

13 years agoDon't assume that page size is 4K when loading PIEs. Fixes #263034.
Julian Seward [Fri, 29 Mar 2013 09:57:24 +0000 (09:57 +0000)] 
Don't assume that page size is 4K when loading PIEs.  Fixes #263034.
(Dodji Seketeli, dodji@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13351

13 years agoEnable prctl on ppc64-linux. Fixes #308089.
Julian Seward [Fri, 29 Mar 2013 09:40:48 +0000 (09:40 +0000)] 
Enable prctl on ppc64-linux.  Fixes #308089.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13350

13 years agoFor memcheck overlap filter_memcpy str[n]cpy and __GI_str[n]cpy are equal.
Mark Wielaard [Thu, 28 Mar 2013 22:52:14 +0000 (22:52 +0000)] 
For memcheck overlap filter_memcpy str[n]cpy and __GI_str[n]cpy are equal.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13349

13 years agomemcheck/tests/strchr test should not depend on line numbers.
Mark Wielaard [Thu, 28 Mar 2013 22:52:13 +0000 (22:52 +0000)] 
memcheck/tests/strchr test should not depend on line numbers.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13348

13 years agoAdd new MISC vector Iops to memcheck/tests/vbit-test/irops.c.
Mark Wielaard [Thu, 28 Mar 2013 21:24:57 +0000 (21:24 +0000)] 
Add new MISC vector Iops to memcheck/tests/vbit-test/irops.c.

memcheck/tests/vbit-test fails with unknown opcode after introduction
of new Iops for AVX2, BMI, FMA support #317506

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13347

13 years agoCope with old linkers which don't support -Ttext-segment but which do
Tom Hughes [Thu, 28 Mar 2013 15:53:21 +0000 (15:53 +0000)] 
Cope with old linkers which don't support -Ttext-segment but which do
generate build-id sections. #317091.  (Mark Wielaard, mjw@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13346

13 years agoBe more aggressive about dropping the lock in spinloops.
Julian Seward [Thu, 28 Mar 2013 10:40:53 +0000 (10:40 +0000)] 
Be more aggressive about dropping the lock in spinloops.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13345

13 years agoUpdate test results for EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Thu, 28 Mar 2013 09:35:39 +0000 (09:35 +0000)] 
Update test results for EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13344

13 years agoFix some rebasing fallout pertaining to today's AVX2 landing.
Julian Seward [Wed, 27 Mar 2013 22:15:36 +0000 (22:15 +0000)] 
Fix some rebasing fallout pertaining to today's AVX2 landing.
Fixes #317463.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2704

13 years agoFix BMI assembler configure check and avx2/bmi/fma vgtest prereqs.
Julian Seward [Wed, 27 Mar 2013 21:59:21 +0000 (21:59 +0000)] 
Fix BMI assembler configure check and avx2/bmi/fma vgtest prereqs.
#317461.  (Mark Wielaard, mjw@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13343

13 years agoTest support for the EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Wed, 27 Mar 2013 15:39:18 +0000 (15:39 +0000)] 
Test support for the EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13342

13 years agoAdd support for the EQ_UQ SSE FP comparison operation. BZ#317444.
Tom Hughes [Wed, 27 Mar 2013 15:38:47 +0000 (15:38 +0000)] 
Add support for the EQ_UQ SSE FP comparison operation. BZ#317444.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2703

13 years agoBuild system and hwcaps fixes pertaining to #305728, which added
Julian Seward [Wed, 27 Mar 2013 11:43:20 +0000 (11:43 +0000)] 
Build system and hwcaps fixes pertaining to #305728, which added
support for AVX2, BMI1, BMI2 and FMA instructions.
(Jakub Jelinek, jakub@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13340

13 years agoTestcase additions pertaining to #305728, which added support for
Julian Seward [Wed, 27 Mar 2013 11:42:05 +0000 (11:42 +0000)] 
Testcase additions pertaining to #305728, which added support for
AVX2, BMI1, BMI2 and FMA instructions.
(Jakub Jelinek, jakub@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13339

13 years agoMemcheck fixes for new IR ops introduced by r2702 (which added support
Julian Seward [Wed, 27 Mar 2013 11:40:02 +0000 (11:40 +0000)] 
Memcheck fixes for new IR ops introduced by r2702 (which added support
for AVX2, BMI1, BMI2 and FMA instructions).  Part of #305728.
(Jakub Jelinek, jakub@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13338

13 years agoAMD64: Add support for AVX2, BMI1, BMI2 and FMA instructions (VEX side).
Julian Seward [Wed, 27 Mar 2013 11:37:33 +0000 (11:37 +0000)] 
AMD64: Add support for AVX2, BMI1, BMI2 and FMA instructions (VEX side).
Fixes #305728.  (Jakub Jelinek, jakub@redhat.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2702

13 years agoAdd hwcaps checking on amd64 for RDTSCP. Part of the fix for #251569
Julian Seward [Tue, 26 Mar 2013 13:57:48 +0000 (13:57 +0000)] 
Add hwcaps checking on amd64 for RDTSCP.  Part of the fix for #251569
and its dups.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13337

13 years agoImplement RDTSCP on amd64, finally. This fixes #251569 and dups
Julian Seward [Tue, 26 Mar 2013 13:53:18 +0000 (13:53 +0000)] 
Implement RDTSCP on amd64, finally.  This fixes #251569 and dups
311933, 313348 and 313354.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2701

13 years agoAdd test cases for SSE4 MOVNTDQA insn. Pertains to #316503.
Julian Seward [Tue, 26 Mar 2013 10:29:05 +0000 (10:29 +0000)] 
Add test cases for SSE4 MOVNTDQA insn.  Pertains to #316503.
(Patrick J. LoPresti, lopresti@gmail.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13336

13 years agoImplement SSE4 MOVNTDQA insn. Fixes #316503.
Julian Seward [Tue, 26 Mar 2013 10:27:39 +0000 (10:27 +0000)] 
Implement SSE4 MOVNTDQA insn.  Fixes #316503.
(Patrick J. LoPresti, lopresti@gmail.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2700

13 years agoUpdate bug status.
Julian Seward [Tue, 26 Mar 2013 10:12:02 +0000 (10:12 +0000)] 
Update bug status.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13335

13 years agofix 307082 HG false positive: pthread_cond_destroy: destruction of unknown cond var
Philippe Waroquiers [Sun, 24 Mar 2013 20:10:23 +0000 (20:10 +0000)] 
fix 307082 HG false positive: pthread_cond_destroy: destruction of unknown cond var

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13332

13 years agoFix an assertion failure on CVT.F64.S32 d16, d16, #1. Fixes #317186 (I think).
Julian Seward [Fri, 22 Mar 2013 13:28:50 +0000 (13:28 +0000)] 
Fix an assertion failure on CVT.F64.S32 d16, d16, #1.  Fixes #317186 (I think).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2698

13 years agoUse -Wl,-Ttext-segment when static linking if possible to keep build-ids.
Julian Seward [Fri, 22 Mar 2013 11:49:46 +0000 (11:49 +0000)] 
Use -Wl,-Ttext-segment when static linking if possible to keep build-ids.
Fixes #317091.  (Mark Wielaard, mjw@redhat.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13331

13 years agoVEX, ppc code cleanup
Carl Love [Wed, 20 Mar 2013 15:51:34 +0000 (15:51 +0000)] 
VEX, ppc code cleanup

This patch removes some dead code left behind when the code was restructured
to fix the implementation changes to make it compliant with the iop
definitions.

The patch makes no functional changes as it is just removing code that is not
reachable.

This patch is for Bugzilla 314269.

Signed-off-by: Carl Love <cel@us.ibm.com>
git-svn-id: svn://svn.valgrind.org/vex/trunk@2697

13 years agoUndo void change done as part of rev 13329
Philippe Waroquiers [Mon, 18 Mar 2013 22:51:57 +0000 (22:51 +0000)] 
Undo void change done as part of rev 13329

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13330

13 years agoBetter fix for 295590
Philippe Waroquiers [Mon, 18 Mar 2013 22:48:22 +0000 (22:48 +0000)] 
Better fix for 295590
(problem reported in bug 307082, comment 8).
Solution applied is similar to what is in 307082 patch
(i.e. do not destroy the internal helgrind var if nWaiters > 0).
But also do not remove it from the FM.

+ add a test case (re-using the drd test case)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13329

13 years agoUpdate.
Julian Seward [Mon, 18 Mar 2013 16:05:43 +0000 (16:05 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13328

13 years agoDocument that user level client stack switches might cause crashes
Philippe Waroquiers [Wed, 13 Mar 2013 22:03:31 +0000 (22:03 +0000)] 
Document that user level client stack switches might cause crashes
and that these crahses might be avoided using VALGRIND_STACK_REGISTER
See bug 316613

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13327

13 years agoFix 316535 Use of |signed int| instead of (unsigned) |size_t| in messages...
Philippe Waroquiers [Wed, 13 Mar 2013 21:44:07 +0000 (21:44 +0000)] 
Fix 316535 Use of |signed int| instead of (unsigned) |size_t| in messages...
* when SEGV trapped, report the main thread size as an unsigned size_t
* Similar for memcheck overlap errors
  For example, for the 2 calls:
     memcpy(&a, &a, 2147483648UL);
     memcpy(&a, &a, -1);  // silently accepted by gcc 4.4.4 -Wall
                          // while the 3rd arg is supposed to be a size_t
  we now obtain (on a 32 bit system)
    Source and destination overlap in memcpy(0xbe97113f, 0xbe97113f, 2147483648)
    Source and destination overlap in memcpy(0xbef6d13f, 0xbef6d13f, 4294967295)
  instead of
    Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -2147483648)
    Source and destination overlap in memcpy(0xbe8e012f, 0xbe8e012f, -1)

Do not ask me why
   memcpy(&a, &a, -1);
is supposed to be accepted/acceptable/valid code.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13326

13 years agos390: Add testcase for the SRNMT instruction.
Florian Krohm [Tue, 12 Mar 2013 01:32:40 +0000 (01:32 +0000)] 
s390: Add testcase for the SRNMT instruction.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13325

13 years agos390: Support the SRNMT instruction.
Florian Krohm [Tue, 12 Mar 2013 01:31:24 +0000 (01:31 +0000)] 
s390: Support the SRNMT instruction.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2696

13 years agoFix 316145 - callgrind command line options in manpage reference (unknown) callgrind...
Philippe Waroquiers [Sun, 10 Mar 2013 16:29:02 +0000 (16:29 +0000)] 
Fix 316145 - callgrind command line options in manpage reference (unknown) callgrind manual
Patch by Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13324

13 years agofix 315959 valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
Philippe Waroquiers [Sun, 10 Mar 2013 16:20:10 +0000 (16:20 +0000)] 
fix 315959 valgrind man page has bogus SGCHECK (and no BBV) OPTIONS section
PAtch from Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13323

13 years agodrd/tests/annotate_smart_pointer2: Add an expected output file
Bart Van Assche [Sun, 10 Mar 2013 13:39:57 +0000 (13:39 +0000)] 
drd/tests/annotate_smart_pointer2: Add an expected output file

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13322

13 years agodrd/tests/sem_wait: Skip on Darwin since sem_init() fails with ENOSYS on Darwin
Bart Van Assche [Sun, 10 Mar 2013 13:38:41 +0000 (13:38 +0000)] 
drd/tests/sem_wait: Skip on Darwin since sem_init() fails with ENOSYS on Darwin

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13321

13 years agoDarwin: Make stack growth tracking consistent with other architectures
Bart Van Assche [Sun, 10 Mar 2013 12:51:15 +0000 (12:51 +0000)] 
Darwin: Make stack growth tracking consistent with other architectures

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13320

13 years agoDarwin: Fix a compiler warning
Bart Van Assche [Sun, 10 Mar 2013 12:49:08 +0000 (12:49 +0000)] 
Darwin: Fix a compiler warning

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13319

13 years agomassif/tests/pages_as_heap.c: Fix a compiler warning
Bart Van Assche [Sun, 10 Mar 2013 12:37:48 +0000 (12:37 +0000)] 
massif/tests/pages_as_heap.c: Fix a compiler warning

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13318

13 years agos390: Distribute dfp-1 expected output files also if built on a non-s390 platform
Bart Van Assche [Sun, 10 Mar 2013 11:30:22 +0000 (11:30 +0000)] 
s390: Distribute dfp-1 expected output files also if built on a non-s390 platform

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13317

13 years agodrd: Fix stack growth tracking. Hopefully this is the proper fix for #297147.
Bart Van Assche [Sun, 10 Mar 2013 11:02:32 +0000 (11:02 +0000)] 
drd: Fix stack growth tracking. Hopefully this is the proper fix for #297147.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13316

13 years agodrd: Fix a 4x slowdown for certain applications (#316181)
Bart Van Assche [Sun, 10 Mar 2013 10:43:11 +0000 (10:43 +0000)] 
drd: Fix a 4x slowdown for certain applications (#316181)

This commit reverts r12629 ("drd: Don't sporadically report false positives on
newly allocated memory. Fixes #297147").

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13315

13 years agoFix 316144 (valgrind.1 manpage contains ??? strings for references)
Philippe Waroquiers [Wed, 6 Mar 2013 22:39:18 +0000 (22:39 +0000)] 
Fix 316144 (valgrind.1 manpage contains ??? strings for references)
Patch by Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13314

13 years agoAdd test cases for VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.
Julian Seward [Wed, 6 Mar 2013 08:35:12 +0000 (08:35 +0000)] 
Add test cases for VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.
Pertains to #315738.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13313

13 years agoImplement VCVT.{S,U}32.F64 D[d], D[d], #frac_bits. Fixes #315738.
Julian Seward [Wed, 6 Mar 2013 08:34:04 +0000 (08:34 +0000)] 
Implement VCVT.{S,U}32.F64 D[d], D[d], #frac_bits.  Fixes #315738.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2695

13 years agoAdd test cases for VCVT.F64.{SU}32, #imm, including a bunch of dodging and
Julian Seward [Tue, 5 Mar 2013 14:27:44 +0000 (14:27 +0000)] 
Add test cases for VCVT.F64.{SU}32, #imm, including a bunch of dodging and
weaving to work around buggy assemblers.  Pertains to #308717.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13312

13 years agoImplement VCVT.F64.{SU}32, #imm. Fixes #308717.
Julian Seward [Tue, 5 Mar 2013 14:26:22 +0000 (14:26 +0000)] 
Implement VCVT.F64.{SU}32, #imm.  Fixes #308717.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2694

13 years agoHandle "vmov qDest.I32 V128{0xFFFF}" so to speak, and make the case
Julian Seward [Tue, 5 Mar 2013 10:35:44 +0000 (10:35 +0000)] 
Handle "vmov qDest.I32 V128{0xFFFF}" so to speak, and make the case
for a zero immediate more similar.  Verify assembled output against
GNU as.  Fixes #311318.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2693

13 years agoAdd test cases for SMLAL{BB,BT,TB,TT}. Related to #308718.
Julian Seward [Mon, 4 Mar 2013 18:35:17 +0000 (18:35 +0000)] 
Add test cases for SMLAL{BB,BT,TB,TT}.  Related to #308718.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13311

13 years agoImplement SMLAL{BB,BT,TB,TT}. Fixes #308718. (Mans Rullgard,
Julian Seward [Mon, 4 Mar 2013 18:33:56 +0000 (18:33 +0000)] 
Implement SMLAL{BB,BT,TB,TT}.  Fixes #308718.  (Mans Rullgard,
mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2692