]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agoTeach vprintf_wrk about '*' as format width, in which case the width
Florian Krohm [Sun, 16 Dec 2012 22:44:32 +0000 (22:44 +0000)] 
Teach vprintf_wrk about '*' as format width, in which case the width
is given in an argument.

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

13 years agoMostly complete code for instrumentation of origin tracking for
Julian Seward [Sun, 16 Dec 2012 13:21:17 +0000 (13:21 +0000)] 
Mostly complete code for instrumentation of origin tracking for
guarded loads and stores.  Still lacks proper setting of defaults in
the helper calls.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13183

13 years agoMake sure the stack pointer is properly aligned when invoking a
Tom Hughes [Sun, 16 Dec 2012 09:52:38 +0000 (09:52 +0000)] 
Make sure the stack pointer is properly aligned when invoking a
signal on amd64-linux systems.

The amd64 ABI describes the required alignment on function entry
as follows:

  "In other words, the value (%rsp − 8) is always a multiple
   of 16 when control is transferred to the function entry point.

So we need to 16 byte align and then subtract an extra 8 bytes
to achieve the correct alignment.

Patch from fjgmacc@gmail.com to fix BZ#280114.

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

13 years agoAdd a detailed comment re the situation with checking definedness of
Julian Seward [Fri, 14 Dec 2012 12:51:08 +0000 (12:51 +0000)] 
Add a detailed comment re the situation with checking definedness of
addresses in guarded loads, stores and dirty helpers that access
memory.  Fall back to a simpler situation as documented in the
comment, possibly on a temporary basis.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13181

13 years agoMake memcheck/tests/stpncpy be dependent on the presence/absence of
Julian Seward [Fri, 14 Dec 2012 10:30:57 +0000 (10:30 +0000)] 
Make memcheck/tests/stpncpy be dependent on the presence/absence of
stpncpy in libc, as determined by a configure test.  n-i-bz.
(Mark Wielaard, mjw@redhat.com)

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

13 years agoValgrind-side changes for new primop Iop_GetMSBs8x16, introduced in
Julian Seward [Thu, 13 Dec 2012 18:31:49 +0000 (18:31 +0000)] 
Valgrind-side changes for new primop Iop_GetMSBs8x16, introduced in
vex r2590.

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

13 years agoImplement 128-bit PMOVMSKB using a single new primop (Iop_GetMSBs8x16)
Julian Seward [Thu, 13 Dec 2012 18:29:56 +0000 (18:29 +0000)] 
Implement 128-bit PMOVMSKB using a single new primop (Iop_GetMSBs8x16)
rather than chopping it up into two 64-bit pieces in the front end.

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

13 years agoUpdate somewhat.
Julian Seward [Thu, 13 Dec 2012 15:26:53 +0000 (15:26 +0000)] 
Update somewhat.

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

13 years agoOn ARM: Don't be spooked by Puts to the translation-invalidation spec
Julian Seward [Thu, 13 Dec 2012 15:17:40 +0000 (15:17 +0000)] 
On ARM: Don't be spooked by Puts to the translation-invalidation spec
when doing origin tracking, even though they are completely irrelevant.

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

13 years agoChange a bunch more Thumb load/store events to use IR guarded loads/stores.
Julian Seward [Wed, 12 Dec 2012 18:30:12 +0000 (18:30 +0000)] 
Change a bunch more Thumb load/store events to use IR guarded loads/stores.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2589

13 years agoAdd test cases for the UMAAL instruction.
Julian Seward [Wed, 12 Dec 2012 00:17:33 +0000 (00:17 +0000)] 
Add test cases for the UMAAL instruction.

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

13 years agoSupport the UMAAL instruction. (n-i-bz). Based on a patch from
Julian Seward [Wed, 12 Dec 2012 00:16:41 +0000 (00:16 +0000)] 
Support the UMAAL instruction.  (n-i-bz).  Based on a patch from
Torbjorn Granlund, tg@gmplib.org.

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

13 years agoFix cut'n paste error spotted by Mark Wielaard.
Florian Krohm [Tue, 11 Dec 2012 13:21:27 +0000 (13:21 +0000)] 
Fix cut'n paste error spotted by Mark Wielaard.

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

13 years agoGeneralise S390_INSN_GZERO which only worked on the guest
Florian Krohm [Tue, 11 Dec 2012 04:09:43 +0000 (04:09 +0000)] 
Generalise S390_INSN_GZERO which only worked on the guest
state to S390_INSN_MZERO which works for any memory location
addressable with base reg + 12-bit displacement.

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

13 years agoEliminate some lameness when writing out hwcaps.
Florian Krohm [Sun, 9 Dec 2012 17:53:45 +0000 (17:53 +0000)] 
Eliminate some lameness when writing out hwcaps.

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

