]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agoMake msgrcv wrappers on amd64, arm and mips32 look for IPC_NOWAIT in
Tom Hughes [Thu, 21 Feb 2013 10:57:23 +0000 (10:57 +0000)] 
Make msgrcv wrappers on amd64, arm and mips32 look for IPC_NOWAIT in
the flags argument, not the type argument. Fixes #315534.

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

13 years agos390: Fix a type mixup found by BEAM.
Florian Krohm [Thu, 21 Feb 2013 03:03:05 +0000 (03:03 +0000)] 
s390: Fix a type mixup found by BEAM.

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

13 years agoAdd Valgrind's implementation of memmove to avoid link issue
Petar Jovanovic [Fri, 15 Feb 2013 03:12:17 +0000 (03:12 +0000)] 
Add Valgrind's implementation of memmove to avoid link issue

One of the recent changes, r2682 (Make HReg a struct), caused a build
break on several x86_64 and MIPS build bots/platforms that used older
gcc versions. The issue was that compilers generated calls to memmove,
and since it was built with -nodefaultlibs, the entry could not be
resolved. The fix wraps VG_(memmove) in memmove().

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

13 years agoAdd support for the Linux ioctl IB_USER_MAD_ENABLE_PKEY
Bart Van Assche [Thu, 14 Feb 2013 17:10:01 +0000 (17:10 +0000)] 
Add support for the Linux ioctl IB_USER_MAD_ENABLE_PKEY

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

13 years agos390: Testcases and vbit-tester changes for the following
Florian Krohm [Thu, 14 Feb 2013 14:28:22 +0000 (14:28 +0000)] 
s390: Testcases and vbit-tester changes for the following
DFP insns:
- extract basied exponent
- insert biased exponent
- quantize
- reround to significance
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.

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

13 years agos390: Support the following DFP insns:
Florian Krohm [Thu, 14 Feb 2013 14:27:12 +0000 (14:27 +0000)] 
s390: Support the following DFP insns:
- extract basied exponent
- insert biased exponent
- quantize
- reround to significance
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.

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

13 years agoStop gcc-4.4 complaining when this file is compiled on a 32 bit platform.
Julian Seward [Mon, 11 Feb 2013 16:06:03 +0000 (16:06 +0000)] 
Stop gcc-4.4 complaining when this file is compiled on a 32 bit platform.

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

13 years agoMake HReg a struct. In the past there were several occurences where
Florian Krohm [Mon, 11 Feb 2013 00:47:35 +0000 (00:47 +0000)] 
Make HReg a struct. In the past there were several occurences where
a HReg was assigned to an integer. This worked by accident because the
bits representing the register number (which was meant to be accessed)
happened to be in the right place.
Two new functions: hregIsInvalid and sameHReg.
The HReg struct just wraps the integer that was previously used to
represent a register without changing the encoding.

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

13 years agos390: Be consistent with emulation warnings about unsupported
Florian Krohm [Mon, 11 Feb 2013 00:03:27 +0000 (00:03 +0000)] 
s390: Be consistent with emulation warnings about unsupported
rounding modes in absence of the floating-point extension facility.
For some insns we would vassert for others we'd give a warning.
Now we always issue an emulation warning.

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

13 years agos390: Add testcase for these DFP insns: CDGTRA, CXGTR, CGXTR, and CGDTR (VEX r2680).
Florian Krohm [Fri, 8 Feb 2013 23:34:31 +0000 (23:34 +0000)] 
s390: Add testcase for these DFP insns: CDGTRA, CXGTR, CGXTR, and CGDTR (VEX r2680).
Update vbit tester. Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.

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

13 years agos390: Support these DFP insns: CDGTRA, CXGTR, CGXTR, and CGDTR.
Florian Krohm [Fri, 8 Feb 2013 23:32:54 +0000 (23:32 +0000)] 
s390: Support these DFP insns: CDGTRA, CXGTR, CGXTR, and CGDTR.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113.

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

13 years agos390: Change get_dfp_rounding_mode to map IR rounding modes to
Florian Krohm [Fri, 8 Feb 2013 20:22:03 +0000 (20:22 +0000)] 
s390: Change get_dfp_rounding_mode to map IR rounding modes to
S390_DEP_ROUND_.. values in the range [8;15]. See comments in code.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

13 years agos390: Add cc thunk description for S390_CC_OP_DFP_{64|128}_TO_INT_32.
Florian Krohm [Fri, 8 Feb 2013 16:01:23 +0000 (16:01 +0000)] 
s390: Add cc thunk description for S390_CC_OP_DFP_{64|128}_TO_INT_32.
This should have been part of r2632.

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

13 years agoAdd intercepts for some Qt5 functions. (David Faure, faure@kde.org)
Julian Seward [Thu, 7 Feb 2013 11:53:36 +0000 (11:53 +0000)] 
Add intercepts for some Qt5 functions.  (David Faure, faure@kde.org)

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

13 years agos390: Fix debugging output in IR injection.
Florian Krohm [Thu, 7 Feb 2013 03:28:52 +0000 (03:28 +0000)] 
s390: Fix debugging output in IR injection.

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

13 years agos390: It is not necessary to save/restore the link register when
Florian Krohm [Sat, 2 Feb 2013 22:58:25 +0000 (22:58 +0000)] 
s390: It is not necessary to save/restore the link register when
making a helper call. The link register needs to be saved when
switching between valgrind and client code and the dispatcher code
already does that. Julian suggested this change when he merged the
COMEM branch.
This saves between 6% and 13% of insns on the perf bucket.
Runtime difference is within noise margin.

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

