]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoKludge around a compiler warning, and add explanatory comment.
Julian Seward [Sat, 21 Apr 2012 22:33:44 +0000 (22:33 +0000)] 
Kludge around a compiler warning, and add explanatory comment.

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

14 years ago(post-tchain-merge cleanup): Use ASI and AGSI for increment / decrement if
Florian Krohm [Sat, 21 Apr 2012 16:06:04 +0000 (16:06 +0000)] 
(post-tchain-merge cleanup): Use ASI and AGSI for increment / decrement if
available.

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

14 years ago(post-tchain-merge cleanup): Tighten up some asserts.
Florian Krohm [Sat, 21 Apr 2012 15:53:13 +0000 (15:53 +0000)] 
(post-tchain-merge cleanup): Tighten up some asserts.

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

14 years agoSet VEX_HWCAPS_S390X_STFLE if available.
Florian Krohm [Sat, 21 Apr 2012 15:43:25 +0000 (15:43 +0000)] 
Set VEX_HWCAPS_S390X_STFLE if available.
This should have been part of r12335.

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

14 years agoFix debug print for hwcaps adding stfle ad etf2.
Florian Krohm [Sat, 21 Apr 2012 15:41:51 +0000 (15:41 +0000)] 
Fix debug print for hwcaps adding stfle ad etf2.
Add VEX_HWCAPS_S390X_STFLE. This should have been part of r2237.

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

14 years ago(post-tchain-merge cleanup): fix call to handle_syscall on x86-darwin.
Julian Seward [Sat, 21 Apr 2012 15:35:12 +0000 (15:35 +0000)] 
(post-tchain-merge cleanup): fix call to handle_syscall on x86-darwin.

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

14 years ago(post-tchain-merge cleanup): x86: handle a couple more syscall kinds
Julian Seward [Sat, 21 Apr 2012 15:34:25 +0000 (15:34 +0000)] 
(post-tchain-merge cleanup): x86: handle a couple more syscall kinds
needed on x86-darwin.

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

14 years agoFix assertion failure on x86-darwin following r12504 (pread fix)
Julian Seward [Sat, 21 Apr 2012 15:33:26 +0000 (15:33 +0000)] 
Fix assertion failure on x86-darwin following r12504 (pread fix)

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

14 years ago(post-tchain-merge cleanup): un-break the build on OSX by fixing up
Julian Seward [Sat, 21 Apr 2012 13:55:28 +0000 (13:55 +0000)] 
(post-tchain-merge cleanup): un-break the build on OSX by fixing up
the dispatcher code accordingly.

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

14 years agochainXDirect_ARM: generate direct jumps when possible.
Julian Seward [Sat, 21 Apr 2012 10:47:41 +0000 (10:47 +0000)] 
chainXDirect_ARM: generate direct jumps when possible.

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

14 years agoUpdate.
Julian Seward [Sat, 21 Apr 2012 08:18:33 +0000 (08:18 +0000)] 
Update.

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

14 years agoAin_XDirect, Ain_XIndir: use short form encodings where possible.
Julian Seward [Sat, 21 Apr 2012 08:18:02 +0000 (08:18 +0000)] 
Ain_XDirect, Ain_XIndir: use short form encodings where possible.

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

14 years ago(post-tchain-merge cleanup) remove temp supporting hack "IRStmt_Exit3"
Julian Seward [Sat, 21 Apr 2012 07:39:02 +0000 (07:39 +0000)] 
(post-tchain-merge cleanup) remove temp supporting hack "IRStmt_Exit3"

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

14 years ago(post-tchain-merge cleanup) Stop x86/amd64 asserting on illegal insns.
Julian Seward [Sat, 21 Apr 2012 07:38:29 +0000 (07:38 +0000)] 
(post-tchain-merge cleanup) Stop x86/amd64 asserting on illegal insns.

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

14 years agoComment update (was moved to t-chaining-notes.txt)
Julian Seward [Sat, 21 Apr 2012 07:37:21 +0000 (07:37 +0000)] 
Comment update (was moved to t-chaining-notes.txt)

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