13 years agoClean up the code for facility detection.
Florian Krohm [Sun, 9 Dec 2012 17:30:45 +0000 (17:30 +0000)] 
Clean up the code for facility detection.
First, use STFLE whenever possible (i.e. for all facilities that
were introduced at the same time STFLE was or later). Turns out,
that is most facilities we're interesting in probing, except long
displacement.
Secondly, remove magic constants denoting facility bits and use
the definition from libvex_s390x_common.h
Thirdly, build up the debugging message that shows the status of
the probed facilities in a generic way so it won't have to be
changed when facilities are added.

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

13 years agoMove definition of facility bits to libvex_s390x_common.h so we
Florian Krohm [Sun, 9 Dec 2012 17:26:32 +0000 (17:26 +0000)] 
Move definition of facility bits to libvex_s390x_common.h so we
can use them in m_machine.c. Rename LSCOND facility to LSC.

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

13 years agoStop sending z10-ec nightly build messages to valgrind-developers
Florian Krohm [Sun, 9 Dec 2012 15:39:43 +0000 (15:39 +0000)] 
Stop sending z10-ec nightly build messages to valgrind-developers
for two reasons:
(1) Those build logs appear to never have made it
(2) Sourceforge recently started spamming my inbox with
    SMTP; 550 This message scored 19.5 points. Congratulations!

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

13 years agoUpdate list of ignored files.
Florian Krohm [Sun, 9 Dec 2012 02:13:46 +0000 (02:13 +0000)] 
Update list of ignored files.

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

13 years agoUse VEX types.
Florian Krohm [Sun, 9 Dec 2012 02:06:29 +0000 (02:06 +0000)] 
Use VEX types.

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

13 years agoMake sys-openat test conditional upon the existence of AT_FDCWD.
Florian Krohm [Sat, 8 Dec 2012 19:26:03 +0000 (19:26 +0000)] 
Make sys-openat test conditional upon the existence of AT_FDCWD.

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

13 years agoFix 284540 and 307465
Philippe Waroquiers [Sat, 8 Dec 2012 17:54:16 +0000 (17:54 +0000)] 
Fix 284540 and 307465
284540 Memcheck shouldn't count suppressions matching still-reachable allocations
307465 --show-possibly-lost=no should bring down the error count / exit code

Using the options --show-leak-kinds=kind1,kind2,.. and
--errors-for-leak-kinds=kind1,kind2,.., each leak kind (definite, indirect,
possible, reachable) can now be individually reported and/or counted as
an error.
In a leak suppression entry, an optional line 'match-leak-kinds:'
controls which leak kinds are suppressed by this entry.
This is a.o. useful to avoid definite leaks being "catched"
by a suppression entry aimed at suppressing possibly lost blocks.
Default behaviour is the same as 3.8.1

Old args (--show-reachable and --show-possibly-lost) are still accepted.

Addition of a new test (memcheck/tests/lks) testing the new args
and the new suppression line.

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

13 years agoAdd documentation for --extra-debuginfo-path=. Relates to #310972.
Julian Seward [Fri, 7 Dec 2012 08:40:16 +0000 (08:40 +0000)] 
Add documentation for --extra-debuginfo-path=.  Relates to #310972.
(Alex Chiang, achiang@canonical.com)

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

13 years agoComplete the decoder. All published opcodes are now handled.
Florian Krohm [Fri, 7 Dec 2012 04:42:53 +0000 (04:42 +0000)] 
Complete the decoder. All published opcodes are now handled.

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

13 years agoIdentify opcodes that are not handled by the decoder in
Florian Krohm [Fri, 7 Dec 2012 04:37:53 +0000 (04:37 +0000)] 
Identify opcodes that are not handled by the decoder in
guest_s390_toIR.c
Identify a few more duplicate mnemonics to avoid false messages
from the checker.

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

13 years agoFix some gcc complaints about unused variables in these tests.
Julian Seward [Thu, 6 Dec 2012 23:11:19 +0000 (23:11 +0000)] 
Fix some gcc complaints about unused variables in these tests.

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

13 years agoThe Signedness Police visit a couple of outlying systems in the Delta
Julian Seward [Thu, 6 Dec 2012 22:41:47 +0000 (22:41 +0000)] 
The Signedness Police visit a couple of outlying systems in the Delta
Quadrant.

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

13 years agoFix a const issue in r13154.
Julian Seward [Thu, 6 Dec 2012 18:23:20 +0000 (18:23 +0000)] 
Fix a const issue in r13154.

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

