]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoAdded configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.
Bart Van Assche [Sun, 15 May 2011 17:05:36 +0000 (17:05 +0000)] 
Added configure tests for the compiler flags -Wno-nonnull and -Wno-overflow.

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

14 years agoRemoved "prereq: test -e gdb" again from those tests that do not invoke the script...
Bart Van Assche [Sun, 15 May 2011 16:45:42 +0000 (16:45 +0000)] 
Removed "prereq: test -e gdb" again from those tests that do not invoke the script gdbserver_tests/gdb.

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

14 years agoGet rid of the remaining "set but not used" warnings reported by gcc 4.6 by
Bart Van Assche [Sun, 15 May 2011 07:04:03 +0000 (07:04 +0000)] 
Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and
VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused))
declarations on variables have been eliminated. Closes #269778.

Note: so far this patch has been tested on x86/Linux, amd64/Linux and
ppc64/Linux but not yet on any other supported CPU/OS combination.

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

14 years agoUpdated Subversion ignore list.
Bart Van Assche [Sun, 15 May 2011 06:41:37 +0000 (06:41 +0000)] 
Updated Subversion ignore list.

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

14 years agogdbserver tests: only create the gdbserver_tests/gdb soft link if ./configure found...
Bart Van Assche [Sun, 15 May 2011 06:18:24 +0000 (06:18 +0000)] 
gdbserver tests: only create the gdbserver_tests/gdb soft link if ./configure found gdb.

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

14 years agoSkip gdbserver tests if ./configure did not find gdb.
Bart Van Assche [Sun, 15 May 2011 06:07:57 +0000 (06:07 +0000)] 
Skip gdbserver tests if ./configure did not find gdb.

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

14 years agogdbserver_tests/t.c: Fixed two occurrences of the same typo.
Bart Van Assche [Sun, 15 May 2011 05:44:59 +0000 (05:44 +0000)] 
gdbserver_tests/t.c: Fixed two occurrences of the same typo.

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

14 years agoRemove old exp-ptrcheck tests which were never used.
Julian Seward [Thu, 12 May 2011 19:15:06 +0000 (19:15 +0000)] 
Remove old exp-ptrcheck tests which were never used.

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

14 years agoDelete exp-sgcheck tests that are redundant following the removal of the
Julian Seward [Thu, 12 May 2011 16:38:56 +0000 (16:38 +0000)] 
Delete exp-sgcheck tests that are redundant following the removal of the
heap checking facilities.

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

14 years ago* fixed two bugs reported by the IBM BEAM checker:
Julian Seward [Wed, 11 May 2011 22:54:57 +0000 (22:54 +0000)] 
* fixed two bugs reported by the IBM BEAM checker:
     fd leak in vgdb.c
     break missing in valgrind-low-s390x.c

* use option --vgdb=full for the tests mcsigpass.vgtest and mcsignopass.vgtest
  This might improve these tests on ppc32/debian 6.0

* added a paragraph in gdbserver_tests/README_DEVELOPPERS to indicate
  how to report problems about failing gdbserver tests.