14 years agoWe incorrectly stored the archinfo_host argument of iselSB_S390 into
Florian Krohm [Sat, 21 Apr 2012 03:34:54 +0000 (03:34 +0000)] 
We incorrectly stored the archinfo_host argument of iselSB_S390 into
a global variable not realising it points to a stack-allocated variable.
This caused s390_archinfo_host->hwcaps member to change its value
randomly over time. It could have caused invalid code to be generated.
Curious that it did not surface.

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

14 years agoUpdate, post-merge.
Julian Seward [Sat, 21 Apr 2012 00:27:56 +0000 (00:27 +0000)] 
Update, post-merge.

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

14 years agoMerge branches/TCHAIN from r12476 (its creation point) into trunk.
Julian Seward [Fri, 20 Apr 2012 23:58:55 +0000 (23:58 +0000)] 
Merge branches/TCHAIN from r12476 (its creation point) into trunk.

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

14 years agoMerge branches/TCHAIN from r2271 (its creation point) into trunk.
Julian Seward [Fri, 20 Apr 2012 23:58:17 +0000 (23:58 +0000)] 
Merge branches/TCHAIN from r2271 (its creation point) into trunk.

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

14 years agoAdd a spec rule for NE after COPY.
Julian Seward [Fri, 20 Apr 2012 22:33:44 +0000 (22:33 +0000)] 
Add a spec rule for NE after COPY.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2295

14 years agoComment-only change.
Julian Seward [Fri, 20 Apr 2012 22:32:34 +0000 (22:32 +0000)] 
Comment-only change.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2294

14 years agoAdd a missing included, needed for ppc targets.
Julian Seward [Fri, 20 Apr 2012 15:42:12 +0000 (15:42 +0000)] 
Add a missing included, needed for ppc targets.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12516

14 years agoAvoid word-size warnings when this is compiled on 64 bit platforms.
Julian Seward [Fri, 20 Apr 2012 15:41:33 +0000 (15:41 +0000)] 
Avoid word-size warnings when this is compiled on 64 bit platforms.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2293

14 years agoImplement accept4 on ARM systems.
Tom Hughes [Fri, 20 Apr 2012 14:07:34 +0000 (14:07 +0000)] 
Implement accept4 on ARM systems.

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

14 years agoChanges needed to make t-chaining work on ppc64-linux (valgrind side).
Julian Seward [Fri, 20 Apr 2012 10:43:08 +0000 (10:43 +0000)] 
Changes needed to make t-chaining work on ppc64-linux (valgrind side).

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12514

14 years agoChanges to make t-chaining work on ppc64-linux. More fun than a
Julian Seward [Fri, 20 Apr 2012 10:42:24 +0000 (10:42 +0000)] 
Changes to make t-chaining work on ppc64-linux.  More fun than a
bathtub full of ferrets.  (VEX side)

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2292

14 years agoMinor non-functional tweak.
Florian Krohm [Fri, 20 Apr 2012 02:50:28 +0000 (02:50 +0000)] 
Minor non-functional tweak.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2291