13 years agoMake diagnostics for SIGILL more controllable (Valgrind part).
Julian Seward [Thu, 6 Dec 2012 18:08:54 +0000 (18:08 +0000)] 
Make diagnostics for SIGILL more controllable (Valgrind part).
Fixes #309425.  (Mark Wielaard, mjw@redhat.com)

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

13 years agoMake diagnostics for SIGILL more controllable (VEX part).
Julian Seward [Thu, 6 Dec 2012 18:08:04 +0000 (18:08 +0000)] 
Make diagnostics for SIGILL more controllable (VEX part).
Fixes #309425.  (Mark Wielaard, mjw@redhat.com)

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

13 years agoAdd an intercept for stpncpy. Fixes #309427.
Julian Seward [Thu, 6 Dec 2012 17:54:33 +0000 (17:54 +0000)] 
Add an intercept for stpncpy.  Fixes #309427.
(Mark Wielaard, mjw@redhat.com)

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

13 years agoRe-enable XADD Gb,Eb. Fixes #307106. (Jakub Jelinek, jakub@redhat.com)
Julian Seward [Thu, 6 Dec 2012 17:29:10 +0000 (17:29 +0000)] 
Re-enable XADD Gb,Eb.  Fixes #307106.  (Jakub Jelinek, jakub@redhat.com)

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

13 years agoAdd intercepts for wcscpy, wcscmp, wcsrchr and wcschr on Linux.
Julian Seward [Thu, 6 Dec 2012 17:16:00 +0000 (17:16 +0000)] 
Add intercepts for wcscpy, wcscmp, wcsrchr and wcschr on Linux.
Fixes #307828.  (Mark Wielaard, mjw@redhat.com)

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

13 years agoUse correct %rcx bit in the AVX feature check. Fixes #307285.
Julian Seward [Thu, 6 Dec 2012 16:38:50 +0000 (16:38 +0000)] 
Use correct %rcx bit in the AVX feature check.  Fixes #307285.
(Mark Wielaard, mjw@redhat.com)

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

13 years agoWhen looking for a separate debug object, tolerate mismatched phdrs by
Julian Seward [Thu, 6 Dec 2012 16:27:18 +0000 (16:27 +0000)] 
When looking for a separate debug object, tolerate mismatched phdrs by
instead checking the shdrs:

  The separate .debug file has wrong phdrs. This isn't normally fatal
  since .debug files are never directly loaded. But since valgrind
  uses the phdrs to locate the build-id it will fail. The attached
  patch makes it so that the code falls back to using the shdrs to
  locate the NOTE sections so that the buildid can be matched anyway.

Fixes #305431.  (Mark Wielaard, mjw@redhat.com)

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

13 years agoFor sys-openat the dirfd argument should be ignored when the pathname
Julian Seward [Thu, 6 Dec 2012 16:05:18 +0000 (16:05 +0000)] 
For sys-openat the dirfd argument should be ignored when the pathname
is absolute.  Fixes #307103.  (Mark Wielaard, mjw@redhat.com)

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

13 years agoSynch opcode list with <binutils>/opcodes/s390-opc.txt.
Florian Krohm [Thu, 6 Dec 2012 05:04:35 +0000 (05:04 +0000)] 
Synch opcode list with <binutils>/opcodes/s390-opc.txt.
Fix some opcode categories (user space vs privileged operation)

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

13 years agoAccept blank lines in <binutils>/opcodes/s390-opc.txt.
Florian Krohm [Thu, 6 Dec 2012 05:03:08 +0000 (05:03 +0000)] 
Accept blank lines in <binutils>/opcodes/s390-opc.txt.
Bug fix: avoid reading something uninitialised

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

13 years agoFix golden log.
Florian Krohm [Thu, 6 Dec 2012 03:56:14 +0000 (03:56 +0000)] 
Fix golden log.

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

13 years agoUpdate with current bugs.
Julian Seward [Wed, 5 Dec 2012 23:00:02 +0000 (23:00 +0000)] 
Update with current bugs.

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

13 years agoAdd a new command line flag, --extra-debuginfo-path=path, that allows
Julian Seward [Wed, 5 Dec 2012 22:15:14 +0000 (22:15 +0000)] 
Add a new command line flag, --extra-debuginfo-path=path, that allows
specification of an extra directory in which to look for debuginfo
objects.  Fixes #310792.  (Alex Chiang, achiang@canonical.com)

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

13 years agofix 310424 --read-var-info does not properly describe static variables
Philippe Waroquiers [Wed, 5 Dec 2012 21:08:24 +0000 (21:08 +0000)] 
fix 310424  --read-var-info does not properly describe static variables

This patch changes the way static variables are
recorded by readdwarf3.c (when giving --read-var-info=yes),
improving the way such variables are described.