(bug 214909 comment 71, Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoFixed bug 272661
Josef Weidendorfer [Wed, 11 May 2011 16:45:52 +0000 (16:45 +0000)] 
Fixed bug 272661

Paths should be quoted in regexps (in callgrind_annotate).

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

14 years agoFix bug 267383
Josef Weidendorfer [Wed, 11 May 2011 16:32:18 +0000 (16:32 +0000)] 
Fix bug 267383

As suggested by Florian. Cachegrind already does the same.

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

14 years agoRename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
Julian Seward [Wed, 11 May 2011 16:04:28 +0000 (16:04 +0000)] 
Rename 'exp-ptrcheck' to 'exp-sgcheck' and hope this does not cause
too much build carnage.

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

14 years agoWhen reading Dwarf3 variable type and location information, print a
Julian Seward [Wed, 11 May 2011 15:31:24 +0000 (15:31 +0000)] 
When reading Dwarf3 variable type and location information, print a
line showing the number of variables read for each object.  Currently
disabled -- is a sanity-check mechanism for exp-sgcheck.

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

14 years agoUpdate the manual following removal of heap-check functionality.
Julian Seward [Wed, 11 May 2011 15:26:06 +0000 (15:26 +0000)] 
Update the manual following removal of heap-check functionality.

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

14 years agoARM front end only: when processing Thumb instructions, create
Julian Seward [Wed, 11 May 2011 14:17:35 +0000 (14:17 +0000)] 
ARM front end only: when processing Thumb instructions, create
IMark entries for the correct addresses.

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

14 years agoFix bugs catched by BEAM
Josef Weidendorfer [Wed, 11 May 2011 12:28:01 +0000 (12:28 +0000)] 
Fix bugs catched by BEAM

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

14 years agoRemove heap checking from exp-ptrcheck, leaving only the ability to
Julian Seward [Wed, 11 May 2011 12:01:37 +0000 (12:01 +0000)] 
Remove heap checking from exp-ptrcheck, leaving only the ability to
check for overruns of stack and global arrays.

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

14 years agoImprovements for testing and compilation breakage for the GDB server
Julian Seward [Tue, 10 May 2011 11:01:07 +0000 (11:01 +0000)] 
Improvements for testing and compilation breakage for the GDB server
on various platforms:

* In all gdbserver_tests using gdb:
  Made a more general way to remove the initial start message.

* tests using threads burning cpu modified to have only 1 thread.
  This makes them independent of the scheduler fairness.

* filter_gdb and filter_vgdb enhanced to anonymise
    some debian 6.0/ppc specific things
    some s390x/gdb 7.0, gdb 7.1  specific things

* vgdb.c: added an #include <linux/ptrace.h> to fix compilation
  on s390x fedora and suse. (Christian Boerntrager)

* fixed a bug in valgrind-low.c debug log :
  when a register size is 0, its image cannot be output (and register
  should not be transferred).

* added a parameter --keep-unfiltered to vg_regtest.in
  This will make it easier to update filter_gdb:
  in case gdbserver_tests are failing due to "artificial"
  differences to be filtered, re-run the tests using:
     perl tests/vg_regtest --keep-unfiltered gdbserver_tests
  Then a tar file with all the *.out in gdbserver_tests
  will allow me to better/faster update the filter_gdb.

* made a better detection of a working PTRACE_GETREGS at compile time
  and/or at run-time.

This is the patch on bug 214909 comment 69.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoHandle executables created by the Xcode 3.2.x linker. These contain
Julian Seward [Tue, 10 May 2011 08:42:14 +0000 (08:42 +0000)] 
Handle executables created by the Xcode 3.2.x linker.  These contain
LC_DYSYMTAB sections that apparently the 4.0.x created ones don't.

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

14 years agoBack out r11705, which was an attempt to make reading of line number
Julian Seward [Mon, 9 May 2011 22:51:14 +0000 (22:51 +0000)] 
Back out r11705, which was an attempt to make reading of line number
info created by LLVM 2.9 work properly.  As per long discussion in
#272189, this isn't actually possible -- LLVM 2.9 creates bogus line
number info, and the bogusness can't be worked around at the Valgrind
end.

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

14 years agoVG_(mkstemp): fix infinite loop in the case where /tmp isn't
Julian Seward [Mon, 9 May 2011 22:42:06 +0000 (22:42 +0000)] 
VG_(mkstemp): fix infinite loop in the case where /tmp isn't
writable.  Fixes #223249.  (Florian Krohm, britzel@acm.org)

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

14 years agoTidying up of branch-predict hint macros LIKELY/UNLIKELY. Fixes
Julian Seward [Mon, 9 May 2011 21:54:44 +0000 (21:54 +0000)] 
Tidying up of branch-predict hint macros LIKELY/UNLIKELY.  Fixes
#271504.  (Florian Krohm, britzel@acm.org)

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

14 years agoAdd LIKELY/UNLIKELY macros for general use, replacing s390x-specific
Julian Seward [Mon, 9 May 2011 21:45:04 +0000 (21:45 +0000)] 
Add LIKELY/UNLIKELY macros for general use, replacing s390x-specific
versions.  See #271504.  (Florian Krohm, britzel@acm.org)

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

14 years agoFix link flags so that 'vgdb' can be built on x86-darwin.
Julian Seward [Mon, 9 May 2011 21:33:32 +0000 (21:33 +0000)] 
Fix link flags so that 'vgdb' can be built on x86-darwin.

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

14 years agos390x: fix DISP20 macro. Remove duplicate defn and avoid problems of
Julian Seward [Mon, 9 May 2011 20:35:41 +0000 (20:35 +0000)] 
s390x: fix DISP20 macro.  Remove duplicate defn and avoid problems of
right-shifting negative values.  Fixes #272067.
(Florian Krohm, britzel@acm.org)

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

14 years agomemcheck: Fixed a bug in the address ranges reported in an error message. Closes...
Bart Van Assche [Mon, 9 May 2011 10:46:55 +0000 (10:46 +0000)] 
memcheck: Fixed a bug in the address ranges reported in an error message. Closes #272615.

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

14 years agoread_dwarf2_lineblock: debug printing fix (no functional change)
Julian Seward [Mon, 9 May 2011 09:19:32 +0000 (09:19 +0000)] 
read_dwarf2_lineblock: debug printing fix (no functional change)

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

14 years agoppc{32,64}-linux: mark VG_MINIMAL_LONGJMP as noreturn, since it is,
Julian Seward [Mon, 9 May 2011 09:15:28 +0000 (09:15 +0000)] 
ppc{32,64}-linux: mark VG_MINIMAL_LONGJMP as noreturn, since it is,
and not doing so leads to compiler warnings for functions that tail
call this one, which themselves are marked "attribute noreturn".

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

14 years agoHandle Iop_I64UtoF32 in the ppc32/ppc64 insn selector. Fixes #270851.
Julian Seward [Sun, 8 May 2011 22:05:10 +0000 (22:05 +0000)] 
Handle Iop_I64UtoF32 in the ppc32/ppc64 insn selector.  Fixes #270851.
(Maynard Johnson, maynardj@us.ibm.com)

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

14 years agoFix jump kind for indirect BLX for Thumb insns. Bug 266035 comment
Julian Seward [Sun, 8 May 2011 10:16:45 +0000 (10:16 +0000)] 
Fix jump kind for indirect BLX for Thumb insns.  Bug 266035 comment
14.  (Evgeniy Stepanov, eugeni.stepanov@gmail.com)

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

14 years agoUpdated Subversion ignore list.
Bart Van Assche [Sun, 8 May 2011 10:10:46 +0000 (10:10 +0000)] 
Updated Subversion ignore list.

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

14 years agoFollow-up for r11729: make the gdbserver regression tests pass again.
Bart Van Assche [Sun, 8 May 2011 10:10:04 +0000 (10:10 +0000)] 
Follow-up for r11729: make the gdbserver regression tests pass again.

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

14 years agoFixed one bug in gdbserver_tests/t.c and several compiler warnings triggered by the...
Bart Van Assche [Sun, 8 May 2011 09:29:06 +0000 (09:29 +0000)] 
Fixed one bug in gdbserver_tests/t.c and several compiler warnings triggered by the gdbserver test programs.

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

14 years agoAdded Subversion ignore list for directory gdbserver_tests.
Bart Van Assche [Sun, 8 May 2011 09:10:33 +0000 (09:10 +0000)] 
Added Subversion ignore list for directory gdbserver_tests.

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

14 years agoSupport DMB and DSB variants on Thumb. Bug 266035 comment 6.
Julian Seward [Sun, 8 May 2011 09:09:12 +0000 (09:09 +0000)] 
Support DMB and DSB variants on Thumb.  Bug 266035 comment 6.
(Jeff Brown, jeffbrown@google.com)

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

14 years agoImplement a GDB server in Valgrind. See #214909.
Julian Seward [Fri, 6 May 2011 21:02:55 +0000 (21:02 +0000)] 
Implement a GDB server in Valgrind.  See #214909.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoFix an assertion failure caused by r2144 (improved assertions to do
Julian Seward [Thu, 5 May 2011 07:46:28 +0000 (07:46 +0000)] 
Fix an assertion failure caused by r2144 (improved assertions to do
with PPCCondCode).

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

14 years agoTighten up condition code handling in the back end, so as to placate
Julian Seward [Wed, 4 May 2011 09:50:48 +0000 (09:50 +0000)] 
Tighten up condition code handling in the back end, so as to placate
IBM's BEAM checker.  There is no error in the existing code.  However
BEAM doesn't know that when PPCCondCode::test == Pct_ALWAYS then the
::flag field is irrelevant, and so it believes it is being used
uninitialised.  Add a Pcf_NONE ::flag value for use in that case, and
add assertions to match.  (Untested!)

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

14 years agomkLazyN: fix incorrect type decl for 'mergeTy64', as spotted by IBM's
Julian Seward [Wed, 4 May 2011 09:09:31 +0000 (09:09 +0000)] 
mkLazyN: fix incorrect type decl for 'mergeTy64', as spotted by IBM's
BEAM checker.

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

14 years agoscalarts_limitations_fail_NORETURN: fix a format string error
Julian Seward [Wed, 4 May 2011 09:08:34 +0000 (09:08 +0000)] 
scalarts_limitations_fail_NORETURN: fix a format string error
spotted by IBM's BEAM checker.  (Why didn't gcc or clang see this?)

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