14 years agoFill in some more bits to do with t-chaining for ppc64
Julian Seward [Fri, 20 Apr 2012 02:19:35 +0000 (02:19 +0000)] 
Fill in some more bits to do with t-chaining for ppc64
(still doesn't work) (Valgrind side)

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12513

14 years agoFill in some more bits to do with t-chaining for ppc64
Julian Seward [Fri, 20 Apr 2012 02:18:31 +0000 (02:18 +0000)] 
Fill in some more bits to do with t-chaining for ppc64
(still doesn't work) (VEX side)

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2290

14 years agoAdd translation chaining support for ppc32 (tested) and to
Julian Seward [Fri, 20 Apr 2012 00:14:02 +0000 (00:14 +0000)] 
Add translation chaining support for ppc32 (tested) and to
a large extent for ppc64 (incomplete, untested) (Valgrind side)

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12512

14 years agoAdd translation chaining support for ppc32 (tested) and to
Julian Seward [Fri, 20 Apr 2012 00:13:28 +0000 (00:13 +0000)] 
Add translation chaining support for ppc32 (tested) and to
a large extent for ppc64 (incomplete, untested) (VEX side)

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2289

14 years agoMention running with --profile-flags.
Florian Krohm [Thu, 19 Apr 2012 22:38:24 +0000 (22:38 +0000)] 
Mention running with --profile-flags.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12511

14 years agoWire up epoll_create1 on ARM systems.
Tom Hughes [Thu, 19 Apr 2012 14:54:30 +0000 (14:54 +0000)] 
Wire up epoll_create1 on ARM systems.

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

14 years agoCorrectly update the guest IA at the end of an insn to point to
Florian Krohm [Thu, 19 Apr 2012 14:23:48 +0000 (14:23 +0000)] 
Correctly update the guest IA at the end of an insn to point to
the next insn, not the current one.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2288

14 years agoscheduler, ticket lock: Add memory barriers necessary to avoid a deadlock on PowerPC...
Bart Van Assche [Thu, 19 Apr 2012 11:00:32 +0000 (11:00 +0000)] 
scheduler, ticket lock: Add memory barriers necessary to avoid a deadlock on PowerPC systems

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

14 years ago... and set $(BOOST_LIBS) properly again.
Bart Van Assche [Wed, 18 Apr 2012 18:42:34 +0000 (18:42 +0000)] 
... and set $(BOOST_LIBS) properly again.

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

14 years agoconfigure.in: Fix detection of Boost libraries. Reported by <plug.gulp@gmail.com>.
Bart Van Assche [Wed, 18 Apr 2012 18:34:22 +0000 (18:34 +0000)] 
configure.in: Fix detection of Boost libraries. Reported by <plug.gulp@gmail.com>.

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

14 years agoMore fixes:
Florian Krohm [Tue, 17 Apr 2012 02:41:56 +0000 (02:41 +0000)] 
More fixes:
- A few dummy_put_IA's were missing, causing asserts to fire.
  Mostly for the "load/store conditional" kind of insns
- EX needed some finishing touches
- Assignments to irsb->next are forbidden. We had a few in the "special
  opcodes" section. Now fixed, I hope.
With this patch most regressions run through. I see 3 failures in none
and a few more in the memcheck bucket.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2287

14 years agoadd some .globl or used attribute to avoid link failures with gold linker + LTO
Philippe Waroquiers [Mon, 16 Apr 2012 22:06:47 +0000 (22:06 +0000)] 
add some .globl or used attribute to avoid link failures with gold linker + LTO

When doing experiment with gcc 4.7.0 and link time optimisation,
encountered link failures on amd64 which were solved by adding
.globl and used attribute.
=> added .globl in similar places for arm/x86/ppc32/s390.
Did not touch darwin (which asm seems somewhat different).

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

14 years agoChange permission mask for FIFOs and shared memory to 0600 instead of 0666
Philippe Waroquiers [Sun, 15 Apr 2012 21:20:52 +0000 (21:20 +0000)] 
Change permission mask for FIFOs and shared memory to 0600 instead of 0666
Following a discussion about which user can debug which VAlgrind gdbserver:
The default umask will remove the "other" and "group" write bits.
Without the w bits, nothing works in any case.
Moreover, if the vgdb process does not belong to the user running the
V gdbserver, connections are also not possible.
=> remove useless/confusing bits.

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

14 years agoFix s390_tchain_patch_load64; some bytes were mixed up.
Florian Krohm [Sun, 15 Apr 2012 04:11:07 +0000 (04:11 +0000)] 
Fix s390_tchain_patch_load64; some bytes were mixed up.
Fix unchainXDirect_S390; modified place_to_unchain address
before patching the code there.
Add some convenience functions for insn verification in
chain/unchain machinery.
Avoid magic constants.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2286

14 years agoMake the list of handled jump kinds the same in s390_isel_stmt
Florian Krohm [Sat, 14 Apr 2012 20:35:17 +0000 (20:35 +0000)] 
Make the list of handled jump kinds the same in s390_isel_stmt
and iselNext.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2285

14 years agoNo idea what happened here. Fixed as obvious.
Florian Krohm [Sat, 14 Apr 2012 16:22:26 +0000 (16:22 +0000)] 
No idea what happened here. Fixed as obvious.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2284

14 years agopatch fixing 297991: mmap changing a file descriptor current position
Philippe Waroquiers [Fri, 13 Apr 2012 23:07:29 +0000 (23:07 +0000)] 
patch fixing 297991: mmap changing a file descriptor current position

Bug caused by the following problem:
for each mmap, Valgrind reads the 1st 1024 bytes to detect
if this is an mmap-ed file containing debug info to decode.

Reading this 1Kb is done with VG_(pread). VG_(pread) should be
the equivalent of syscall pread but on linux, it is implemented as
a seek+read.

The patch implements VG_(pread) in terms of the underlying pread syscall.

Test mmap_fcntl_bug.c completed to also verify the fd current position
before and after the mmap.

tested on linux x86/amd64/ppc32/ppc64/s390.
(not tested on Darwin)
(manually tested on arm-android)

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

14 years agoDeal with CLFLUSH, which were not correctly dealt with (w.r.t. new IR
Julian Seward [Fri, 13 Apr 2012 23:03:45 +0000 (23:03 +0000)] 
Deal with CLFLUSH, which were not correctly dealt with (w.r.t. new IR
generation conventions) and caused bb_to_IR.c to assert.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2283

14 years agoNo need to handle Ijk_Sys_int32 which is specific to amd64.
Florian Krohm [Fri, 13 Apr 2012 21:46:57 +0000 (21:46 +0000)] 
No need to handle Ijk_Sys_int32 which is specific to amd64.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2282

14 years agoFirst round of fixes: some cut'n paste errors. And the guest_IA in
Florian Krohm [Fri, 13 Apr 2012 21:14:24 +0000 (21:14 +0000)] 
First round of fixes: some cut'n paste errors. And the guest_IA in
a conditional jump.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2281

14 years agoFix 297992 Support systems missing WIFCONTINUED (e.g. pre-2.6.10 Linux)
Philippe Waroquiers [Fri, 13 Apr 2012 17:27:40 +0000 (17:27 +0000)] 
Fix 297992  Support systems missing WIFCONTINUED (e.g. pre-2.6.10 Linux)

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

14 years agoExtend CSE to cover CSEing of clean helper calls. This gives a
Julian Seward [Fri, 13 Apr 2012 11:42:50 +0000 (11:42 +0000)] 
Extend CSE to cover CSEing of clean helper calls.  This gives a
significant performance improvement in the baseline simulator (20%) on
some pieces of ARM code.

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

14 years agoTranslation chaining for s390. To be debugged.
Florian Krohm [Fri, 13 Apr 2012 04:04:44 +0000 (04:04 +0000)] 
Translation chaining for s390. To be debugged.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12502

14 years agoTranslation chaining for s390. To be debugged.
Florian Krohm [Fri, 13 Apr 2012 04:04:06 +0000 (04:04 +0000)] 
Translation chaining for s390. To be debugged.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2279

14 years agoado_treebuild_BB: don't allow loads to be floated past CASs.
Julian Seward [Thu, 12 Apr 2012 21:05:16 +0000 (21:05 +0000)] 
ado_treebuild_BB: don't allow loads to be floated past CASs.
(why did this ever work before?)

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

14 years agoAdd symlinks that were missed out from r12500 due to last-minute SVN
Julian Seward [Thu, 12 Apr 2012 17:35:15 +0000 (17:35 +0000)] 
Add symlinks that were missed out from r12500 due to last-minute SVN
snafus.

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

14 years agoPOWER Processor decimal floating point instruction support: part 2
Julian Seward [Thu, 12 Apr 2012 17:28:57 +0000 (17:28 +0000)] 
POWER Processor decimal floating point instruction support: part 2
(bug #297497) (Carl Love, carll@us.ibm.com) (Valgrind side, mostly
tests)

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

14 years agoPOWER Processor decimal floating point instruction support: part 2
Julian Seward [Thu, 12 Apr 2012 17:19:48 +0000 (17:19 +0000)] 
POWER Processor decimal floating point instruction support: part 2
(bug #297497) (Carl Love, carll@us.ibm.com) (VEX side)

This commit adds the second set of patches to add decimal floating
point (DFP) support for POWER to Valgrind. Bugzilla 295221 contains
the first set of patches for the adding the POWER support for the DFP
32, 64 and 128-bit sizes. The first set of patches also added support
for the 64 and 128-bit DFP arithmetic instructions and user test code
for the new DFP instructions. The second set of patches, being
submitted in this bugzilla include support for the DFP shift
instructions and format conversion instructions. Specifically, the
list of Power instructions is: dctdp, drsp, dctfix, dcffix, dctqpq,
dctfixq, drdpq, dcffixq, dscri, dscriq, dscli, dscliq.

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

14 years agoTCHAIN: avoid calls to search_transtab and return to scheduer by first using tt_fast
Philippe Waroquiers [Wed, 11 Apr 2012 21:25:37 +0000 (21:25 +0000)] 
TCHAIN: avoid calls to search_transtab and return to scheduer by first using tt_fast
This slightly improves some perf tests (e.g. heap).
Some not explained "real time" slow down of bz2 between trunk/svn tchain
and this patch analyzed with callgrind/cachegrind.
realtime slowdown attributed to Pentium 4 self modifying code unfriendly cache.

(callgrind/cachegrind cache simulation do not understand self modifying
code).

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12499

14 years agoAndroid's libc includes advertise a "malloc_usable_size", but the
Julian Seward [Wed, 11 Apr 2012 08:46:53 +0000 (08:46 +0000)] 
Android's libc includes advertise a "malloc_usable_size", but the
libc.so contains no such symbol; rather a "dlmalloc_usable_size"
(great, huh :-) So intercept that too, on Android.

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

14 years agoAdd a test re conversions of QNaNs between 64- and 80-bit FP
Julian Seward [Wed, 11 Apr 2012 07:12:32 +0000 (07:12 +0000)] 
Add a test re conversions of QNaNs between 64- and 80-bit FP
formats.  Related to Mozilla bug #738117.

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

14 years agoImprove the behaviour of 64-to/from-80 bit QNaN conversions, so that
Julian Seward [Wed, 11 Apr 2012 07:11:28 +0000 (07:11 +0000)] 
Improve the behaviour of 64-to/from-80 bit QNaN conversions, so that
the QNaN produced is "canonical".  SNaN conversions are unchanged
(because I don't have a definition of what a canonical SNaN is)
although there are some comment updates.  Fixes Mozilla bug #738117.

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

14 years agoouter/inner setup: new perf/vg_perf options to run perf tests + support translation...
Philippe Waroquiers [Sun, 8 Apr 2012 19:52:38 +0000 (19:52 +0000)] 
outer/inner setup: new perf/vg_perf options to run perf tests  + support translation chaining in inner.

* perf/vg_perf:
Similarly to tests/vg_regtest, perf/vg_perf now accepts the 3
optional arguments:
    --outer-valgrind
    --outer-tool
    --outer-args

This allows easy analysis or comparison of performance between
different Valgrind versions (e.g. using callgrind, or cachegrind/cg_diff).

* See README_DEVELOPERS for more details.

* vg_regtest modified so as to use the 'in-place' build of inner, rather
  than the installed version.

* added option --smc-check=all-non-file to vg_perf and vg_regtest
  outer default arguments (needed when evaluating a Valgrind which does
  translation chaining).

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

14 years agoDisable test on big-endian platforms.
Florian Krohm [Fri, 6 Apr 2012 14:50:52 +0000 (14:50 +0000)] 
Disable test on big-endian platforms.

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

14 years agoSkip the test if it was not compiled, i.e. dwarf4 is not supported.
Florian Krohm [Fri, 6 Apr 2012 13:54:53 +0000 (13:54 +0000)] 
Skip the test if it was not compiled, i.e. dwarf4 is not supported.

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

14 years agofix off by one in string
Philippe Waroquiers [Fri, 6 Apr 2012 11:51:04 +0000 (11:51 +0000)] 
fix off by one in string

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

14 years agoTCHAIN: remove caused_discard* argument to VG_(translate)
Philippe Waroquiers [Thu, 5 Apr 2012 22:44:36 +0000 (22:44 +0000)] 
TCHAIN: remove caused_discard* argument to VG_(translate)
This is the followup to rev 12488.
With this revision, translation chaining is not done
if the translation with 'from address' is not existing
anymore (discarded or erased).
The assumption documented in 12488 comment has been checked by:
  * first reproduce a crash in Firefox when always setting
    caused discard to False
  * then upgrade to rev 12488
  * with this upgrade, no crash anymore.
=> this verifies that the caused discard logic is properly
replaced by revision 12488.

So, the caused discard logic can be removed.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12492

14 years agoAdd support for reading DWARF4 .debug_types sections. Fixes #284124.
Julian Seward [Thu, 5 Apr 2012 07:55:47 +0000 (07:55 +0000)] 
Add support for reading DWARF4 .debug_types sections.  Fixes #284124.
(Tom Tromey, tromey@redhat.com)

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

14 years agoFix incorrect use of VG_(addToXA). (Tom Tromey <tromey@redhat.com>)
Julian Seward [Thu, 5 Apr 2012 07:15:22 +0000 (07:15 +0000)] 
Fix incorrect use of VG_(addToXA).  (Tom Tromey <tromey@redhat.com>)

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

14 years agoSwitch back optimisation flag back to -O2 by removing the -O
Philippe Waroquiers [Wed, 4 Apr 2012 22:49:27 +0000 (22:49 +0000)] 
Switch back optimisation flag back to -O2 by removing the -O

Note that I believe it is possible to avoid Makefile.all.am
edition for this by using:
   ./configure CFLAGS="-O0 -g"

I think with this, make will mostly compile everything with the given CFLAGS
except the main programs (valgrind, vgdb, ...).

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12489

14 years agoFix assert due to gdbserver discarding translation
Philippe Waroquiers [Wed, 4 Apr 2012 22:44:18 +0000 (22:44 +0000)] 
Fix assert due to gdbserver discarding translation
The fix consists in checking if the translation
of the 'from' address is still existing.

Patch also contains a big comment explaining why it is
safe to discard/erase the current translation being
executed.

In a follow-up patch, the Bool in VG_(translate) will
be removed :
  Bool VG_(translate) ( /*OUT*/Bool* caused_discardP,
(if experiment confirms the hypothesis that it is
safe to discard current translation).

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12488

14 years agoComment-only fix. (Tom Tromey <tromey@redhat.com>)
Julian Seward [Wed, 4 Apr 2012 17:42:02 +0000 (17:42 +0000)] 
Comment-only fix.  (Tom Tromey <tromey@redhat.com>)

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

14 years agoARMin_MFence: implement using ARMv7 insns instead of the legacy mcr-15
Julian Seward [Wed, 4 Apr 2012 14:20:56 +0000 (14:20 +0000)] 
ARMin_MFence: implement using ARMv7 insns instead of the legacy mcr-15
instructions.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2275

14 years agoMake the return type of VG_(disp_run_translations) be void, rather
Julian Seward [Wed, 4 Apr 2012 12:23:23 +0000 (12:23 +0000)] 
Make the return type of VG_(disp_run_translations) be void, rather
than the HWord it was claimed to be.  Inconsistency spotted by
Philippe Waroquiers.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12486

14 years agoAdd %J format to s390_sprintf. New function s390_jump_kind_as_string.
Florian Krohm [Wed, 4 Apr 2012 03:47:33 +0000 (03:47 +0000)] 
Add %J format to s390_sprintf. New function s390_jump_kind_as_string.
Misc tweaks in the neighbourhood.

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

14 years agoAdd support for the move_pages system call. BZ#282790.
Tom Hughes [Tue, 3 Apr 2012 10:51:27 +0000 (10:51 +0000)] 
Add support for the move_pages system call. BZ#282790.

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

14 years agoAdd translation chaining support for amd64, x86 and ARM
Julian Seward [Mon, 2 Apr 2012 21:56:03 +0000 (21:56 +0000)] 
Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484

14 years agoAdd translation chaining support for amd64, x86 and ARM (VEX side).
Julian Seward [Mon, 2 Apr 2012 21:54:49 +0000 (21:54 +0000)] 
Add translation chaining support for amd64, x86 and ARM (VEX side).
See #296422.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2273

14 years agoFixes for capabilities checking w.r.t. Power DFP instructions
Julian Seward [Mon, 2 Apr 2012 21:25:14 +0000 (21:25 +0000)] 
Fixes for capabilities checking w.r.t. Power DFP instructions
(Valgrind side).  Fixes #297329.
(Maynard Johnson, maynardj@us.ibm.com)

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

14 years agoFixes for capabilities checking w.r.t. Power DFP instructions (VEX
Julian Seward [Mon, 2 Apr 2012 21:24:12 +0000 (21:24 +0000)] 
Fixes for capabilities checking w.r.t. Power DFP instructions (VEX
side).  Fixes #297329.  (Maynard Johnson, maynardj@us.ibm.com)

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

14 years agodrd, realloc() intercept: Swap freeing and cleaning memory.
Bart Van Assche [Mon, 2 Apr 2012 15:46:51 +0000 (15:46 +0000)] 
drd, realloc() intercept: Swap freeing and cleaning memory.

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

14 years agoconfigure.in: Avoid that configure complains about "-----: command not found".
Bart Van Assche [Mon, 2 Apr 2012 15:45:51 +0000 (15:45 +0000)] 
configure.in: Avoid that configure complains about "-----: command not found".

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

14 years agoFix track-origin instrumentation for ppc32 following r2270/r12476
Julian Seward [Mon, 2 Apr 2012 15:10:37 +0000 (15:10 +0000)] 
Fix track-origin instrumentation for ppc32 following r2270/r12476
(initial DFP support).  Maynard Johnson (maynardj@us.ibm.com).

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

14 years agoSwizzle external.
Julian Seward [Mon, 2 Apr 2012 14:52:23 +0000 (14:52 +0000)] 
Swizzle external.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12479

14 years agodrd, free() intercept: Swap freeing and cleaning memory.
Bart Van Assche [Mon, 2 Apr 2012 14:36:22 +0000 (14:36 +0000)] 
drd, free() intercept: Swap freeing and cleaning memory.

Note: since the big lock is held while the malloc() and free() intercepts are
running, and since mmap() is treated by Valgrind as a non-blocking system call,
this code change is not expected to result in a behavior change of drd.

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

14 years agoMake a copy of r2270/r12476 for work on translation chaining.
Julian Seward [Mon, 2 Apr 2012 14:26:30 +0000 (14:26 +0000)] 
Make a copy of r2270/r12476 for work on translation chaining.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12477

14 years agoMake a copy of r2270/r12476 for work on translation chaining.
Julian Seward [Mon, 2 Apr 2012 14:08:42 +0000 (14:08 +0000)] 
Make a copy of r2270/r12476 for work on translation chaining.

git-svn-id: svn://svn.valgrind.org/vex/branches/TCHAIN@2271

14 years agoInitial support for POWER Processor decimal floating point
Julian Seward [Mon, 2 Apr 2012 10:22:05 +0000 (10:22 +0000)] 
Initial support for POWER Processor decimal floating point
instruction support -- VEX side changes.  See #295221.

This patch adds test cases.  Also adds some minor Memcheck
instrumentation tweaks necessitated by the IR changes.

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

14 years agoInitial support for POWER Processor decimal floating point instruction
Julian Seward [Mon, 2 Apr 2012 10:20:48 +0000 (10:20 +0000)] 
Initial support for POWER Processor decimal floating point instruction
support -- VEX side changes.  See #295221.

This patch adds the DFP 64-bit and 128-bit support, support for the
new IEEE rounding modes and the Add, Subtract, Multiply and Divide
instructions for both 64-bit and 128-bit instructions to Valgrind.

Carl Love (carll@us.ibm.com) and Maynard Johnson (maynardj@us.ibm.com)

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

14 years agodrd: Reenable reporting races on stack variables that are shared over threads for...
Bart Van Assche [Sun, 1 Apr 2012 15:06:57 +0000 (15:06 +0000)] 
drd: Reenable reporting races on stack variables that are shared over threads for --check-stack-var=yes.

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

14 years agodrd: Don't complain about stack variables that are shared over threads. Closes #297147
Bart Van Assche [Sun, 1 Apr 2012 14:40:16 +0000 (14:40 +0000)] 
drd: Don't complain about stack variables that are shared over threads. Closes #297147

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

14 years agogcc-4.7.0 complains about some __attribute__((always_inline)) here,
Julian Seward [Sat, 31 Mar 2012 00:06:04 +0000 (00:06 +0000)] 
gcc-4.7.0 complains about some __attribute__((always_inline)) here,
so change them back to vanilla ones.

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

14 years agoFix #ifdef vs { mismatch in r12471, that broke compilation on MacOS.
Julian Seward [Sat, 31 Mar 2012 00:04:59 +0000 (00:04 +0000)] 
Fix #ifdef vs { mismatch in r12471, that broke compilation on MacOS.

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

14 years agoFurther fix 297078 : implement conversion between vki and gdb real time sig nr.
Philippe Waroquiers [Fri, 30 Mar 2012 20:25:26 +0000 (20:25 +0000)] 
Further fix 297078 : implement conversion between vki and gdb real time sig nr.

* gdbserver_tests/nlpasssigalrm
   modify test so as to test also a real time signal

* coregrind/m_gdbserver/signals.c
  - implement translation between gdb real time signal numbers
    and vki real time signal numbers
  - ensure non-convertible signals are giving an error

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

14 years agoFix bug 297078 gdbserver signal handling problems caused by diff vki nr/gdb nr and
Philippe Waroquiers [Thu, 29 Mar 2012 21:56:47 +0000 (21:56 +0000)] 
Fix bug 297078 gdbserver signal handling problems caused by diff vki nr/gdb nr and
    non reset of "C-ontinued" signal

* To allow vki signame to be used in debuglog:
  - pub_core_signals.h : added prototype for Char *VG_(signame)
  - m_signals.c : changed static const Char *signame(Int sigNo)
                      to const Char *VG_(signame)(Int sigNo)

* valgrind-low.c : when the signal to report to gdb has
  been reported, clear it so that it is not reported anymore
  afterwards.

* m_gdbserver.c: when checking in pass_signals if signal
  can be passed without gdb interaction, do a conversion
  from vki nr to gdb nr when indexing
  (as pass_signals[] is indexed by gdb_nr).

* various gdbserver files:
  - used vki_ prefix for some args and variables to clarify
  - better debuglog tracing

* modified nlpasssigalrm.vgtest to test SIGCHLD signal
  handling followed by a break (to see SIGTRAP is properly
  given to gdb).

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

14 years agoAdd some more suppressions for OSX 10.7.2.
Julian Seward [Wed, 28 Mar 2012 14:35:00 +0000 (14:35 +0000)] 
Add some more suppressions for OSX 10.7.2.

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

14 years agoUpdate the memcpy intercept for Helgrind in accordance with that
Julian Seward [Tue, 27 Mar 2012 16:49:55 +0000 (16:49 +0000)] 
Update the memcpy intercept for Helgrind in accordance with that
for Memcheck.  Fixes #293855.

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

14 years ago/* Do expensive interpretation for Iop_Add32 and Iop_Add64 on
Julian Seward [Tue, 27 Mar 2012 10:19:39 +0000 (10:19 +0000)] 
/* Do expensive interpretation for Iop_Add32 and Iop_Add64 on
   Darwin.  10.7 is mostly built with LLVM, which uses these for
   bitfield inserts, and we get a lot of false errors if the cheap
   interpretation is used, alas.  Could solve this much better if
   we knew which of such adds came from x86/amd64 LEA instructions,
   since these are the only ones really needing the expensive
   interpretation, but that would require some way to tag them in
   the _toIR.c front ends, which is a lot of faffing around.  So
   for now just use the slow and blunt-instrument solution. */

Pertains to, although does not completely solve, #242137.

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

14 years agoAdd a nasty kludge in the handling of mmap on Darwin. Does not apply
Julian Seward [Tue, 27 Mar 2012 10:06:31 +0000 (10:06 +0000)] 
Add a nasty kludge in the handling of mmap on Darwin.  Does not apply
to any other platforms.  Prevent mmap(ANON) from returning zero (zero
with success, that is) since (a) some programs are observed to be
spooked by getting zero from a successful call to mmap, and (b) it's
pretty stupid from the point of view of program safety and possibly
security, since it causes page zero to become accessible.  So don't.

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

14 years agorlimit64_nofile won't build on Darwin, so don't try.
Julian Seward [Tue, 27 Mar 2012 10:03:56 +0000 (10:03 +0000)] 
rlimit64_nofile won't build on Darwin, so don't try.

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

14 years agoMake this compile on Darwin.
Julian Seward [Tue, 27 Mar 2012 09:39:22 +0000 (09:39 +0000)] 
Make this compile on Darwin.

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

14 years agoFix up debug printing -- no functional change.
Julian Seward [Tue, 27 Mar 2012 09:39:04 +0000 (09:39 +0000)] 
Fix up debug printing -- no functional change.

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

14 years agoKeep the stack properly 16 aligned when delivering signals on x86-darwin.
Julian Seward [Tue, 27 Mar 2012 09:38:23 +0000 (09:38 +0000)] 
Keep the stack properly 16 aligned when delivering signals on x86-darwin.

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