Currently:
A static variable does not have the DW_AT_external tag.
So, readdwarf3.c does not consider it a global variable.
It is rather considered a "local" variable.
When it is recorded, it is associated to a range of program counters
(the functions in the file where it is visible).
However, even if the static variable is only visible
in the source file where it is declared, it can in reality
be used by any range of program counters, typically
by having the address of the local variable passed
to other functions.

Such local variable can then only be described
when the program counter is in the range of program
counters for which it has been recorded.
However, this (local) description is obtained
by a kludge in debuginfo.c (around line 3285).

This kludge then produces a strange description,
telling that the variable has been declared in
frame 0 of a thread (see second example below).

The kludge is not always able to describe
the address (if the IP of the tid is in another file than
where the variable has been declared).

I suspect the kludge can sometimes describe the var as being
declared in an unrelated thread
(e.g. if an error is triggered by tid 5, but tid1 is by
luck in an IP corresponding to the recorded range).

The patch changes the way a static variable is recorded:
if DW_AT_external tag is found, a variable is marked as global.
If a variable is not external, but is seen when level is 1,
then we record the variable as a global variable (i.e.
with a full IP range).
This improves the way such static variable are described:
* they are described even if being accessed by other files.
* their description is not in an artificial "thread frame".

First example:
**************
a variable cannot be described because it is
accessed by a function in another file:

with the trunk:
==20410== ----------------------------------------------------------------
==20410==
==20410== Possible data race during read of size 4 at 0x600F54 by thread #1
==20410== Locks held: none
==20410==    at 0x4007E4: a (abc.c:42)
==20410==    by 0x4006BC: main (mabc.c:24)
==20410==
==20410== This conflicts with a previous write of size 4 by thread #2
==20410== Locks held: none
==20410==    at 0x4007ED: a (abc.c:42)
==20410==    by 0x400651: brussels_fn (mabc.c:9)
==20410==    by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219)
==20410==    by 0x4E348C9: start_thread (pthread_create.c:300)
==20410==
==20410== ----------------------------------------------------------------

with the patch:
==4515== ----------------------------------------------------------------
==4515==
==4515== Possible data race during read of size 4 at 0x600F54 by thread #1
==4515== Locks held: none
==4515==    at 0x4007E4: a (abc.c:42)
==4515==    by 0x4006BC: main (mabc.c:24)
==4515==
==4515== This conflicts with a previous write of size 4 by thread #2
==4515== Locks held: none
==4515==    at 0x4007ED: a (abc.c:42)
==4515==    by 0x400651: brussels_fn (mabc.c:9)
==4515==    by 0x4C2B54E: mythread_wrapper (hg_intercepts.c:219)
==4515==    by 0x4E348C9: start_thread (pthread_create.c:300)
==4515==
==4515== Location 0x600f54 is 0 bytes inside global var "static_global"
==4515== declared at mabc.c:4
==4515==
==4515== ----------------------------------------------------------------

Second example:
***************
When the kludge can describe the variable, it is strangely described
as being declared in a frame of a thread, while for sure the declaration
has nothing to do with a thread
With the trunk:
==20410== Location 0x600f68 is 0 bytes inside local var "static_global_a"
==20410== declared at abc.c:3, in frame #0 of thread 1

With the patch:
==4515== Location 0x600f68 is 0 bytes inside global var "static_global_a"
==4515== declared at abc.c:3

#include <stdio.h>

static int static_global_a = 0; //// <<<< this is abc.c:3

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

13 years agoFix missing in EXTRA_DIST errors reported by check_makefile_consistency
Philippe Waroquiers [Wed, 5 Dec 2012 20:20:25 +0000 (20:20 +0000)] 
Fix missing in EXTRA_DIST errors reported by check_makefile_consistency

memcheck/tests/amd64/Makefile.am:1: error: insn-bsfl.stderr.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-bsfl.stdout.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-bsfl.vgtest is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pcmpistri.stderr.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pcmpistri.stdout.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pcmpistri.vgtest is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pmovmskb.stderr.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pmovmskb.stdout.exp is missing in EXTRA_DIST
memcheck/tests/amd64/Makefile.am:1: error: insn-pmovmskb.vgtest is missing in EXTRA_DIST
none/tests/s390x/Makefile.am:1: error: dfp-1.stderr.exp is missing in EXTRA_DIST
none/tests/s390x/Makefile.am:1: error: dfp-1.stdout.exp is missing in EXTRA_DIST
none/tests/s390x/Makefile.am:1: error: dfp-1.vgtest is missing in EXTRA_DIST

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

13 years agoRecognise insns for zEC12 in the decoder.
Florian Krohm [Wed, 5 Dec 2012 04:23:42 +0000 (04:23 +0000)] 
Recognise insns for zEC12 in the decoder.
There is no IR generation for these insns yet.

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