14 years agosetup_client_stack: use have_exename to consistently guard uses
Julian Seward [Wed, 4 May 2011 09:07:38 +0000 (09:07 +0000)] 
setup_client_stack: use have_exename to consistently guard uses
of VG_(args_the_exename), thereby avoiding a potential segfault.
Spotted by IBM's BEAM checker.

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

14 years agocalling format_message: when passing frameNo == -1, also pass
Julian Seward [Wed, 4 May 2011 09:06:17 +0000 (09:06 +0000)] 
calling format_message: when passing frameNo == -1, also pass
tid == VG_INVALID_THREADID rather than an uninitialised ThreadId.
Also in format_message, improve precondition assertions for
frameNo and tid.

There's no error in the current code since if frameNo == -1 then
tid is unused, but it caused IBM's BEAM checker to complain.

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

14 years agohandle_maybe_load_notifier: assert when symbol == NULL rather than
Julian Seward [Wed, 4 May 2011 09:03:41 +0000 (09:03 +0000)] 
handle_maybe_load_notifier: assert when symbol == NULL rather than
segfaulting.  Potential segfault was found by IBM's BEAM checker.

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

14 years agoVG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
Julian Seward [Wed, 4 May 2011 09:01:58 +0000 (09:01 +0000)] 
VG_(env_unsetenv), VG_(env_clone): add assertions so as to cause
assertions instead of segfaults.  Potential segfaults were detected by
IBM's BEAM checker.

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