13 years agos390: Change insn selection to recognize memcpy-like statements.
Florian Krohm [Sat, 2 Feb 2013 00:16:58 +0000 (00:16 +0000)] 
s390: Change insn selection to recognize memcpy-like statements.
Add S390_INCN_MEMCPY and generate MVC for that later on. Saves between
0.1 - 1.5% of insns. Observed runtime differences on the perf bucket were
within noise margin.

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

13 years agoShifting an int and assigning it to a long could be trouble.
Florian Krohm [Sat, 2 Feb 2013 00:10:36 +0000 (00:10 +0000)] 
Shifting an int and assigning it to a long could be trouble.
It isn't here, but let's make the code clear in this respect.

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

13 years agoFix a few more HReg <-> UInt mixups.
Florian Krohm [Fri, 1 Feb 2013 16:11:51 +0000 (16:11 +0000)] 
Fix a few more HReg <-> UInt mixups.

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

13 years agoLine-wrap a comment and put in some #undefs. Non-functional change.
Julian Seward [Thu, 31 Jan 2013 10:39:07 +0000 (10:39 +0000)] 
Line-wrap a comment and put in some #undefs.  Non-functional change.

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

13 years agoPost-patch to r2668. Choose more sensible names. Purely mechanical, no
Florian Krohm [Thu, 31 Jan 2013 02:04:02 +0000 (02:04 +0000)] 
Post-patch to r2668. Choose more sensible names. Purely mechanical, no
functional changes.
Mttt -> Ittt
Mtct -> Ittc
Mttc -> Itct
MTcc -> Itcc
eX -> e1  and conX -> con1

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

13 years agoBypass warning reported by gcc
Philippe Waroquiers [Wed, 30 Jan 2013 23:53:59 +0000 (23:53 +0000)] 
Bypass warning reported by gcc
gcc reports a warning:
m_stacktrace.c:183: warning: ‘xip_verified’ may be used uninitialized in this function

This warning is a false positive:
xip_verified is assigned in the following branch:
      if (UNLIKELY(xip_verif >= CFUNWIND)) {
         if (xip_verif == CFUNWIND) {
            ...
         } else {
           <<<< here xip_verified is initialised >>>>
         }
      }

xip_verified is then used only if xip_verif > CFUNWIND.

Assign a rubish value to xip_verified to silence gcc.