13 years agoUpdate opcode table: add new insns for zEC12
Florian Krohm [Wed, 5 Dec 2012 04:21:41 +0000 (04:21 +0000)] 
Update opcode table: add new insns for zEC12

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

13 years agoBeef up testcase. Announce fix.
Florian Krohm [Tue, 4 Dec 2012 04:46:52 +0000 (04:46 +0000)] 
Beef up testcase. Announce fix.
Part of fixing BZ 310931.

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

13 years agoIn the past, the implementation of STFLE returned the facilities of the host
Florian Krohm [Tue, 4 Dec 2012 04:45:32 +0000 (04:45 +0000)] 
In the past, the implementation of STFLE returned the facilities of the host
machine. This was not consistent in the following sense: Suppose the host
has a facility F installed and this facility implies the availability of an
insn X. Suppose further, that insn X is not supported in valgrind.
An application progrm that tests the availability of insn X by checking
for its associated facility F will fail under valgrind when using X because
valgrind will SIGILL. Not so good.

This patch changes the STFLE behaviour to adjust the facilities of the
virtual machine according to what the set of insns that is actually
supported. It's an approximation, because for some facilities we only
support a subset of the insns enabled by that facility.

Fixes BZ 310931.

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

13 years agoProbe host for conditional load/store facility.
Florian Krohm [Mon, 3 Dec 2012 13:33:03 +0000 (13:33 +0000)] 
Probe host for conditional load/store facility.
New hwcaps: VEX_HWCAPS_S390X_LSCOND

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

13 years agoUse "load on condition" insns, if availably, to implement
Florian Krohm [Mon, 3 Dec 2012 13:32:05 +0000 (13:32 +0000)] 
Use "load on condition" insns, if availably, to implement
S390_INSN_COND_MOVE.

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

13 years agoCorrectly skip memcheck's getregset for MIPS.
Petar Jovanovic [Mon, 3 Dec 2012 00:31:42 +0000 (00:31 +0000)] 
Correctly skip memcheck's getregset for MIPS.

Previous change r13145 incorrectly disables getregset test for all architectures
rather than just for MIPS arch. Issue spotted by Bart Van Assche and reported on
the list.

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

13 years agoUpdate opcode status. Announce fix for BZ #306035.
Florian Krohm [Sun, 2 Dec 2012 21:34:57 +0000 (21:34 +0000)] 
Update opcode status. Announce fix for BZ #306035.

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

13 years agoRefactor the code based on s390_irgen_LAA.
Florian Krohm [Sun, 2 Dec 2012 21:31:15 +0000 (21:31 +0000)] 
Refactor the code based on s390_irgen_LAA.
New functions: s390_irgen_load_and_add32/64 and
s390_irgen_load_and_bitwise32/64.

Part of fixing BZ #306035.

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

13 years agoAdd testcase for LAA insn.
Florian Krohm [Sun, 2 Dec 2012 20:58:45 +0000 (20:58 +0000)] 
Add testcase for LAA insn.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com).
Part of fixing BZ #306035.

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

13 years agoFix implementation of LAA for atomic update.
Florian Krohm [Sun, 2 Dec 2012 20:58:17 +0000 (20:58 +0000)] 
Fix implementation of LAA for atomic update.
Patch by Divya Vyas (divyvyas@linux.vnet.ibm.com).
Part of fixing BZ #306035.

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

13 years agoSkip memcheck's getregset for MIPS.
Petar Jovanovic [Sun, 2 Dec 2012 03:37:36 +0000 (03:37 +0000)] 
Skip memcheck's getregset for MIPS.

Skip the getregset test for MIPS since we still does not have TRACEHOOK
support in MIPS kernel for it, and that is needed to support PTRACE_GETREGSET.

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

13 years agoFix typo.
Florian Krohm [Sat, 1 Dec 2012 21:29:07 +0000 (21:29 +0000)] 
Fix typo.

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

13 years agoImprove FAQ section discussing statically linked lib
Philippe Waroquiers [Wed, 28 Nov 2012 18:12:57 +0000 (18:12 +0000)] 
Improve FAQ section discussing statically linked lib
Valgrind 3.8.1 can work with statically linked lib or alternative
malloc libs.
Ensure FAQ properly describe this.

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

13 years agoBefore LL, instrument outstanding helper calls.
Josef Weidendorfer [Mon, 26 Nov 2012 18:16:58 +0000 (18:16 +0000)] 
Before LL, instrument outstanding helper calls.

Callgrind, Cachegrind, and Lackey call
helpers for memory accesses in bunches, to reduce
register save/restore overhead (and merge load/store
within same instruction into a "modify" event).