14 years agoSupport DMB and DSB variants on ARM. Bug 266035 comment 3.
Julian Seward [Tue, 3 May 2011 14:57:59 +0000 (14:57 +0000)] 
Support DMB and DSB variants on ARM.  Bug 266035 comment 3.
(Jeff Brown, jeffbrown@google.com)

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

14 years agoarm-linux: Set _start symbol alignment and type. Bug 266035 comment 1.
Julian Seward [Tue, 3 May 2011 14:24:11 +0000 (14:24 +0000)] 
arm-linux: Set _start symbol alignment and type.  Bug 266035 comment 1.
(Jeff Brown, jeffbrown@google.com)

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

14 years agoFix a bogus assertion observed by Florian Krohm.
Julian Seward [Tue, 3 May 2011 11:08:39 +0000 (11:08 +0000)] 
Fix a bogus assertion observed by Florian Krohm.

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

14 years agoFix a nonsensical assertion observed by Florian Krohm.
Julian Seward [Tue, 3 May 2011 07:51:49 +0000 (07:51 +0000)] 
Fix a nonsensical assertion observed by Florian Krohm.

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

14 years agoAdd a spec rule for V after SUB.
Julian Seward [Mon, 2 May 2011 18:57:56 +0000 (18:57 +0000)] 
Add a spec rule for V after SUB.

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

15 years agoSplit up armg_calculate_flags_nzcv into four functions that compute
Julian Seward [Mon, 2 May 2011 07:21:04 +0000 (07:21 +0000)] 
Split up armg_calculate_flags_nzcv into four functions that compute
the flags individually.  This seems to be a net performance win,
because often only one or two of the flags computed by
armg_calculate_flags_nzcv, so time was wasted computing the other
ones.

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

15 years agoImprovements to condition code handling on ARM.
Julian Seward [Sun, 1 May 2011 18:47:10 +0000 (18:47 +0000)] 
Improvements to condition code handling on ARM.

(1) guest_arm_spechelper: add another spec rule for
    armg_calculate_condition.  Add a spec rules for
    armg_calculate_flag_c and armg_calculate_flag_v.

