]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
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

13 years agoGETREGSET was introduced with 2.6.33.
Christian Borntraeger [Fri, 9 Nov 2012 08:06:14 +0000 (08:06 +0000)] 
GETREGSET was introduced with 2.6.33.

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

13 years agoAnnounce fix for BZ 308886.
Florian Krohm [Thu, 8 Nov 2012 23:04:16 +0000 (23:04 +0000)] 
Announce fix for BZ 308886.

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

13 years agoalso wire up arm, x86 and amd64 regarding ptrace regsets
Christian Borntraeger [Thu, 8 Nov 2012 20:27:05 +0000 (20:27 +0000)] 
also wire up arm, x86 and amd64 regarding ptrace regsets
original patch from
Andreas Arnez <arnez AT  linux DOT vnet DOT ibm DOT com>

Seems that ppc and mips dont have ptrace support....

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

13 years agoadd s390 specific fix for getregset
Christian Borntraeger [Thu, 8 Nov 2012 20:10:10 +0000 (20:10 +0000)] 
add s390 specific fix for getregset

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

13 years agowire up testcase
Christian Borntraeger [Thu, 8 Nov 2012 19:46:29 +0000 (19:46 +0000)] 
wire up testcase

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

13 years agoAdd ptrace getreset testcase from Andreas Arnez
Christian Borntraeger [Thu, 8 Nov 2012 19:42:00 +0000 (19:42 +0000)] 
Add ptrace getreset testcase from Andreas Arnez
arnez AT  linux DOT vnet DOT ibm DOT com

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

13 years agoIgnore ELF sections that have zero size. Fixes #309600.
Julian Seward [Thu, 8 Nov 2012 15:45:16 +0000 (15:45 +0000)] 
Ignore ELF sections that have zero size.  Fixes #309600.
(Dragos Tatulea, dragos.tatulea@gmail.com)

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

13 years agoImprove accuracy of definedness tracking through the x86 PMOVMSKB and
Julian Seward [Thu, 8 Nov 2012 10:58:16 +0000 (10:58 +0000)] 
Improve accuracy of definedness tracking through the x86 PMOVMSKB and
BSF instructions, as the lack of it causes false positives (Valgrind
side).  Fixes #308627.  (Patrick J. LoPresti <lopresti@gmail.com>)

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

13 years agoImprove accuracy of definedness tracking through the x86 PMOVMSKB and
Julian Seward [Thu, 8 Nov 2012 10:57:08 +0000 (10:57 +0000)] 
Improve accuracy of definedness tracking through the x86 PMOVMSKB and
BSF instructions, as the lack of it causes false positives (VEX side).
Fixes #308627.  Combined efforts of Patrick J. LoPresti
<lopresti@gmail.com> and me.

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

13 years agoSame idea as for mips. sem_post does not fail on s390
Christian Borntraeger [Wed, 7 Nov 2012 13:42:36 +0000 (13:42 +0000)] 
Same idea as for mips. sem_post does not fail on s390

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

13 years agos390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite
Christian Borntraeger [Wed, 7 Nov 2012 07:57:01 +0000 (07:57 +0000)] 
s390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite

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

13 years agofix n-i-bz same as 303624 (fixed in 3.8.0), but for x86 android
Philippe Waroquiers [Tue, 6 Nov 2012 22:47:00 +0000 (22:47 +0000)] 
fix n-i-bz same as 303624 (fixed in 3.8.0), but for x86 android

(note: this might be a candidate if a 3.8.2 is done).

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

13 years agofactorise sys_socketcall
Philippe Waroquiers [Sun, 4 Nov 2012 20:40:33 +0000 (20:40 +0000)] 
factorise sys_socketcall
sys_socketcall was duplicated in syswrap-{ppc64|ppc32|arm|mips32|s390x}-linux.c
=>
* Similarly for what was done for sys_ipc, factorise the code in syswrap-linux.c
* re-enabled PRE_MEM_READ for VKI_SYS_SENDMSG and VKI_SYS_RECVMSG
  (PRE_MEM_READ calls were commented out around 2003, for what
   was supposed a glibc bug.
   The PRE_MEM_READ calls were already re-enabled in s390x)
* s390x also had some more checking to verify the addressibility of
  the args and fail the syscall with EFAULT if not addressable
  => same checks are now done for all platforms.

(tested on x86/amd64/mips32/s390x/ppc32/ppc64,
 compiled for arm-android-emulator)

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