The calls should not be done within a RMW section
enclosed by LL/SC instructions, as this reduces the
chance of SC to succeed, and can result in hangs.
For Callgrind, this definitly helped MIPS, and was
committed in r13136. Do the same for Cachegrind/Lackey.

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

13 years ago* make ARM word and unsigned byte load/stores use LoadG/StoreG
Julian Seward [Mon, 26 Nov 2012 13:47:31 +0000 (13:47 +0000)] 
* make ARM word and unsigned byte load/stores use LoadG/StoreG
* correctness fix for default cases in already-done cases

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2574

13 years agoMake a couple more load/store cases use IRLoadG/IRStoreG. Also add
Julian Seward [Mon, 26 Nov 2012 10:44:19 +0000 (10:44 +0000)] 
Make a couple more load/store cases use IRLoadG/IRStoreG.  Also add
debug printing to find out which load/store cases are most used in
practice.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2573

13 years agoInitial Memcheck support for instrumenting guarded loads and stores.
Julian Seward [Sun, 25 Nov 2012 15:33:42 +0000 (15:33 +0000)] 
Initial Memcheck support for instrumenting guarded loads and stores.
Still to do:

* origin tracking

* reinstate the two NULLed-out 3rd args to complainIfUndefined,
  once the complication pertaining to setting the shadow tmp to
  'defined' is resolved

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13142

13 years agoInitial front changes for ARM, to generate direct IR for at least some
Julian Seward [Sun, 25 Nov 2012 15:26:48 +0000 (15:26 +0000)] 
Initial front changes for ARM, to generate direct IR for at least some
conditional loads and stores.  Very incomplete -- most load-store
cases still use the old scheme.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2572

13 years agoARM back end changes, to support code generation for IR guarded loads
Julian Seward [Sun, 25 Nov 2012 15:17:42 +0000 (15:17 +0000)] 
ARM back end changes, to support code generation for IR guarded loads
and stores.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2571

13 years agoAdd IR level definitions and associated iropt hackery, to support
Julian Seward [Sun, 25 Nov 2012 15:14:44 +0000 (15:14 +0000)] 
Add IR level definitions and associated iropt hackery, to support
direct representation of conditional (guarded) loads and stores in IR.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2570

13 years agoSwizzle external.
Julian Seward [Sun, 25 Nov 2012 12:56:10 +0000 (12:56 +0000)] 
Swizzle external.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13141

13 years agoMove this directory to the right place. Duh.
Julian Seward [Sun, 25 Nov 2012 12:51:04 +0000 (12:51 +0000)] 
Move this directory to the right place.  Duh.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/COMEM@13140

13 years agoMove this directory to the right place. Duh.
Julian Seward [Sun, 25 Nov 2012 12:48:39 +0000 (12:48 +0000)] 
Move this directory to the right place.  Duh.

git-svn-id: svn://svn.valgrind.org/vex/branches/COMEM@2569

13 years agoCreate a copy of trunk r13138 to hold work on adding direct support
Julian Seward [Sun, 25 Nov 2012 12:42:27 +0000 (12:42 +0000)] 
Create a copy of trunk r13138 to hold work on adding direct support
for conditional loads and stores to IR ("COnditional MEMory")

git-svn-id: svn://svn.valgrind.org/valgrind/COMEM@13139

13 years agoCreate a copy of trunk r2567 to hold work on adding direct support
Julian Seward [Sun, 25 Nov 2012 12:35:42 +0000 (12:35 +0000)] 
Create a copy of trunk r2567 to hold work on adding direct support
for conditional loads and stores to IR ("COnditional MEMory")

git-svn-id: svn://svn.valgrind.org/vex/COMEM@2568

13 years agoFormatting only change.
Florian Krohm [Sun, 25 Nov 2012 01:22:27 +0000 (01:22 +0000)] 
Formatting only change.

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

13 years agoMake some function parameters pointer to const.
Florian Krohm [Sat, 24 Nov 2012 21:07:14 +0000 (21:07 +0000)] 
Make some function parameters pointer to const.
Companion patch to valgrind r13138.

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

13 years agoFix some casts that removed const-ness as pointed out by
Florian Krohm [Sat, 24 Nov 2012 19:41:54 +0000 (19:41 +0000)] 
Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.

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

13 years agoChanges to allow compilation with -Wwrite-strings. That compiler option
Florian Krohm [Fri, 23 Nov 2012 16:17:43 +0000 (16:17 +0000)] 
Changes to allow compilation with -Wwrite-strings. That compiler option
is not used for testcases, just for valgrind proper.

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

13 years agoCorrectly model LL/SC on MIPS.
Petar Jovanovic [Fri, 23 Nov 2012 00:44:37 +0000 (00:44 +0000)] 
Correctly model LL/SC on MIPS.