(2) guest_arm_toIR.c: when storing oldC (shifter carry out) and
    oldV values in the thunk, be sure to ensure the top 31 bits
    are zero.  This improves the effectiveness of the new spec
    rules (1) by avoiding getting into situations where we have
    Mux0X(c, x, And32(x,1)), where in fact x has bits 31:1 as
    zero.  iropt can't fold that out.  So make sure the spec
    rules don't generate any unnecessary And32(x,1); hence the
    above becomes Mux0X(c, x, x) which iropt can reduce simply
    to "x".

(3) armg_calculate_flags_nzcv: assert condition (2) wherever
    possible.

These changes drastically improve --tool=none performance in some
cases (eg, perf/fbench with softfloat is doubled in speed).

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

15 years agoWhen simplifying (improving) the IR generated by the ARM front end, do
Julian Seward [Sun, 1 May 2011 18:36:51 +0000 (18:36 +0000)] 
When simplifying (improving) the IR generated by the ARM front end, do
CSE by default.  This significantly improves performance for ARM (not
Thumb) code that leans heavily on predicated instructions by commoning
up duplicate condition code evaluations within a single IRSB.

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

15 years agoDRD: fix issues reported by the IBM static analysis tool.
Bart Van Assche [Sat, 30 Apr 2011 07:27:41 +0000 (07:27 +0000)] 
DRD: fix issues reported by the IBM static analysis tool.

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

15 years agoHandle Iop_Not64 when doing 32-bit code generation. Also, assert that
Julian Seward [Thu, 28 Apr 2011 21:03:54 +0000 (21:03 +0000)] 
Handle Iop_Not64 when doing 32-bit code generation.  Also, assert that
iselWordExpr_R is not asked to handle Iop_Not64 in 32-bit mode.
Fixes #270856.  (Maynard Johnson, maynardj@us.ibm.com)

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

15 years agos390x : misc cleanups
Julian Seward [Thu, 28 Apr 2011 20:14:48 +0000 (20:14 +0000)] 
s390x : misc cleanups

- Forgotten cleanups in none/tests/s390x/Makefile.am

Partial fix for #271501.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x : misc cleanups
Julian Seward [Thu, 28 Apr 2011 20:13:45 +0000 (20:13 +0000)] 
s390x : misc cleanups

- Remove fixs390 regarding storing the instruction address in the
  IP_AT_SYSCALL slot in the guest state. I'm not sure this is used
  but it certainly makes sense.

- Remove fixs390 in function s390_irgen_XONC. This was missed in
  VEX r2113.

Partial fix for #271501. (Florian Krohm, britzel@acm.org)

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

15 years agos390x: Implement Ist_MBE
Julian Seward [Thu, 28 Apr 2011 18:48:06 +0000 (18:48 +0000)] 
s390x: Implement Ist_MBE
VEX IR provides the statement Ist_MBE which is used to implement memory
barriers (Imbe_Fence). We use this statement to implement serialization which
is similar.
Fixes #271385.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: fix code confusion
Julian Seward [Thu, 28 Apr 2011 18:38:42 +0000 (18:38 +0000)] 
s390x: fix code confusion
Fix an enum-type mixup found by the IBM checker.
Fixes #271259.  (Florian Krohm, britzel@acm.org)

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

15 years agosyswrap/Linux: trace ioctl() calls only once / do not report two-argument
Bart Van Assche [Thu, 28 Apr 2011 18:36:49 +0000 (18:36 +0000)] 
syswrap/Linux: trace ioctl() calls only once / do not report two-argument
ioctl() calls as an error. Patch provided by Mark Hills. Closes #272730.

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

15 years agoChange the TT_FAST hash function for from "insn_address >> 2" to
Julian Seward [Thu, 28 Apr 2011 14:58:15 +0000 (14:58 +0000)] 
Change the TT_FAST hash function for from "insn_address >> 2" to
"insn_address >> 1".  The former is appropriate for ARM code, where
all insns are 4-sized and 4-aligned, but not for Thumb code, where the
minimum size and alignment is 2.  The old scheme happened to work for
Thumb (indeed, any hash function would), but caused huge amounts of
conflict misses in the fast cache for some programs.

The change has been observed to reduce conflict misses by up to 100
times, and in some cases, improves performance significantly for Thumb
code.  Performance of ARM code is unchanged or possibly a bit worse.

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