13 years agoFix Char/HChar mixups and constness in m_scheduler.
Florian Krohm [Sat, 3 Nov 2012 19:32:28 +0000 (19:32 +0000)] 
Fix Char/HChar mixups and constness in m_scheduler.

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

13 years agoFix Char/HChar mixups and constness in m_initimg.
Florian Krohm [Sat, 3 Nov 2012 19:18:10 +0000 (19:18 +0000)] 
Fix Char/HChar mixups and constness in m_initimg.

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

13 years agoChar/HChar and constness fixes in m_ume
Florian Krohm [Sat, 3 Nov 2012 18:28:20 +0000 (18:28 +0000)] 
Char/HChar and constness fixes in m_ume

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

13 years agos390: Autodetect cache info. These are the final bits to fix BZ 275800.
Florian Krohm [Fri, 2 Nov 2012 22:00:59 +0000 (22:00 +0000)] 
s390: Autodetect cache info. These are the final bits to fix BZ 275800.

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

13 years agoTweak VG_(machine_get_cache_info).
Florian Krohm [Fri, 2 Nov 2012 21:36:39 +0000 (21:36 +0000)] 
Tweak VG_(machine_get_cache_info).
Better messages. Always write cache info when in debug mode.

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

13 years agoEnsure vgdb.c is warningless with -Wpointer-sign
Philippe Waroquiers [Thu, 1 Nov 2012 17:00:12 +0000 (17:00 +0000)] 
Ensure vgdb.c is warningless with -Wpointer-sign
* use normal 'char' (when possible) rather than 'unsigned char'
* fix bug in case a character val >= 128 is given in a -c command

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

13 years agofix arena size wrongly printed in debugmsg on 32 bits platforms when > 2Gb.
Philippe Waroquiers [Wed, 31 Oct 2012 22:10:47 +0000 (22:10 +0000)] 
fix arena size wrongly printed in debugmsg on 32 bits platforms when > 2Gb.

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

13 years agofor debuglevel >=2, ensure write_buf debug output only writes the req nr of char
Philippe Waroquiers [Wed, 31 Oct 2012 15:07:39 +0000 (15:07 +0000)] 
for debuglevel >=2, ensure write_buf debug output only writes the req nr of char

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

13 years agoCachegrind: introduce special case for Ir
Josef Weidendorfer [Tue, 30 Oct 2012 00:28:29 +0000 (00:28 +0000)] 
Cachegrind: introduce special case for Ir

Because most Ir accesses touch only one line, and this
can be detected at instrumentation time, use a special
handler for that. This handler does not need to check
cache line crossing at runtime.

This does not change the results of the simulator at all,
but improves runtime by around 15% on perf benchmarks.

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

13 years agoCallgrind: use memory block number as tag for simple model
Josef Weidendorfer [Mon, 29 Oct 2012 21:47:45 +0000 (21:47 +0000)] 
Callgrind: use memory block number as tag for simple model

Same as in Cachegrind. Gives a slight speedup.

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

13 years agoUse always_inline attribute also in Callgrinds simulator
Josef Weidendorfer [Mon, 29 Oct 2012 21:28:05 +0000 (21:28 +0000)] 
Use always_inline attribute also in Callgrinds simulator

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

13 years agoGet rid of compiler warning
Josef Weidendorfer [Mon, 29 Oct 2012 21:28:03 +0000 (21:28 +0000)] 
Get rid of compiler warning

In addition to "__attribute__((always_inline))", gcc wants
"__inline__" to be used, otherwise the warning

  warning: always_inline function might not be inlinable

is printed. However, this does not have any effect on
performance (probably "static" makes gcc 4.7 already inlining
the functions?).

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

13 years agoValgrind, ppc: Fix test for 32-bit testsuite.
Carl Love [Mon, 29 Oct 2012 20:39:18 +0000 (20:39 +0000)] 
Valgrind, ppc:  Fix test for 32-bit testsuite.

The 32-bit testsuite executes the 64-bit class instruction prtyd.  This
instruction should not be tested in 32-bit mode.  The change also updates
the expected output for the test.  Note, 32-bit HW will generate a SIGILL
when the prtyd instruction is executed.  However, the 64-bit HW executing
a 32-bit application does execute the instruction but only the lower 32-bits
of the result are valid.  In general, the 64-bit class instructions should
not be executed in 32-bit binaries.

This fix accompanies the VEX fix in revision 2558 to add the 64-bit mode test
to make sure the 64-bit class instructions are only executed in 64-bit mode.
The VEX bugzilla is:

Bug 308573 - Internal Valgrind error on 64-bit instruction executed in
32-bit mode

Carl Love cel@us.ibm.com

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

13 years agoValgrind, ppc: Fix missing checks for 64-bit instructions operating in 32-bit mode...
Carl Love [Mon, 29 Oct 2012 20:23:41 +0000 (20:23 +0000)] 
Valgrind, ppc:  Fix missing checks for 64-bit instructions operating in 32-bit mode, Bugzilla 308573

A number of the POWER instructions are only intended to run on 64-bit
hardware.  These instructions will give a SIGILL instruction on 32-bit
hardware.  The check for 32-bit mode on some of these instructions is
missing.  Although, the 64-bit hardware will execute these instructions
on 64-bit hardware without generating a SIGILL the use of these
instructions in 32-bit mode on 64-bit hardware is typically indicative of
a programming error. There are cases where these instructions are used
to determine if the code is running on 32-bit hardware or not.  In these
cases, the instruction needs to generate a SIGILL for the error handler
to properly determine the hardware is running in 32-bit mode.

This patch adds the 32-bit mode check for those 64-bit instructions that
do not have the check.  If the check fails, the instruction is flagged
as an unsupported instruction and a SIGILL message is generated.

This patch fixes the bug reported in:
Bug 308573 - Internal Valgrind error on 64-bit instruction executed in
32-bit mode

Note, there is an accompaning fix to memcheck/tests/ppc32/power_ISA2_05.c
to only execute the 64-bit instruction prtyd test in 64-bit mode.

Carl Love  cel@us.ibm.com

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

13 years agoUnbreak testcase.
Florian Krohm [Sun, 28 Oct 2012 20:26:04 +0000 (20:26 +0000)] 
Unbreak testcase.

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

13 years agoChar/HChar and constness fixes. Mostly cost center
Florian Krohm [Sat, 27 Oct 2012 23:07:42 +0000 (23:07 +0000)] 
Char/HChar and constness fixes. Mostly cost center
on allocators which is always a const HChar *

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

13 years agoMore Char/HChar fixes and constification.
Florian Krohm [Sat, 27 Oct 2012 18:39:11 +0000 (18:39 +0000)] 
More Char/HChar fixes and constification.

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

13 years agoUpdate list of ignore files. This time with the correct name.
Florian Krohm [Sat, 27 Oct 2012 17:46:44 +0000 (17:46 +0000)] 
Update list of ignore files. This time with the correct name.

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

13 years agoUpdate list of ignored files.
Florian Krohm [Sat, 27 Oct 2012 16:34:31 +0000 (16:34 +0000)] 
Update list of ignored files.

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

13 years agoAdd machinery to support DFP rounding modes.
Florian Krohm [Sat, 27 Oct 2012 16:19:31 +0000 (16:19 +0000)] 
Add machinery to support DFP rounding modes.
Part of fixing BZ 307113.
Patch by Maran <maranp@linux.vnet.ibm.com>

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

13 years agoFix fpconv.c to unbreak the build on z10ec.
Florian Krohm [Sat, 27 Oct 2012 14:25:28 +0000 (14:25 +0000)] 
Fix fpconv.c to unbreak the build on z10ec.
Add rounding-6.c to test rounding modes for convert-to-fixed per m3
field. (The previous fpconv gave the impression of testing this but
in fact did not).
Add rounding.h to establish symbolic names for the various rounding
modes.

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

13 years agoAdditional refinement in PRE(sys_ipc).
Petar Jovanovic [Fri, 26 Oct 2012 16:16:43 +0000 (16:16 +0000)] 
Additional refinement in PRE(sys_ipc).

Additional refinement in PRE(sys_ipc) on which arguments to check for the call.
This is still a simplistic check, yet it should resolve additional cases.
One of the resolved cases is memcheck/tests/sem on MIPS.

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

13 years agoUpdate with latest bugmail header lines.
Julian Seward [Fri, 26 Oct 2012 10:28:24 +0000 (10:28 +0000)] 
Update with latest bugmail header lines.

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

13 years agoFix compilation warning on non-mips targets (rm was flagged as unused)
Julian Seward [Fri, 26 Oct 2012 08:00:59 +0000 (08:00 +0000)] 
Fix compilation warning on non-mips targets (rm was flagged as unused)

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