As the issue with RMW on MIPS does not block execution anymore (see Valgrind
patch r13136), we can switch back to model it through LoadL and StoreC instead
of using incorrect Load and Store.

This will give back correct output to memcheck/tests/atomic_incs on MIPS.

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

13 years agoFlush events in Callgrind before enering a RMW region.
Petar Jovanovic [Fri, 23 Nov 2012 00:01:36 +0000 (00:01 +0000)] 
Flush events in Callgrind before enering a RMW region.

On some MIPS platforms, we had an issue in which SC would fail each time
due to some memory access occuring in the RMW region.
If code for simulator events is called before LL, it can help SC to pass.

This change fixes a few LL/SC issues on MIPS arch.

The patch by Josef Weidendorfer.

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

13 years agoUpdate list of ignored files.
Florian Krohm [Thu, 22 Nov 2012 18:57:29 +0000 (18:57 +0000)] 
Update list of ignored files.

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

13 years agoAnother signedness fix.
Julian Seward [Thu, 22 Nov 2012 11:07:04 +0000 (11:07 +0000)] 
Another signedness fix.

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

13 years agoFix up another char-signedness straggler.
Julian Seward [Thu, 22 Nov 2012 10:48:20 +0000 (10:48 +0000)] 
Fix up another char-signedness straggler.

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

13 years agoChanges for -Wwrite-strings
Florian Krohm [Wed, 21 Nov 2012 00:36:55 +0000 (00:36 +0000)] 
Changes for -Wwrite-strings

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

13 years agoVEX, ppc fix use of modified value in the Iop_32HLto64 implementation
Carl Love [Tue, 20 Nov 2012 17:32:48 +0000 (17:32 +0000)] 
VEX, ppc fix use of modified value in the Iop_32HLto64 implementation

The issue with the Iop_32HLto64, as explained by Julian:
One of the "rules of the game" of instruction selection is that the register
returned by any of the isel* functions may not be modified -- if it needs to
be modified, first copy the value off to a different register. The rule exists
because, in this case, e->Iex.Binop.arg2 might be an IRExpr_RdTmp, in which
case iselWordExpr_R simply returns the register which holds the value of the
relevant IR temporary. And so if r_Lo is modified then any subsequent uses of
that IR temporary will get the wrong value. In this case, r_Lo is
modified without first copying it.

This patch fixes the issue by assigning the result of the AND operation to
a temporary and then using the temporary result in the OR operation thus
avoiding using a modified value.

This patch is for bugzilla 309922.

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

13 years agoAdd test cases for definedness propagation through PCMPISTRI $0x3A.
Julian Seward [Tue, 20 Nov 2012 15:25:32 +0000 (15:25 +0000)] 
Add test cases for definedness propagation through PCMPISTRI $0x3A.
#309921, comment 7.  (Patrick J. LoPresti, lopresti@gmail.com)

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

13 years agoAdd a special-case implementation of PCMPISTRI $0x3A, which generates
Julian Seward [Tue, 20 Nov 2012 15:24:24 +0000 (15:24 +0000)] 
Add a special-case implementation of PCMPISTRI $0x3A, which generates
in-line IR instead of calling helpers.  This is so that Memcheck can
do exact definedness propagation through it.  This is important for
dealing with inlined PCMPISTRI-based strlen calls.

#309921, comment 6.  (Patrick J. LoPresti , lopresti@gmail.com)

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

13 years agoRemove not-used typedef
Josef Weidendorfer [Mon, 19 Nov 2012 22:05:08 +0000 (22:05 +0000)] 
Remove not-used typedef

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

13 years agoCallgrind: fix Ir cost update for ignored functions
Josef Weidendorfer [Mon, 19 Nov 2012 22:05:06 +0000 (22:05 +0000)] 
Callgrind: fix Ir cost update for ignored functions

Also without cache simulation, Callgrind maintains Ir cost.
This is done in setup_bbcc by incrementing an execution counter
for last_bbcc (the cost center for the previously executed BB
in current context) and the global cost counter.

However, we forgot to increment any counter if the currently
executing function should be ignored. We need to still update
costs, add attribute this to a not-ignored call site (as
given in CLG_(current_state).nonskipped).

Before this fix, there was a difference in Ir cost with vs. without
cache simulation. This was because ignored functions (e.g. PLT code)
contributed no cost when not doing cache simulation.

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

13 years agoFix type mixup. Spotted by GCC, analysed by Julian.
Florian Krohm [Mon, 19 Nov 2012 16:29:31 +0000 (16:29 +0000)] 
Fix type mixup. Spotted by GCC, analysed by Julian.

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