15 years agoChange the default (minimum) client malloc alignment from 8 to 16
Julian Seward [Wed, 27 Apr 2011 23:25:15 +0000 (23:25 +0000)] 
Change the default (minimum) client malloc alignment from 8 to 16
on ppc32-linux.  This is needed to make Altivec-using code work
correctly.  Noticed when running ./auxprogs/gsl16test with gcc-4.6
with args -mcpu=970 -g -O3 -ftree-vectorize on Memcheck, in
which case a few of the tests failed because malloc() returns
8 byte aligned memory when it should return 16-aligned memory.

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

15 years agoFix no-arg ioctls on Darwin.
Robert Walsh [Wed, 27 Apr 2011 19:04:31 +0000 (19:04 +0000)] 
Fix no-arg ioctls on Darwin.

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

15 years agos390x: invalid use of R0 as base register
Julian Seward [Wed, 27 Apr 2011 12:07:01 +0000 (12:07 +0000)] 
s390x: invalid use of R0 as base register
When emitting code for a shift operation with the shift amount operand being in
memory we load the shift amount into R0 and use that register in SLAG etc..
That won't work because the contents of R0 will be ignored when used as a base
reg.
So, let's choose some other register and save/restore it.

Fixes #270959.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: fpr - gpr transfer facility -- valgrind side fixes,
Julian Seward [Wed, 27 Apr 2011 12:00:51 +0000 (12:00 +0000)] 
s390x: fpr - gpr transfer facility -- valgrind side fixes,
and test cases.  Fixes #268619.
(Florian Krohm, britzel@acm.org)

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

15 years agos390x: fpr - gpr transfer facility
Julian Seward [Wed, 27 Apr 2011 11:58:22 +0000 (11:58 +0000)] 
s390x: fpr - gpr transfer facility
We need to introduce a new hwcap to model the presence of the fpr - gpr
transfer facility. If it is not available, we cannot use the LDGR and LGDR
insns and need to use a trick similar to what ppc does (write/read stack
location).
Fixes #268619 (vex side).
(Florian Krohm, britzel@acm.org)

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

15 years agoFix bogus asm constraints in jm-insns.c. Fixes #263919.
Julian Seward [Wed, 27 Apr 2011 11:33:44 +0000 (11:33 +0000)] 
Fix bogus asm constraints in jm-insns.c.  Fixes #263919.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoAdd alternative expected output cases for more recent glibcs (eg,
Julian Seward [Wed, 27 Apr 2011 11:11:22 +0000 (11:11 +0000)] 
Add alternative expected output cases for more recent glibcs (eg,
2.12), which print a minus sign for NaNs.  Fixes #262989.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoFix up incorrect usage of Iop_I64UtoF32 in the PowerPC front and back
Julian Seward [Wed, 27 Apr 2011 10:07:42 +0000 (10:07 +0000)] 
Fix up incorrect usage of Iop_I64UtoF32 in the PowerPC front and back
ends.  Partial fix for #270851.

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

15 years agoFix a bunch of printf format-string warnings when compiling this "-m64".
Julian Seward [Wed, 27 Apr 2011 08:09:37 +0000 (08:09 +0000)] 
Fix a bunch of printf format-string warnings when compiling this "-m64".

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

15 years agoFix up some enum confusion to do with ARMNeonUnOp and ARMNeonUnOpS, as
Julian Seward [Wed, 27 Apr 2011 07:02:44 +0000 (07:02 +0000)] 
Fix up some enum confusion to do with ARMNeonUnOp and ARMNeonUnOpS, as
found by "the IBM checker", and also by clang-2.9.  Fixes #271820.
(Florian Krohm, britzel@acm.org)

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

15 years agoFix up enum confusion between PPCAvOp and PPCAvFpOp, as found by
Julian Seward [Tue, 26 Apr 2011 21:36:09 +0000 (21:36 +0000)] 
Fix up enum confusion between PPCAvOp and PPCAvFpOp, as found by
"the IBM checker", and also by clang-2.9.  Fixes #271579.
(Florian Krohm, britzel@acm.org)

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

15 years agoFix a type mismatch that gcc-4.6 warns about.
Julian Seward [Tue, 26 Apr 2011 10:23:54 +0000 (10:23 +0000)] 
Fix a type mismatch that gcc-4.6 warns about.

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