13 years agofix 123837 semctl system call: 4rth argument is optional, depending on cmd
Philippe Waroquiers [Tue, 23 Oct 2012 21:38:52 +0000 (21:38 +0000)] 
fix 123837 semctl system call: 4rth argument is optional, depending on cmd

Depending on the semctl command (arg3), arg4 might or might not be needed.
The PRE(sys_ipc) multiplexed syscall for semctl was always checking
all 4 args.

The fix consists in dereferencing the 4th arg (which in sys_ipc is ARG5)
only if the semctl syscall cmd implies 4 arguments.
This avoids the false positive on linux x86.

Note that PRE(sys_ipc) is still too simplistic as it assumes
that 6 args are always read, which is not the case.
This seems to cause false positive on mips:
  memcheck on none/tests/sem gives:
     Syscall param ipc(fifth) contains uninitialised byte(s)

It would be nice to implement the multiplexed PRE(sys_ipc) by
calling the PRE(sys_xxxx) similar PRE, depending on ARG1 of sys_ipc.
This would then avoid the simplistic PRE(sys_ipc) logic without duplicating
the logic in PRE(sys_semctl) (and all other sys_ipc multiplexed syscalls).
However, I found no easy way to do that.

With the current fix, some logic about semctl is partially duplicated between
the PRE(sys_ipc) (for platforms such as x86 having a multiplexed sys call)
and PRE(sys_semctl) (for platforms such as amd64, having a direct sys call)
to fix the false positive encountered on x86.

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

13 years agoRemove build dependency on Xen header files - closes #308495
Bart Van Assche [Tue, 23 Oct 2012 18:03:28 +0000 (18:03 +0000)] 
Remove build dependency on Xen header files - closes #308495

From: Ian Campbell <ian.campbell@citrix.com>

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

13 years agoReserve space for frame header in disp_run_translations for MIPS.
Petar Jovanovic [Mon, 22 Oct 2012 17:43:57 +0000 (17:43 +0000)] 
Reserve space for frame header in disp_run_translations for MIPS.

Reserve space for frame header in disp_run_translations, as some optimizations
may decide to use it. This should fix issue #307141.

Related link:
https://bugs.kde.org/show_bug.cgi?id=307141

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

13 years agoFollow-up to sys_ipc restructuration
Philippe Waroquiers [Sun, 21 Oct 2012 21:49:33 +0000 (21:49 +0000)] 
Follow-up to sys_ipc restructuration
Rev 13078 removed a PRE call (for SEMCTL) in the POST(sys_ipc).
This commit adds the correct POST call for SEMCTL in POST(sys_ipc).
(note: some tests are missing in this area, as removing PRE
and adding POST did not cause any test result to change).

This is the last patch to restructure the sys_ipc code.

After this patch, should be able to do the real fix
for 23837 (semctl GETVAL false positive)

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

13 years agoFollow-up to sys_ipc restructuration
Philippe Waroquiers [Sun, 21 Oct 2012 21:13:39 +0000 (21:13 +0000)] 
Follow-up to sys_ipc restructuration
Now that the PRE/POS(sys_ipc) code is not duplicated anymore,
fix two strange things in this code:

* PRE(sys_ipc) : add missing ; after the call PRE_REG_READ6
  (strange that this was compiling without it ???)

* POST(sys_ipc) : it seems there was a copy/paste of
  the  PRE(sys_ipc) code for VKI_SEMCTL.
  Cannot understand why we would need to call again
  deref_Addr and ML_(generic_PRE_sys_semctl) in the POST(sys_ipc).

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

13 years agoFix 308711 - give more info about aspacemgr and arenas in out_of_memory
Philippe Waroquiers [Sun, 21 Oct 2012 21:03:11 +0000 (21:03 +0000)] 
Fix 308711 - give more info about aspacemgr and arenas in out_of_memory
In case of out of memory, Valgrind will output
the state of the address space manager and of the arena.
Then it will output a message to inform the user about the out of memory.

In case out of memory happens again while outputting the aspacemgr
or arena info, then another trial is done to only output the user msg.

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

13 years agorestructure code for future fixing of 123837 (semctl GETVAL false positive)
Philippe Waroquiers [Sun, 21 Oct 2012 20:21:17 +0000 (20:21 +0000)] 
restructure code for future fixing of 123837 (semctl GETVAL false positive)

Regrouped identical code (except for indentation)
from syswrap-ppc64-linux.c, syswrap-ppc32-linux.c,syswrap-mips32-linux.c
  syswrap-x86-linux.c, syswrap-s390x-linux.c