(??? there are GCC pragmas that can be used to
disable a warning only on a specific line e.g.
something like:

   #pragma GCC diagnostic ignored "-Wuninitialized"
   Addr xip_verified; // xip for which we have calculated fpverif_uregs
   #pragma GCC diagnostic warning "-Wuninitialized"

instead of
   Addr xip_verified = 0; // xip for which we have calculated fpverif_uregs
   // 0 assigned to silence false positive -Wuninitialized warning

but the #pragma technique seems not used currently.

So, using the bypass by assigning a rubbish value

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

13 years agobetter handle and better document the case of multi-locks cycles
Philippe Waroquiers [Wed, 30 Jan 2013 23:21:34 +0000 (23:21 +0000)] 
better handle and better document the case of multi-locks cycles
In case a lock order violation is detected in a multi lock cycle,
then the current code cannot produce the set of locks and the
stack traces involved in the cycle.
However, it is still possible to produce the stack trace of
the new lock and the other lock between which a cycle was discovered.

Also, add a comment in the code clarifying why the set of locks
establishing the required order cannot (currently) be produced.

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

13 years agoImproves stacktrace unwinding on x86
Philippe Waroquiers [Wed, 30 Jan 2013 23:18:11 +0000 (23:18 +0000)] 
Improves stacktrace unwinding on x86

* other platforms (e.g. amd64) are first trying to unwind
  with cfi info, then with the fp chain.
* fp unwind when code is compiled without frame pointer can
  fail and give incomplete stack traces (often terminating
  with a random program counter, causing a huge amount of
  recorded stack traces).

This patch improves unwinding on x86 by:
* first time an IP is unwound, do the unwind both with
  CFI technique and with fp technique.
  If results are identical, IP is inserted in a cache of
  'fp unwindable' IP
* following unwind of the same IP are then done directly
  either with fp unwind or with cfi, depending on the
  cached result of the check done during first unwind.

The cache is needed so as to avoid as much as possible cfi unwind,
as this is significantly slower than fp unwind.

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

13 years agoThe Coverity tool was run against the Valgrind source code and identified a
Carl Love [Wed, 30 Jan 2013 18:39:57 +0000 (18:39 +0000)] 
The Coverity tool was run against the Valgrind source code and identified a
problem in VEX/priv/guest_ppc_toIR.c saying the variable 'insn_suffix' was
assigned but not used. The function _do_vsx_fp_roundToInt() has an
HChar * parameter named 'insn_suffix', and the intention of this function was
to set the insn_suffix appropriately for the passed opcode so that the caller
could use that suffix as needed (some callers needed, and others didn't).
However, since the parameter type is a simple pointer, passed by value,
insn_suffix was only modified locally, and the caller did not see the new
value. Since most of the callers of _do_vsx_fp_roundToInt() ignore the
insn_suffix, I have removed that from the parameter list and moved the code
for ascertaining the appropriate suffix into a new function called
_get_vsx_rdpi_suffix().

This patch is for Bugzilla 314099

The patch was written by Maynard Johnson.

The patch does not add any additional regtest errors.  The vbit tester
was also run.  No issues were found.

The patch was reviewed, tested and committed by Carl Love

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

13 years agomips: Fixing some HReg <--> UInt mixups spotted by Florian.
Petar Jovanovic [Wed, 30 Jan 2013 18:06:26 +0000 (18:06 +0000)] 
mips: Fixing some HReg <--> UInt mixups spotted by Florian.

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

13 years agotest_reservation(), test_double_pair_instrs(): Fix broken inline assembly
Julian Seward [Tue, 29 Jan 2013 22:14:01 +0000 (22:14 +0000)] 
test_reservation(), test_double_pair_instrs(): Fix broken inline assembly
causing segfaults with gcc-4.7.  The inline assembly still isn't right,
but it's better than it was before.

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

13 years agoIncrease maximum usable memory amount from 32GB to 64GB on 64-bit Linux.
Julian Seward [Tue, 29 Jan 2013 21:14:46 +0000 (21:14 +0000)] 
Increase maximum usable memory amount from 32GB to 64GB on 64-bit Linux.

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

13 years agoget_otrack_shadow_offset_wrk: amd64: add a (very rare) missing case.
Julian Seward [Tue, 29 Jan 2013 21:13:00 +0000 (21:13 +0000)] 
get_otrack_shadow_offset_wrk: amd64: add a (very rare) missing case.

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

13 years agoNon functional change (formatting, comments) related to newly created
Julian Seward [Tue, 29 Jan 2013 21:11:55 +0000 (21:11 +0000)] 
Non functional change (formatting, comments) related to newly created
Iex_ITE.

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

13 years agoFix the mkLazy3 case for I32 x I8 x I128 -> I128.
Julian Seward [Tue, 29 Jan 2013 17:18:56 +0000 (17:18 +0000)] 
Fix the mkLazy3 case for I32 x I8 x I128 -> I128.

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

13 years agoFollow-up on r2664-r2668 changes for IRExpr_Mux0X and Iex_Mux0X for MIPS32.
Petar Jovanovic [Tue, 29 Jan 2013 15:42:29 +0000 (15:42 +0000)] 
Follow-up on r2664-r2668 changes for IRExpr_Mux0X and Iex_Mux0X for MIPS32.

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

13 years agoFix a buffer overflow in VG_(assert_fail).
Florian Krohm [Tue, 29 Jan 2013 04:25:45 +0000 (04:25 +0000)] 
Fix a buffer overflow in VG_(assert_fail).
Patch by Matthias Schwarzott (zzam@gentoo.org) with some minor mods.
Fixes BZ 313811

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

13 years agoInfrastructure cleanup part 2. valgrind side changes.
Florian Krohm [Tue, 29 Jan 2013 03:57:40 +0000 (03:57 +0000)] 
Infrastructure cleanup part 2. valgrind side changes.
Replace Iex_Mux0X with Iex_ITE (if-then-else).
Companion patch to VEX r2668.

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

13 years agoInfrastructure cleanup part 2.
Florian Krohm [Tue, 29 Jan 2013 03:56:06 +0000 (03:56 +0000)] 
Infrastructure cleanup part 2.
Replace Iex_Mux0X with Iex_ITE (if-then-else)
and
IRExpr_Mux0X( cond, iffalse, iftrue ) with
IRExpr_ITE  ( cond, iftrue, iffalse );

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

13 years agoInitialise a local variable, so as to stop gcc-4.7.2 complaining that
Julian Seward [Mon, 28 Jan 2013 15:17:52 +0000 (15:17 +0000)] 
Initialise a local variable, so as to stop gcc-4.7.2 complaining that
some part of it is used uninitialised.

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

13 years agodrd: Make --trace-addr trace all loads for the specified address
Bart Van Assche [Sun, 27 Jan 2013 10:58:47 +0000 (10:58 +0000)] 
drd: Make --trace-addr trace all loads for the specified address

Thanks to Florian for reporting this.

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

13 years agodrd: Avoid that Coverity complains about a dead assignment
Bart Van Assche [Sun, 27 Jan 2013 10:56:04 +0000 (10:56 +0000)] 
drd: Avoid that Coverity complains about a dead assignment

Thanks to Florian for reporting this.

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

13 years agoMux0X cond type change: fix a front end case that got missed.
Julian Seward [Sat, 26 Jan 2013 20:28:00 +0000 (20:28 +0000)] 
Mux0X cond type change: fix a front end case that got missed.

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

13 years agoMux0X cond type change: verify all isel cases, and implement one
Julian Seward [Sat, 26 Jan 2013 20:26:58 +0000 (20:26 +0000)] 
Mux0X cond type change: verify all isel cases, and implement one
that got missed (for F64).

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

13 years agoFix warning (missing #include file)
Philippe Waroquiers [Sat, 26 Jan 2013 16:45:01 +0000 (16:45 +0000)] 
Fix warning (missing #include file)

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

13 years agoAvoid copying a string coming from argv[] into a fixed size buffer.
Florian Krohm [Sat, 26 Jan 2013 16:32:18 +0000 (16:32 +0000)] 
Avoid copying a string coming from argv[] into a fixed size buffer.
Pointed out by Coverity's checker.

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

13 years agoFix up a non-handled Mux0X case following r2664, and verify that
Julian Seward [Sat, 26 Jan 2013 13:32:09 +0000 (13:32 +0000)] 
Fix up a non-handled Mux0X case following r2664, and verify that
the sense of all of the Mux0X cases is correct.

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

13 years agoChanges to track r2664, which changed the type of the condition field
Julian Seward [Sat, 26 Jan 2013 11:49:15 +0000 (11:49 +0000)] 
Changes to track r2664, which changed the type of the condition field
of Mux0X from Ity_I8 to Ity_I1.  Patch from Florian Krohm.

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

13 years agoInfrastructure cleanup: change type of the condition field of
Julian Seward [Sat, 26 Jan 2013 11:47:55 +0000 (11:47 +0000)] 
Infrastructure cleanup: change type of the condition field of
IRExpr_Mux0X from Ity_I8 to Ity_I1.  This makes more sense, makes it
consistent with condition fields in IRStmt_Dirty and IRStmt_Exit, and
avoids some pointless 1Uto8 casting of the condition, in many cases.
Fixes for s390 are from Florian.

Also, make a small extension to ir_opt.c, that allows the constant
folder to look backwards through arbitrary expressions even in flat
IR.  This makes it possible to do arbitrary tree folding in ir_opt,
which is where it belongs.  Use this to implement the folding rule
CmpNE32(1Uto32(b), 0) ==> b.

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

13 years agoFix incorrect comment.
Julian Seward [Sat, 26 Jan 2013 11:39:13 +0000 (11:39 +0000)] 
Fix incorrect comment.

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

13 years agoChanges to make this usable for ARM/Thumb.
Julian Seward [Sat, 26 Jan 2013 11:37:51 +0000 (11:37 +0000)] 
Changes to make this usable for ARM/Thumb.

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

13 years agoAnnotate ARMNImm_to_Imm64 with fallthrough markers following
Julian Seward [Fri, 25 Jan 2013 09:46:43 +0000 (09:46 +0000)] 
Annotate ARMNImm_to_Imm64 with fallthrough markers following
verification against the table in host_arm_defs.h, "Neon Immediate
operand".  A particularly nasty piece of code.

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

13 years agoFix some HReg/UInt mixups, spotted by Florian.
Julian Seward [Fri, 25 Jan 2013 09:03:32 +0000 (09:03 +0000)] 
Fix some HReg/UInt mixups, spotted by Florian.

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

13 years agoImprove help message.
Florian Krohm [Thu, 24 Jan 2013 21:32:32 +0000 (21:32 +0000)] 
Improve help message.

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

13 years agoRemove two unused variables that sneaked in in r2657.
Florian Krohm [Thu, 24 Jan 2013 17:02:34 +0000 (17:02 +0000)] 
Remove two unused variables that sneaked in in r2657.

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

13 years agoFix HReg <--> UInt mixup.
Florian Krohm [Thu, 24 Jan 2013 16:18:48 +0000 (16:18 +0000)] 
Fix HReg <--> UInt mixup.
vreg is a HReg, so we should not assign a hregNumber() to it.
Introduce and use vregno instead.

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

13 years agos390: Fix HReg <--> UInt mixups.
Florian Krohm [Thu, 24 Jan 2013 15:55:52 +0000 (15:55 +0000)] 
s390: Fix HReg <--> UInt mixups.

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

13 years agoFix some HReg/UInt mixups spotted by Florian.
Julian Seward [Thu, 24 Jan 2013 08:55:25 +0000 (08:55 +0000)] 
Fix some HReg/UInt mixups spotted by Florian.

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

13 years agoFix HReg <--> integer mixup. vreg2ireg returns an HReg not an integer.
Florian Krohm [Thu, 24 Jan 2013 04:59:49 +0000 (04:59 +0000)] 
Fix HReg <--> integer mixup. vreg2ireg returns an HReg not an integer.

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

13 years agoFix HReg <--> Uint mixup. iregNo returns an integer not a HReg.
Florian Krohm [Thu, 24 Jan 2013 04:58:11 +0000 (04:58 +0000)] 
Fix HReg <--> Uint mixup.  iregNo returns an integer not a HReg.

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

13 years agoUpdate list of ignored files.
Florian Krohm [Thu, 24 Jan 2013 03:26:48 +0000 (03:26 +0000)] 
Update list of ignored files.

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

13 years agoTweak script; ignore some more opcodes.
Florian Krohm [Thu, 24 Jan 2013 03:21:12 +0000 (03:21 +0000)] 
Tweak script; ignore some more opcodes.

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

13 years agoAvoid doing a useless system call in scheduler sanity check
Philippe Waroquiers [Wed, 23 Jan 2013 22:19:36 +0000 (22:19 +0000)] 
Avoid doing a useless system call in scheduler sanity check

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

13 years agoImplement the gdbsrv monitor command v.do expensive_sanity_check_general
Philippe Waroquiers [Wed, 23 Jan 2013 22:10:28 +0000 (22:10 +0000)] 
Implement the gdbsrv monitor command  v.do expensive_sanity_check_general
(useful to check the sanity of valgrind on request and/or from GDB,
when an error is reported by the tool).
Also re-order the NEWS entries to put the internals things after
the user level new functions.

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

13 years agoensure nightly reports the GDB version
Philippe Waroquiers [Wed, 23 Jan 2013 21:46:22 +0000 (21:46 +0000)] 
ensure nightly reports the GDB version
Useful to investigate the behaviour of gdbsrv tests

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

13 years agoUnreachable default case should vassert.
Florian Krohm [Wed, 23 Jan 2013 17:17:22 +0000 (17:17 +0000)] 
Unreachable default case should vassert.

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

13 years agoFix implementation of the DFP integer operands.
Carl Love [Tue, 22 Jan 2013 20:26:34 +0000 (20:26 +0000)] 
Fix implementation of the DFP integer operands.

The implementation of integer operands doesn't really match the documentation
for the Iop. Take for example Iop_ExtractExpD64. It is documented as
D64 -> I64 but the implementation of the UNARY is defined as
UNARY(Ity_D64, Ity_D64). The result is an integer that is stored in an integer
format in a floating point register. On the IBM s390 however, the architecture
stores the integer value in a general purpose register (GPR) not a floating
point register. This issue exists with the implementation of 11 Iops where the
PPC implementation has either a source or destination whose value is an integer
but the value is stored in a floating point register in an integer format. After
reviewing the PPC implementation with the s390 developer, it was agreed the
cleanest way to fix this is to change the PPC implementation. The BINOP will be
changed to be consistent with the Iop description. This means the PPC
instruction implementation of the PPC instruction in guest_ppc_toIR.c will need
to reinterpret integer source operands as integers which will move the value
from a floating point register to an integer register before calling binop().
The underlying PPC implementation of the unop() for the specific Iop will also
need to change to move the value from the integer register back to the floating
point register so the native instruction can be issued with the integer value
in a floating point register. It was decided that making the changed in PPC,
rather then having the s390 reinterpret integers as DFP and then move the value
back to an integer register, was preferable as it makes the implementation of
the unop(), binops(), triop() consistent with the definition of the Iop.

This patch also includes the needed changes for the vbit tester.  The Iop
definitions in memcheck/tests/vbit-test/util.c had to be updated to be consitent
with the changes in the Iops as documented below.  Also, the function mkLazy3()
in memcheck/mc_translate.c had to be updated to handle the I32 x I8 x I64 -> I64
and I32 x I8 x I128 -> I128 cases.

The specific list of changes are as follows:

Iop name in pub/libvex_ir.h
   documented type
     type of UNARY/BINARY/TERNARY in priv/ir_defs.c
-------------------------------------------------------

Iop_ExtractExpD64
   D64 -> I64
      UNARY(Ity_D64, Ity_D64); (current)
      UNARY(Ity_D64, Ity_I64); (fix)

Iop_ExtractExpD128
   D128 -> I64
       UNARY(Ity_D128, Ity_D64); (current)
       UNARY(Ity_D128, Ity_I64); (fix)

Iop_InsertExpD64
   I64 x I64 -> D64
   I64 x D64 -> D64 (fix definition)
       BINARY(Ity_D64,Ity_D64, Ity_D64); (current)
       BINARY(Ity_I64,Ity_D64, Ity_D64); (fix)

Iop_InsertExpD128
    I64 x I128 -> D128
    I64 x D128 -> D128 (fix definition)
        BINARY(Ity_D64,Ity_D128, Ity_D128); (current)
        BINARY(Ity_I64,Ity_D128, Ity_D128); (fix)

Iop_I64StoD128
    I64S -> D128
        UNARY(Ity_D64, Ity_D128); (current)
        UNARY(Ity_I64, Ity_D128); (fix)

Iop_D64toI64S
    IRRoundingModeDFP(I32) x D64 -> I64
        BINARY(ity_RMode, Ity_D64, Ity_D64) (current)
        BINARY(ity_RMode, Ity_D64, Ity_I64) (fix)

Iop_D128toI64S
    IRRoundingModeDFP(I32) x D128 -> I64
        BINARY(ity_RMode, Ity_D128, Ity_D64); (current)
        BINARY(ity_RMode, Ity_D128, Ity_I64); (fix)

Iop_I64StoD64
    IRRoundingModeDFP(I32) x I64 -> D64
        BINARY(ity_RMode, Ity_D64, Ity_D64); (current)
        BINARY(ity_RMode, Ity_I64, Ity_D64); (fix)

Iop_SignificanceRoundD64
    IRRoundingModeDFP(I32) x I8 x D64 -> D64
        TERNARY(ity_RMode,Ity_D64,Ity_D64, Ity_D64); (current)
        TERNARY(ity_RMode,Ity_I8,Ity_D64, Ity_D64); (fix)

Iop_SignificanceRoundD128
    IRRoundingModeDFP(I32) x I8 x D128 -> D128
         TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128); (current)
         TERNARY(ity_RMode,Ity_I8,Ity_D128, Ity_D128); (fix)

The patch is for bugzilla 311100
VEX Committed revision 2652

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

13 years agoFix implementation of the DFP integer operands.
Carl Love [Tue, 22 Jan 2013 20:25:31 +0000 (20:25 +0000)] 
Fix implementation of the DFP integer operands.

The implementation of integer operands doesn't really match the documentation
for the Iop. Take for example Iop_ExtractExpD64. It is documented as
D64 -> I64 but the implementation of the UNARY is defined as
UNARY(Ity_D64, Ity_D64). The result is an integer that is stored in an integer
format in a floating point register. On the IBM s390 however, the architecture
stores the integer value in a general purpose register (GPR) not a floating
point register. This issue exists with the implementation of 11 Iops where the
PPC implementation has either a source or destination whose value is an integer
but the value is stored in a floating point register in an integer format. After
reviewing the PPC implementation with the s390 developer, it was agreed the
cleanest way to fix this is to change the PPC implementation. The BINOP will be
changed to be consistent with the Iop description. This means the PPC
instruction implementation of the PPC instruction in guest_ppc_toIR.c will need
to reinterpret integer source operands as integers which will move the value
from a floating point register to an integer register before calling binop().
The underlying PPC implementation of the unop() for the specific Iop will also
need to change to move the value from the integer register back to the floating
point register so the native instruction can be issued with the integer value
in a floating point register. It was decided that making the changed in PPC,
rather then having the s390 reinterpret integers as DFP and then move the value
back to an integer register, was preferable as it makes the implementation of
the unop(), binops(), triop() consistent with the definition of the Iop.

This patch also includes the needed changes for the vbit tester.  The Iop
definitions in memcheck/tests/vbit-test/util.c had to be updated to be consitent
with the changes in the Iops as documented below.  Also, the function mkLazy3()
in memcheck/mc_translate.c had to be updated to handle the I32 x I8 x I64 -> I64
and I32 x I8 x I128 -> I128 cases.

The specific list of changes are as follows:

Iop name in pub/libvex_ir.h
   documented type
     type of UNARY/BINARY/TERNARY in priv/ir_defs.c
-------------------------------------------------------

Iop_ExtractExpD64
   D64 -> I64
      UNARY(Ity_D64, Ity_D64); (current)
      UNARY(Ity_D64, Ity_I64); (fix)

Iop_ExtractExpD128
   D128 -> I64
       UNARY(Ity_D128, Ity_D64); (current)
       UNARY(Ity_D128, Ity_I64); (fix)

Iop_InsertExpD64
   I64 x I64 -> D64
   I64 x D64 -> D64 (fix definition)
       BINARY(Ity_D64,Ity_D64, Ity_D64); (current)
       BINARY(Ity_I64,Ity_D64, Ity_D64); (fix)

Iop_InsertExpD128
    I64 x I128 -> D128
    I64 x D128 -> D128 (fix definition)
        BINARY(Ity_D64,Ity_D128, Ity_D128); (current)
        BINARY(Ity_I64,Ity_D128, Ity_D128); (fix)

Iop_I64StoD128
    I64S -> D128
        UNARY(Ity_D64, Ity_D128); (current)
        UNARY(Ity_I64, Ity_D128); (fix)

Iop_D64toI64S
    IRRoundingModeDFP(I32) x D64 -> I64
        BINARY(ity_RMode, Ity_D64, Ity_D64) (current)
        BINARY(ity_RMode, Ity_D64, Ity_I64) (fix)

Iop_D128toI64S
    IRRoundingModeDFP(I32) x D128 -> I64
        BINARY(ity_RMode, Ity_D128, Ity_D64); (current)
        BINARY(ity_RMode, Ity_D128, Ity_I64); (fix)

Iop_I64StoD64
    IRRoundingModeDFP(I32) x I64 -> D64
        BINARY(ity_RMode, Ity_D64, Ity_D64); (current)
        BINARY(ity_RMode, Ity_I64, Ity_D64); (fix)

Iop_SignificanceRoundD64
    IRRoundingModeDFP(I32) x I8 x D64 -> D64
        TERNARY(ity_RMode,Ity_D64,Ity_D64, Ity_D64); (current)
        TERNARY(ity_RMode,Ity_I8,Ity_D64, Ity_D64); (fix)

Iop_SignificanceRoundD128
    IRRoundingModeDFP(I32) x I8 x D128 -> D128
         TERNARY(ity_RMode,Ity_D128,Ity_D128, Ity_D128); (current)
         TERNARY(ity_RMode,Ity_I8,Ity_D128, Ity_D128); (fix)

The patch is for bugzilla 311100

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

13 years agos390: Remove unreachable break statements.
Florian Krohm [Tue, 22 Jan 2013 14:02:05 +0000 (14:02 +0000)] 
s390: Remove unreachable break statements.
Spotted and fixed by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

13 years agos390: Pedantic cleanups by Maran.
Florian Krohm [Tue, 22 Jan 2013 13:59:54 +0000 (13:59 +0000)] 
s390: Pedantic cleanups by Maran.

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

13 years agoMake sure the variable is completely initialised. That's good
Florian Krohm [Tue, 22 Jan 2013 00:25:05 +0000 (00:25 +0000)] 
Make sure the variable is completely initialised. That's good
practice and also silences a complaint from the Coverity checker.

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

13 years agoFix NULL dereference if no integer arg given to monitor block_list cmd
Philippe Waroquiers [Mon, 21 Jan 2013 22:05:47 +0000 (22:05 +0000)] 
Fix NULL dereference if no integer arg given to monitor block_list cmd
Reported by Florian (spotted by coverity).

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

13 years agoRemove pointless test. vts->ts is an array and cannot be NULL.
Florian Krohm [Mon, 21 Jan 2013 20:38:54 +0000 (20:38 +0000)] 
Remove pointless test. vts->ts is an array and cannot be NULL.

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

13 years agoRemove unneeded test. "info" cannot be NULL here as it was dereferenced
Florian Krohm [Mon, 21 Jan 2013 20:29:54 +0000 (20:29 +0000)] 
Remove unneeded test. "info" cannot be NULL here as it was dereferenced
previously. Spotted by Coverity's checker.

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

13 years ago The 32-bit DFP value is stored in a 64-bit register in
Carl Love [Mon, 21 Jan 2013 18:12:31 +0000 (18:12 +0000)] 
 The 32-bit DFP value is stored in a 64-bit register in
 ppc. The D32 to D64 and D64 to D32 definitions for the
 Iop type was specified in VEX/priv/ir_defs.c, function
 typeOfPrimop() as:

   case Iop_D32toD64:
      UNARY(Ity_64, Ity_D64);
   case Iop_D64toD32:
      BINARY(ity_RMode, Ity_D64, Ity_D64);

since the values resided in a 64-bit register. As part of the s390 DFP support
the definitions were changed to:

   case Iop_D32toD64:
      UNARY(Ity_32, Ity_D64);
   case Iop_D64toD32:
      BINARY(ity_RMode, Ity_D64, Ity_D32);

to reflect what they really should be. However, this broke the ppc
implementation. Valgrind would fail and report a mismatch on the types as the
ppc code was using a D64 instead of a D32.

This patch adds support for fetching and storing the Dfp32 operand as a 32-bit
value.  The support includes adding the functions iselDfp32Expr() and
iselDfp32Expr_wrk() and additional code to support the DFP32 bit iops.

This patch is for Bugzilla 312620.

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

13 years agos390: Add another testcase for DFP insns.
Florian Krohm [Mon, 21 Jan 2013 15:39:44 +0000 (15:39 +0000)] 
s390: Add another testcase for DFP insns.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

13 years agoReplace bcopy on linux as, at least in 32 bit build, glibc will
Tom Hughes [Mon, 21 Jan 2013 15:17:02 +0000 (15:17 +0000)] 
Replace bcopy on linux as, at least in 32 bit build, glibc will
sometimes choose to use an optimised version. Fixes #311407.

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

13 years agoFix two asserts that Coverity's checker diagnosed as having side effects.
Florian Krohm [Mon, 21 Jan 2013 13:51:21 +0000 (13:51 +0000)] 
Fix two asserts that Coverity's checker diagnosed as having side effects.

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

13 years agoxen: Add a missing break to the handling of XEN_DOMCTL_max_vcpus
Florian Krohm [Mon, 21 Jan 2013 13:46:57 +0000 (13:46 +0000)] 
xen: Add a missing break to the handling of XEN_DOMCTL_max_vcpus
found by Coverity's checker.
Also fix another missing break XEN_SYSCTL_numainfo found by via a
by-eye check. This one is at the end of the switch so it is benign.
Patch by Ian Campbell <ian.campbell@citrix.com>.

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

13 years agoIn mc_translate a NULL guard expression is sometimes passed around
Florian Krohm [Mon, 21 Jan 2013 01:27:22 +0000 (01:27 +0000)] 
In mc_translate a NULL guard expression is sometimes passed around
functions to indicate a "true" expression. That caused some confusion
and led people to believe believe, that IRDirty::guard could be NULL.
It cannot.
This confusion was indirectly spotted by coverity's checker who figured
out that IRDirty::guard was sometimes unconditionally dereferenced
and sometimes compared against NULL.
Cleaning this up...

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

13 years agomips: fix link_tool_exe_linux issue for different mips architectures
Petar Jovanovic [Mon, 21 Jan 2013 01:01:13 +0000 (01:01 +0000)] 
mips: fix link_tool_exe_linux issue for different mips architectures

One issue has been reported on the mailing list by Ilya Smelykh, and the second
issue has been found in development for MIPS64.
The change modifies the way we detect target-arch by reading host_cpu from
config.log rather than asking the toolchain.

Also, for MIPS64, we use:

--section-start=.MIPS.options=$ala

while for o32 we still use:

--section-start=.reginfo=$ala

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

13 years agomips: fixing issues spotted by a static code analysis tool
Petar Jovanovic [Sun, 20 Jan 2013 23:13:14 +0000 (23:13 +0000)] 
mips: fixing issues spotted by a static code analysis tool

Florian ran a static code analysis tool and found the issues.
Cleaning out old cruft now.

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

13 years agomips: additional test case for fix in VEX r2648
Petar Jovanovic [Sun, 20 Jan 2013 18:27:39 +0000 (18:27 +0000)] 
mips: additional test case for fix in VEX r2648

Test program that triggers different corner cases related to position of
branch instruction and max size of a translation block (60 instructions).
Fix for these issues has been submitted in r2648.

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

13 years agomips: fix for mips-disassembler when branch is at block_size-2 position
Petar Jovanovic [Sun, 20 Jan 2013 18:16:45 +0000 (18:16 +0000)] 
mips: fix for mips-disassembler when branch is at block_size-2 position

Check if the last instruction in the block is a branch or jump instruction
should happen only if the disassembler was not already stopped.
Incorrect conditional led to a boundary case in which jumps/branches were not
executed when placed on "max_insns - 2" position in the block.
none/tests/mips32/block_size test will be added to Valgrind to describe the case
and check for regressions in future.

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

13 years agoAdd documentation for VALGRIND_MONITOR_COMMAND client request
Philippe Waroquiers [Sun, 20 Jan 2013 17:46:19 +0000 (17:46 +0000)] 
Add documentation for VALGRIND_MONITOR_COMMAND client request

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

13 years agoImplement --merge-recursive-frames + provide VALGRIND_MONITOR_COMMAND client req.
Philippe Waroquiers [Sun, 20 Jan 2013 17:11:58 +0000 (17:11 +0000)] 
Implement --merge-recursive-frames + provide VALGRIND_MONITOR_COMMAND client req.

In a big applications, some recursive algorithms have created
hundreds of thousands of stacktraces, taking a lot of memory.

Option --merge-recursive-frames=<number> tells Valgrind to
detect and merge (collapse) recursive calls when recording stack traces.
The value is changeable using the monitor command
'v.set merge-recursive-frames'.

Also, this provides a new client request: VALGRIND_MONITOR_COMMAND
allowing to execute a gdbsrv monitor command from the client
program.

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

13 years agoFold out an expression which is always False. Spotted by Florian using Coverity.
Julian Seward [Sun, 20 Jan 2013 11:39:52 +0000 (11:39 +0000)] 
Fold out an expression which is always False.  Spotted by Florian using Coverity.

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

13 years agoRemove a bit of dead code, spotted by Florian using Coverity.
Julian Seward [Sun, 20 Jan 2013 11:38:43 +0000 (11:38 +0000)] 
Remove a bit of dead code, spotted by Florian using Coverity.

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

13 years agoImprove the tree builder in IR optimisation. Allow load expressions to be
Florian Krohm [Sun, 20 Jan 2013 03:51:04 +0000 (03:51 +0000)] 
Improve the tree builder in IR optimisation. Allow load expressions to be
moved past Put/I statements and dirty helpers, when it is safe to do so.
It is safe, when the statement does not require exact memory exceptions.
New functions stmt_modifies_guest_state and dirty_helper_puts have been
added to determine the side effect on the guest state.
This optimisation enables the use of  memory-to-memory insns on
architectures that have those.

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

13 years agos390: Fix a type mixup spotted by IBM's BEAM checker.
Florian Krohm [Sun, 20 Jan 2013 03:08:04 +0000 (03:08 +0000)] 
s390: Fix a type mixup spotted by IBM's BEAM checker.

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

13 years agoFix buffer overrun due to copy paste from x86 to amd64.
Philippe Waroquiers [Sat, 19 Jan 2013 21:08:27 +0000 (21:08 +0000)] 
Fix buffer overrun due to copy paste from x86 to amd64.
Detected by Florian (using coverity tool).

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

13 years agoxen: add a missing break to the handling of XEN_DOMCTL_getdomaininfo
Bart Van Assche [Sat, 19 Jan 2013 13:22:54 +0000 (13:22 +0000)] 
xen: add a missing break to the handling of XEN_DOMCTL_getdomaininfo

Thanks to Florian Krohm

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

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

13 years agoFix warning in perm_malloc (reported by Florian)
Philippe Waroquiers [Sat, 19 Jan 2013 10:33:45 +0000 (10:33 +0000)] 
Fix warning in perm_malloc (reported by Florian)

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

13 years agoFix a comment. Spotted by Maran.
Florian Krohm [Sat, 19 Jan 2013 02:50:41 +0000 (02:50 +0000)] 
Fix a comment. Spotted by Maran.

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

13 years agoFix statement order. Found by Coverity's checker.
Florian Krohm [Sat, 19 Jan 2013 02:27:41 +0000 (02:27 +0000)] 
Fix statement order. Found by Coverity's checker.

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

13 years agoImport from memcheck land, a less ludicrously inefficient
Julian Seward [Fri, 18 Jan 2013 12:51:15 +0000 (12:51 +0000)] 
Import from memcheck land, a less ludicrously inefficient
implementation of memcpy, which copies words at a time rather than
just bytes.

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

13 years agoAdd an implementation of memset() that costs half as much on 64 bit
Julian Seward [Fri, 18 Jan 2013 11:01:53 +0000 (11:01 +0000)] 
Add an implementation of memset() that costs half as much on 64 bit
platforms.  (But why are we intercepting memset anyway?  It makes no
sense to me.)

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

13 years agoImplement a more efficient allocation of small blocks which are never freed.
Philippe Waroquiers [Fri, 18 Jan 2013 06:19:49 +0000 (06:19 +0000)] 
Implement a more efficient allocation of small blocks which are never freed.
This generalises the "perm_malloc" function which was in ms_main.c
The new VG_(perm_malloc) is used in ms_main.c
and for execontext : when there are a lot of execontext, this
can save significant memory.

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

13 years agoAdd a vg_alignof macro
Philippe Waroquiers [Fri, 18 Jan 2013 06:15:44 +0000 (06:15 +0000)] 
Add a vg_alignof macro

Note that this macro behaves slightly differently for some types
from the gcc __alignof__ and from the equivalent (new) standardised
alignof.

vg_alignof macro is needed for the "perm_malloc" callers (next commit)
to determine the alignment of small blocks, but might be useful
for other purposes => placed in libvex_basictypes.h, close to offsetof.

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

13 years agoChange the size of the hash table used to cache IP -> debuginfo to a prime nr
Philippe Waroquiers [Thu, 17 Jan 2013 23:57:35 +0000 (23:57 +0000)] 
Change the size of the hash table used to cache IP -> debuginfo to a prime nr

This change is based on rumours/legends/oral transmission of experience/...
that prime nrs are good to use for hash table size :).

If someone has a (short) explanation about why this is useful,
that will be welcome.

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

13 years agoMerge, from branches/COMEM, revisions 13139 to 13235.
Julian Seward [Thu, 17 Jan 2013 14:24:35 +0000 (14:24 +0000)] 
Merge, from branches/COMEM, revisions 13139 to 13235.

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

13 years agoMerge, from branches/COMEM, revisions 2568 to 2641.
Julian Seward [Thu, 17 Jan 2013 14:23:53 +0000 (14:23 +0000)] 
Merge, from branches/COMEM, revisions 2568 to 2641.

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

13 years agomips32 equivalent to r2636: fix up the mips32 back end to be in sync
Julian Seward [Wed, 16 Jan 2013 22:11:13 +0000 (22:11 +0000)] 
mips32 equivalent to r2636: fix up the mips32 back end to be in sync
with infrastructural changes w.r.t. conditional dirty helpers that
return values.  Does not actually handle such cases since the mips32
front end does not generate them.

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

13 years agoSmall comment fix: .h specifies "all frames", implementation uses 8.
Philippe Waroquiers [Wed, 16 Jan 2013 22:07:02 +0000 (22:07 +0000)] 
Small comment fix: .h specifies "all frames", implementation uses 8.
Two fixes could be done:
Either we fix the comments
or we increase N_FRAMES to be rather VG_DEEPEST_BACKTRACE.

We fix the comment for the following reason:
This is (at least for the moment) not performance critical.
as this is only called when an error is reported.
However, searching for local vars is extremely costly.
It is unlikely that an error is reported for a stack variable
which is more than 8 frames deeper than theframe in which
it is detected.

So, fix the comment, waiting for a complaint that a deeper
variable is not properly described.

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