15 years agoRemove some unused code that gcc-4.6 warns about.
Julian Seward [Tue, 26 Apr 2011 10:23:33 +0000 (10:23 +0000)] 
Remove some unused code that gcc-4.6 warns about.

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

15 years agoFix a couple of bogus asm constraints observed when trying to build
Julian Seward [Tue, 26 Apr 2011 07:52:44 +0000 (07:52 +0000)] 
Fix a couple of bogus asm constraints observed when trying to build
V with clang-2.9.

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

15 years agoFix a couple of warnings when building the regtests.
Julian Seward [Thu, 21 Apr 2011 23:05:49 +0000 (23:05 +0000)] 
Fix a couple of warnings when building the regtests.

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

15 years agoMake reading of line number info from LLVM-2.9-generated Dwarf3 work.
Julian Seward [Thu, 21 Apr 2011 08:55:51 +0000 (08:55 +0000)] 
Make reading of line number info from LLVM-2.9-generated Dwarf3 work.

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

15 years agoChange a bunch of < > style includes to " " style.
Julian Seward [Wed, 20 Apr 2011 11:54:32 +0000 (11:54 +0000)] 
Change a bunch of < > style includes to " " style.

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

15 years agoLinux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh...
Bart Van Assche [Mon, 18 Apr 2011 10:37:56 +0000 (10:37 +0000)] 
Linux/syswrap: add support for USBDEVFS_RESET (patch contributed by Brad Hards <bradh@frogmouth.net>).

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

15 years agoFix bogus .size directives which are now rejected by binutils 2.21.
Julian Seward [Fri, 15 Apr 2011 21:21:27 +0000 (21:21 +0000)] 
Fix bogus .size directives which are now rejected by binutils 2.21.
Fixes #271043.  (Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoUn-break configure check for VSX (a POWER7 extension). Fixes #271042.
Julian Seward [Fri, 15 Apr 2011 21:16:00 +0000 (21:16 +0000)] 
Un-break configure check for VSX (a POWER7 extension).  Fixes #271042.

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

15 years agoMark this as executable. Followup for #267630.
Julian Seward [Fri, 15 Apr 2011 12:33:14 +0000 (12:33 +0000)] 
Mark this as executable.  Followup for #267630.

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

15 years agoAdd support for IBM Power ISA 2.06 -- stage 1. Valgrind-side changes
Julian Seward [Fri, 15 Apr 2011 11:57:05 +0000 (11:57 +0000)] 
Add support for IBM Power ISA 2.06 -- stage 1.  Valgrind-side changes
and test cases. Bug #267630 and followup fix #270794.
(Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoAdd support for IBM Power ISA 2.06 -- stage 1. Bug #267630 and
Julian Seward [Fri, 15 Apr 2011 11:55:00 +0000 (11:55 +0000)] 
Add support for IBM Power ISA 2.06 -- stage 1.  Bug #267630 and
followup fix #270794.  (Maynard Johnson, maynardj@us.ibm.com)

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

15 years agoFollowup fix for r11693: add a file that was missed.
Julian Seward [Wed, 13 Apr 2011 16:05:35 +0000 (16:05 +0000)] 
Followup fix for r11693: add a file that was missed.
Related to #270115.    (Florian Krohm, britzel@acm.org)

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

15 years agos390x: reconsider "long displacement" requirement -- hwcaps detection
Julian Seward [Wed, 13 Apr 2011 15:40:10 +0000 (15:40 +0000)] 
s390x: reconsider "long displacement" requirement -- hwcaps detection
changes.  See #268620.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: reconsider "long displacement" requirement. We currently
Julian Seward [Wed, 13 Apr 2011 15:38:17 +0000 (15:38 +0000)] 
s390x: reconsider "long displacement" requirement.  We currently
require that the host supports accessing memory using long
displacement. On older machines e.g. z900 that is an expensive
operation, because it is millicoded. It would be a performance win to
relax that requirement.  (VEX side changes.)  See #268620.
(Florian Krohm, britzel@acm.org)

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

15 years agoTest cases for #270082 (s390x: Make sure to point the PSW address to
Julian Seward [Wed, 13 Apr 2011 15:15:52 +0000 (15:15 +0000)] 
Test cases for #270082 (s390x: Make sure to point the PSW address to
the next address on SIGILL)
(Christian Borntraeger <borntraeger@de.ibm.com>)

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