into
  syswrap-linux.c

(compiled/regtested on x86, amd64, ppc64, mips32, s390x)

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

13 years agoFix memory leak.
Florian Krohm [Sun, 21 Oct 2012 19:58:04 +0000 (19:58 +0000)] 
Fix memory leak.

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

13 years agoFirst round of Char/HChar fixups for coregrind and memcheck.
Florian Krohm [Sun, 21 Oct 2012 19:43:43 +0000 (19:43 +0000)] 
First round of Char/HChar fixups for coregrind and memcheck.
Little bit of ripple in tools, too.

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

13 years agoIntroduce a test to reproduce bug 123837 (semctl GETVAL false positive)
Philippe Waroquiers [Sun, 21 Oct 2012 18:46:09 +0000 (18:46 +0000)] 
Introduce a test to reproduce  bug 123837 (semctl GETVAL false positive)
The test succeeds on amd64, but fails on x86, with the following diff:

+Syscall param semctl(arg) points to uninitialised byte(s)
+   at 0x........: semctl@@GLIBC_2.2 (semctl.c:109)
+   by 0x........: main (sem.c:36)
+ Address 0x........ is on thread 1's stack
+
+Syscall param semctl(arg) points to uninitialised byte(s)
+   at 0x........: semctl@@GLIBC_2.2 (semctl.c:109)
+   by 0x........: main (sem.c:43)
+ Address 0x........ is on thread 1's stack
+

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

13 years agoFix 308644 vgdb command for having the info for the track-fds option
Philippe Waroquiers [Sun, 21 Oct 2012 14:37:14 +0000 (14:37 +0000)] 
Fix 308644 vgdb command for having the info for the track-fds option

(allows to have the list of opened fds and the associated info
on request from GDB or from the shell, using vgdb)

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

13 years agoFirst round of Char/HChar fixes for memcheck.
Florian Krohm [Sun, 21 Oct 2012 03:43:20 +0000 (03:43 +0000)] 
First round of Char/HChar fixes for memcheck.

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

13 years agoFix Char/HChar mixups in helgrind and then some.
Florian Krohm [Sun, 21 Oct 2012 03:23:36 +0000 (03:23 +0000)] 
Fix Char/HChar mixups in helgrind and then some.
Also fix all usages of the wordFM data structure. Once upon a time
wordFM used Words but now it uses UWords.
Likewise for WordBag.

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

13 years agoFix a few Char/HChar mixups in callgrind.
Florian Krohm [Sun, 21 Oct 2012 02:55:56 +0000 (02:55 +0000)] 
Fix a few Char/HChar mixups in callgrind.

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

13 years agoFix a few Char/HChar mixups for cachegrind.
Florian Krohm [Sun, 21 Oct 2012 02:39:42 +0000 (02:39 +0000)] 
Fix a few Char/HChar mixups for cachegrind.

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

13 years agoFix a few compiler warnings.
Florian Krohm [Sun, 21 Oct 2012 02:30:18 +0000 (02:30 +0000)] 
Fix a few compiler warnings.

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

13 years agoFollowup to constification of VEX's external interface (VEX r2555).
Florian Krohm [Sun, 21 Oct 2012 02:19:35 +0000 (02:19 +0000)] 
Followup to constification of VEX's external interface (VEX r2555).

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

13 years agoConstify VEX's external interface.
Florian Krohm [Sun, 21 Oct 2012 02:09:51 +0000 (02:09 +0000)] 
Constify VEX's external interface.

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

13 years agoFirst round of Char/HChar fixups for massif
Florian Krohm [Sat, 20 Oct 2012 19:57:16 +0000 (19:57 +0000)] 
First round of Char/HChar fixups for massif

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

13 years agoAdd a FIXME
Florian Krohm [Sat, 20 Oct 2012 19:52:14 +0000 (19:52 +0000)] 
Add a FIXME

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

13 years agoexp-dhat Char/HChar fixes.
Florian Krohm [Sat, 20 Oct 2012 19:34:13 +0000 (19:34 +0000)] 
exp-dhat Char/HChar fixes.

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

13 years agoChar/HChar fixes for lackey.
Florian Krohm [Sat, 20 Oct 2012 19:30:54 +0000 (19:30 +0000)] 
Char/HChar fixes for lackey.

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