13 years agoAdd test cases for dependency tracking through pmovmskb and bsfl.
Julian Seward [Mon, 19 Nov 2012 15:12:07 +0000 (15:12 +0000)] 
Add test cases for dependency tracking through pmovmskb and bsfl.
Part of #308627.  (Patrick J. LoPresti, lopresti@gmail.com)

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

13 years agoFix a couple of x86 char-signedness stragglers
Julian Seward [Mon, 19 Nov 2012 14:55:15 +0000 (14:55 +0000)] 
Fix a couple of x86 char-signedness stragglers

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

13 years agoOne more Char/HChar mixup in conditional code. Reported by Bart.
Florian Krohm [Sun, 18 Nov 2012 22:15:22 +0000 (22:15 +0000)] 
One more Char/HChar mixup in conditional code. Reported by Bart.

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

13 years agoRe-establich configury checking for -Wno-pointer-sign. We need that
Florian Krohm [Sun, 18 Nov 2012 14:39:11 +0000 (14:39 +0000)] 
Re-establich configury checking for -Wno-pointer-sign. We need that
flag to compile pref/tinycc.c. Sigh.

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

13 years agoFinal patch for Char/HChar mixups.
Florian Krohm [Sun, 18 Nov 2012 00:36:15 +0000 (00:36 +0000)] 
Final patch for Char/HChar mixups.
Remove -Wno-pointer-sign from configure.in.
Fixes 273227.

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

13 years agovbit-tester, add counts for the number of 1, 2, 3 and 4 operand tests.
Carl Love [Fri, 16 Nov 2012 19:41:21 +0000 (19:41 +0000)] 
vbit-tester, add counts for the number of 1, 2, 3 and 4 operand tests.

This patch adds code to count the number of each type of test.  The
number of 1, 2, 3 and 4 operand tests that are generated by the vbit-tester
are counted and printed by the vbit-tester.  The user should refer to the
Valgrind output to see if any of the tests failed.

The existing two verbose levels was increased by one level and the the
new output giving the number of tests was inserted as the first verbose
level.  The verbose levels are now:

-v        shows the number of 1, 2, 3 and 4 operand tests that are generated
-v -v     shows IROps being tested
-v -v -v  extreme edition, shows input values

This patch is for bugzilla 309229

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

13 years agoValgrind, V-bit tester: Add support for Iop_CmpORD class iops
Carl Love [Fri, 16 Nov 2012 18:58:08 +0000 (18:58 +0000)] 
Valgrind, V-bit tester: Add support for Iop_CmpORD class  iops

The Iop_CmpORD class of iops  support the POWER specific comparison
instructions.  The instructions take two 32-bit or 64-bit operands
and produce a result of the same size.  However, only the lower bits
of the result are set by the instruction.  The bits are set by the instruction
to indicate if the comparison is "less then", "greater then", or "equal".

This patch adds support to the V-bit tester to verify the propagation
of the undefined bits in the inputs to the output for the Iop_CmpORd iops.
The output bits are always set to undefined if any of the input bits are not
defined.

This patch is for bugzilla 310169

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

13 years agoChar/HChar fixups for m_debuginfo and m_gdbserver.
Florian Krohm [Thu, 15 Nov 2012 04:27:04 +0000 (04:27 +0000)] 
Char/HChar fixups for m_debuginfo and m_gdbserver.

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

13 years agoAdd missing files. They should have been added in r13120.
Florian Krohm [Sun, 11 Nov 2012 13:59:54 +0000 (13:59 +0000)] 
Add missing files. They should have been added in r13120.

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

13 years agoUpdate s390_features.c for DFP.
Florian Krohm [Sat, 10 Nov 2012 22:35:24 +0000 (22:35 +0000)] 
Update s390_features.c for DFP.
Add a testcase.
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
See also VEX r2560.

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

13 years agoAdd support for binary DFP operations (64-bit).
Florian Krohm [Sat, 10 Nov 2012 22:34:14 +0000 (22:34 +0000)] 
Add support for binary DFP operations (64-bit).
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

13 years agoFix more Char/HChar mixups. Closing in...
Florian Krohm [Sat, 10 Nov 2012 22:29:54 +0000 (22:29 +0000)] 
Fix more Char/HChar mixups. Closing in...

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

13 years agoUpdate list of ignored files.
Florian Krohm [Sat, 10 Nov 2012 20:11:14 +0000 (20:11 +0000)] 
Update list of ignored files.

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

13 years agoadd BLKPBSZGET ioctl
Christian Borntraeger [Fri, 9 Nov 2012 16:01:38 +0000 (16:01 +0000)] 
add BLKPBSZGET ioctl

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

13 years agoAdd missing EXTRA DIST statement
Christian Borntraeger [Fri, 9 Nov 2012 08:35:50 +0000 (08:35 +0000)] 
Add missing EXTRA DIST statement

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