15 years agos390x: Make sure to point the PSW address to the next address on SIGILL
Julian Seward [Wed, 13 Apr 2011 15:10:16 +0000 (15:10 +0000)] 
s390x: Make sure to point the PSW address to the next address on SIGILL
Fixes #270082.  (Christian Borntraeger <borntraeger@de.ibm.com>)

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

15 years agos390x: rewrite some testcases. To make my testing and debugging life
Julian Seward [Wed, 13 Apr 2011 14:57:44 +0000 (14:57 +0000)] 
s390x: rewrite some testcases.  To make my testing and debugging life
simpler, I've rewritten those testcases from none/tests/s390x that
require binutils to recognize opcodes defined in the
extended-immediate and general-instruction-extension facilities. As a
side effect this change removes the special casing in
none/tests/s390x/Makefile.am and the configury bits to support it.
Fixes #270115.  (Florian Krohm, britzel@acm.org)

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

15 years agos390x: minor code generation tweaks. There were a few loose ends
Julian Seward [Wed, 13 Apr 2011 14:44:29 +0000 (14:44 +0000)] 
s390x: minor code generation tweaks.  There were a few loose ends
(identified by fixs390) in code generation that are fixed by the
attached patch:
- use of SLFI insn if available
- unnecessary vpanic
An out-of-date comment is also removed.

Fixes #269736.  (Florian Krohm <britzel@acm.org>)

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

15 years agotimerfd-syscall regression test: Allow even more scheduler variation.
Bart Van Assche [Tue, 12 Apr 2011 10:28:31 +0000 (10:28 +0000)] 
timerfd-syscall regression test: Allow even more scheduler variation.

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

15 years agoGet rid of shadowing causing a perl warning. Minor fallout from
Julian Seward [Mon, 11 Apr 2011 22:14:03 +0000 (22:14 +0000)] 
Get rid of shadowing causing a perl warning.  Minor fallout from
r11686.

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

15 years agoMake MacOS builds work again following fixes for #259977
Julian Seward [Mon, 11 Apr 2011 22:08:06 +0000 (22:08 +0000)] 
Make MacOS builds work again following fixes for #259977
(revs 11687,8,9)

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

15 years agoAdd an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
Julian Seward [Mon, 11 Apr 2011 21:26:27 +0000 (21:26 +0000)] 
Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.
(modified version of patch from Maynard Johnson <maynardj@us.ibm.com>)

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

15 years agoAdd an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
Julian Seward [Mon, 11 Apr 2011 18:36:34 +0000 (18:36 +0000)] 
Add an alternative implementation of VG_MINIMAL_{SET,LONG}JMP
for ppc32-linux, that works for gcc >= 4.4.  Related to #259977.

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

15 years agoCreate new module m_libcsetjmp, which wraps up uses of
Julian Seward [Mon, 11 Apr 2011 16:17:51 +0000 (16:17 +0000)] 
Create new module m_libcsetjmp, which wraps up uses of
__builtin_setjmp and __builtin_longjmp so that they can be selectively
replaced, on a platform by platform basis.  Does not change any
functionality.  Related to #259977.

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

15 years agoOn OSX, post-process the tool executables to adjust the Mach-O headers
Julian Seward [Wed, 6 Apr 2011 11:17:16 +0000 (11:17 +0000)] 
On OSX, post-process the tool executables to adjust the Mach-O headers
in certain circumstances.  This works around a bug in the linker that
ships in Xcode 4.0.0 and 4.0.1 causing the 64-bit tool executables to
segfault at startup.  Fixes #267997.

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

15 years agos390x: tweak s390_emit_load_cc. #269864.
Julian Seward [Tue, 5 Apr 2011 14:04:53 +0000 (14:04 +0000)] 
s390x: tweak s390_emit_load_cc.  #269864.
(Florian Krohm, britzel@acm.org)

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

15 years agoRemove unused parameter in functions s390_emit_SLL/SRL/SRA.
Julian Seward [Tue, 5 Apr 2011 14:00:37 +0000 (14:00 +0000)] 
Remove unused parameter in functions s390_emit_SLL/SRL/SRA.
Fixes #269863.  (Florian Krohm, britzel@acm.org)

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