13 years agoThe listener does not use VEX types anywhere else. So this
Florian Krohm [Sat, 20 Oct 2012 19:28:13 +0000 (19:28 +0000)] 
The listener does not use VEX types anywhere else. So this
change fixes the copy-and-pasted panic functions to use
native C types.

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

13 years agoFollow-up to cache reorg: update trace cache warning
Philippe Waroquiers [Sat, 20 Oct 2012 17:18:35 +0000 (17:18 +0000)] 
Follow-up to cache reorg: update trace cache warning
Update trace cache warning so that it is the same as before the cache reorg
(avoid failure of some tests on Pentium4 as the warning output
must match what is filtered by cachegrind/tests/filter_stderr)

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

13 years agoAdd a proper support for several MIPS instructions that generate SigFPE.
Petar Jovanovic [Fri, 19 Oct 2012 14:55:58 +0000 (14:55 +0000)] 
Add a proper support for several MIPS instructions that generate SigFPE.

This VEX change needs to be paired with r13059 on Valgrind.

Add support to properly handle TEQ, ADD and SUB instructions that generate
exceptions on MIPS platforms.

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

13 years agoAdd a proper support for several MIPS instructions that generate SigFPE.
Petar Jovanovic [Fri, 19 Oct 2012 14:45:17 +0000 (14:45 +0000)] 
Add a proper support for several MIPS instructions that generate SigFPE.

Add support to properly handle TEQ, ADD and SUB instructions that generate
exceptions on MIPS platforms. A SignalException test for MIPS32 has also been
added, so we can cover more cases.

This resolves:

none/tests/faultstatus
gdbserver_tests/mcsignopass
gdbserver_tests/mcsigpass

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

13 years agoIssue warning about missing L2 cache only if there are any
Florian Krohm [Fri, 19 Oct 2012 03:20:37 +0000 (03:20 +0000)] 
Issue warning about missing L2 cache only if there are any
caches in the first place.

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

13 years agoFix some Char/HChar mixups in exp-bbv
Florian Krohm [Thu, 18 Oct 2012 03:50:57 +0000 (03:50 +0000)] 
Fix some Char/HChar mixups in exp-bbv

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

13 years agoFix a few Char/Hchar mixups in exp-sgcheck.
Florian Krohm [Thu, 18 Oct 2012 03:46:42 +0000 (03:46 +0000)] 
Fix a few Char/Hchar mixups in exp-sgcheck.

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

13 years agoFix VG_(cpuid) invocations.
Florian Krohm [Thu, 18 Oct 2012 03:33:05 +0000 (03:33 +0000)] 
Fix VG_(cpuid) invocations.
Also call cache_info_is_sensible. I forgot to do that in r13053.

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

13 years agoFix some prototypes.
Florian Krohm [Thu, 18 Oct 2012 03:17:32 +0000 (03:17 +0000)] 
Fix some prototypes.

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

13 years agoChange cache detection for x86/amd64 to fill in VexCacheInfo directly.
Florian Krohm [Thu, 18 Oct 2012 03:16:45 +0000 (03:16 +0000)] 
Change cache detection for x86/amd64 to fill in VexCacheInfo directly.
New function write_cache_info to dump what was detected for debugging
purposes.
New function cache_info_is_sensible to ensure that autodetected
cache info lives up to the promises made in libvex.h.
Moved the trace-cache related kludgery to cachegrind where it belongs.

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

13 years agoAllow representation of trace caches (VexCache).
Florian Krohm [Thu, 18 Oct 2012 03:11:39 +0000 (03:11 +0000)] 
Allow representation of trace caches (VexCache).
Add more verbiage as to what can be expected from the "caches" array.

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

13 years agoFix 308341 vgdb should report process exit (or fatal signal)
Philippe Waroquiers [Wed, 17 Oct 2012 21:32:03 +0000 (21:32 +0000)] 
Fix 308341 vgdb should report process exit (or fatal signal)
patch from Mark Wielaard.
(with small modifications).
Also clarified some comments related to the resume reply.

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

13 years agos390: Order the operands of the multiply-and-add/subtract IROps
Florian Krohm [Tue, 16 Oct 2012 02:53:33 +0000 (02:53 +0000)] 
s390: Order the operands of the multiply-and-add/subtract IROps
such that they match the definition in libvex_ir.h.  This was
spotted by Julian.

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

13 years agoUpdate list of ignored files.
Florian Krohm [Tue, 16 Oct 2012 01:27:54 +0000 (01:27 +0000)] 
Update list of ignored files.

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