]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agoUse the precomputed sets_min_1 value consistently when masking
Tom Hughes [Thu, 9 Jun 2011 12:26:42 +0000 (12:26 +0000)] 
Use the precomputed sets_min_1 value consistently when masking
off bits from an address to find which cache set it is in.

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

14 years agoFix perf_event open on s390.
Tom Hughes [Wed, 8 Jun 2011 20:55:29 +0000 (20:55 +0000)] 
Fix perf_event open on s390.

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

14 years agoFix some warnings I introduced in r11804.
Tom Hughes [Wed, 8 Jun 2011 09:57:54 +0000 (09:57 +0000)] 
Fix some warnings I introduced in r11804.

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

14 years agoAdd support for prlimit64 on x86 and amd64.
Tom Hughes [Wed, 8 Jun 2011 09:55:54 +0000 (09:55 +0000)] 
Add support for prlimit64 on x86 and amd64.

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

14 years agoUpdate system call lists to match current kernel source.
Tom Hughes [Wed, 8 Jun 2011 09:12:07 +0000 (09:12 +0000)] 
Update system call lists to match current kernel source.

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

14 years agoIt seems that the perf_counter_open system call was renamed to
Tom Hughes [Wed, 8 Jun 2011 09:10:40 +0000 (09:10 +0000)] 
It seems that the perf_counter_open system call was renamed to
perf_event_open some time after we added it, so correct the name
wherever it appears to match the current kernel source.

Also fixup the PRE handler to do the check correctly, using the
size field of the structure to work out how much data there is.

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

14 years agoAdd a simple but (to me, at least) useful thing, if (0)'d by default,
Julian Seward [Tue, 7 Jun 2011 22:54:32 +0000 (22:54 +0000)] 
Add a simple but (to me, at least) useful thing, if (0)'d by default,
to print a line of text approximately every 20 million SBs.  This is
useful for monitoring the progress of long running programs.

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

14 years agoDefine _GNU_SOURCE for access to CLONE_XXX flags with gibc 2.14 headers.
Tom Hughes [Tue, 7 Jun 2011 22:53:21 +0000 (22:53 +0000)] 
Define _GNU_SOURCE for access to CLONE_XXX flags with gibc 2.14 headers.

Based on patch from Dmitry Djachenko <dimhen@gmail.com>.

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

14 years agoFix the computation of debuginfo bias values, in the case where the
Julian Seward [Tue, 7 Jun 2011 22:44:09 +0000 (22:44 +0000)] 
Fix the computation of debuginfo bias values, in the case where the
debuginfo object has been not been prelinked but the main object has.
Fixes a segfault observed running any C++ application (eg,
drd/tests/annotate_smart_pointer) on Fedora 14 (32-bit), when the
debuginfo RPM for libstdc++ is installed.

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

14 years agoAdd glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.
Tom Hughes [Tue, 7 Jun 2011 21:52:26 +0000 (21:52 +0000)] 
Add glibc 2.14 support. Patch from Dmitry Djachenko <dimhen@gmail.com>.

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

14 years agofind_nsegment_idx: double size of the lookup cache in an attempt
Julian Seward [Tue, 7 Jun 2011 21:42:07 +0000 (21:42 +0000)] 
find_nsegment_idx: double size of the lookup cache in an attempt
to mitigate the probable increase in miss rates resulting from
r11798 (which causes increased numbers of such queries).

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

14 years agoAdd a fourth --smc-check= variant, --smc-check=all-non-file. This
Julian Seward [Tue, 7 Jun 2011 21:39:28 +0000 (21:39 +0000)] 
Add a fourth --smc-check= variant, --smc-check=all-non-file.  This
adds self-modifying-code checks to all guest code taken from mappings
which are not file backed, but omits checks in code from file backed
mappings.  This has the effect of giving complete smc-coverage of JIT
generated code -- since that is invariably generated into anonymous
mapped areas -- without burdening non-JIT generated code with such
checks.  Running Firefox 6, --smc-check=all-non-file reduces by a
factor of between 3 and 10 the number of translations requiring a self
check, compared to --smc-check=all.  These changes depend on the vex
interface changes in r2158.

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

14 years agoMention the "3.x" Linux kernel version explicitly in the kernel version configure...
Bart Van Assche [Sun, 5 Jun 2011 10:01:48 +0000 (10:01 +0000)] 
Mention the "3.x" Linux kernel version explicitly in the kernel version configure message

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

14 years agoMake Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
Bart Van Assche [Sun, 5 Jun 2011 08:51:47 +0000 (08:51 +0000)] 
Make Valgrind build on Linux kernel 3.0 and beyond. Closes #274926. An official
statement that the Linux kernel 3.0 API and ABI is compatible with Linux kernel
2.6 can be found here: http://lkml.org/lkml/2011/5/29/204.

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

14 years agoFollowup fix to r11794 (generalise processing of PT_LOAD entries):
Julian Seward [Fri, 3 Jun 2011 23:27:39 +0000 (23:27 +0000)] 
Followup fix to r11794 (generalise processing of PT_LOAD entries):
change some incorrect "rx->bias" (which due to lameness of C's type
system was valid) to "inrx->bias".

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

14 years agoML_(read_elf_debug_info): when processing PT_LOAD entries from the
Julian Seward [Thu, 2 Jun 2011 10:06:25 +0000 (10:06 +0000)] 
ML_(read_elf_debug_info): when processing PT_LOAD entries from the
program header, don't make the following assumptions

- that there is only one r-x and one rw- entry

- that the r-x entry appears before the rw- entry

This makes it possible to handle ELF objects processed by Mike
Hommey's elfhack program.

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

14 years agoOn arm-linux, give gcc "-mcpu=cortex-a8" so as to persuade it to
Julian Seward [Tue, 31 May 2011 07:17:54 +0000 (07:17 +0000)] 
On arm-linux, give gcc "-mcpu=cortex-a8" so as to persuade it to
accept the armv6t2 (I think) insns (movt, movw) in
dispatch-arm-linux.S.  Some older gccs apparently think they are
compiling for armv6 by default and reject them (gcc 4.4.1 on Ubuntu
9.10, for one.)

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

14 years agoAdd file missing from r11791 due to insufficient coffee.
Julian Seward [Tue, 31 May 2011 07:14:42 +0000 (07:14 +0000)] 
Add file missing from r11791 due to insufficient coffee.
#214909 c 101.  (Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoMore gdbserver test fixes, from #214909 c 101:
Julian Seward [Tue, 31 May 2011 07:09:06 +0000 (07:09 +0000)] 
More gdbserver test fixes, from #214909 c 101:
fix mcsig(no)pass on arm Ubuntu10, arm thumb internal doc, improve
simulate_control_c

* new file docs/internals/arm_thumb_notes_gdbserver.txt
  documentation about the subtilities of the thumb bit handling in gdbsrv.
* made the SIGFPE backtrace filtering less dependent on gdb/os/libc/...
* improved simulate_control_c : runs faster/less dependent on timeout value

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

14 years agoHandle ELF objects with two .eh_frame sections. This fixes a problem
Julian Seward [Mon, 30 May 2011 10:18:59 +0000 (10:18 +0000)] 
Handle ELF objects with two .eh_frame sections.  This fixes a problem
handling libxul.so when linked by gold on x86_64.  (n-i-bz)

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

14 years agoUn-break all non x86/amd64 targets following r11786, duh.
Julian Seward [Mon, 30 May 2011 06:29:39 +0000 (06:29 +0000)] 
Un-break all non x86/amd64 targets following r11786, duh.

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

14 years agoUn-break Darwin build following r2155/r11786 -- use dual-entry
Julian Seward [Sun, 29 May 2011 12:40:27 +0000 (12:40 +0000)] 
Un-break Darwin build following r2155/r11786 -- use dual-entry
dispatchers for x86 and amd64, and add corresponding improvements.

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

14 years agoRemove a load from the s390x dispatcher loop, as per r11781.
Julian Seward [Sun, 29 May 2011 09:38:58 +0000 (09:38 +0000)] 
Remove a load from the s390x dispatcher loop, as per r11781.
(Florian Krohm <britzel@acm.org>).  #274378.

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

14 years agoGive the amd64-linux and x86-linux dispatchers two entry points, not one,
Julian Seward [Sun, 29 May 2011 09:34:30 +0000 (09:34 +0000)] 
Give the amd64-linux and x86-linux dispatchers two entry points, not one,
so as to avoid a GSP-changed check in the common case.  See vex r2155.
(amd64-darwin and x86-darwin are now temporarily unbuildable.)

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

14 years agodispatch-x86-linux.S:
Julian Seward [Sat, 28 May 2011 17:07:53 +0000 (17:07 +0000)] 
dispatch-x86-linux.S:
   use test-based detection of GSP pointer changes.
   Saves one load per SB.

dispatch-amd64-linux.S:
   ditto

dispatch-amd64-linux.S:
   use movabsq to get &VG_(tt_fast) into a register,
   instead of an rsp-relative load from a constant pool.
   Saves a second load per SB.

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

14 years agoUndo bogus comment changes committed in r11783.
Julian Seward [Sat, 28 May 2011 16:58:45 +0000 (16:58 +0000)] 
Undo bogus comment changes committed in r11783.

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

14 years agoTest for guest-state-pointer changes by checking its lowest bit.
Julian Seward [Sat, 28 May 2011 15:58:13 +0000 (15:58 +0000)] 
Test for guest-state-pointer changes by checking its lowest bit.
Removes one memory reference from the dispatcher loop.  As per r11781
for arm-linux.

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

14 years agoFix ppc64-linux build following introduction of IRStmt_Mark::delta
Julian Seward [Sat, 28 May 2011 15:34:17 +0000 (15:34 +0000)] 
Fix ppc64-linux build following introduction of IRStmt_Mark::delta
in vex r2153.

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

14 years agoRemove another memory reference from the arm dispatcher loop, by using
Julian Seward [Sat, 28 May 2011 11:05:44 +0000 (11:05 +0000)] 
Remove another memory reference from the arm dispatcher loop, by using
the fact that all {VG,VEX}_TRC_VALUES have their lowest bit set.  All
other targets can benefit from this trick too.

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

14 years agoGet rid of a bunch of loads in the arm dispatcher inner loops, and
Julian Seward [Sat, 28 May 2011 10:16:58 +0000 (10:16 +0000)] 
Get rid of a bunch of loads in the arm dispatcher inner loops, and
make some attempt to schedule for Cortex-A8.  Improves overall IPC
for none running perf/bz2.c "-O" from 0.879 to 0.925.

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

14 years agoFurther fixes for GDB server on Thumb code:
Julian Seward [Fri, 27 May 2011 13:23:44 +0000 (13:23 +0000)] 
Further fixes for GDB server on Thumb code:

* Disabled several tests on ARM when gdb version < 7.1
  gdb 7.0 has problems with next/step/... in ARM thumb code.

* Documented in manual-core.xml that ARM thumb code implies
  a gdb version >= 7.1

* m_gdbserver.h/.c : take into account the thumb bit at several places

* use new IRStmt_IMark::delta field to distinguish ARM vs Thumb
  instructions as committed in vex r2153

Patch from bug 214909 comment 99 (valgrind part).
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoDRD: eliminate two redundant global variable definitions. See also #273536.
Bart Van Assche [Wed, 18 May 2011 16:09:54 +0000 (16:09 +0000)] 
DRD: eliminate two redundant global variable definitions. See also #273536.

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

14 years agoDefine pass_signals[] only once such that Valgrind can be built with -fno-common...
Bart Van Assche [Wed, 18 May 2011 16:08:28 +0000 (16:08 +0000)] 
Define pass_signals[] only once such that Valgrind can be built with -fno-common. This is a modified version of the second patch attached to #273536.

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

14 years agoFollow-up for r11770: added missing 'void' keyword.
Bart Van Assche [Wed, 18 May 2011 16:04:46 +0000 (16:04 +0000)] 
Follow-up for r11770: added missing 'void' keyword.

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

14 years agoReverted r11774 because it didn't make sense.
Bart Van Assche [Wed, 18 May 2011 15:51:51 +0000 (15:51 +0000)] 
Reverted r11774 because it didn't make sense.

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

14 years agoAdded missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.
Bart Van Assche [Wed, 18 May 2011 10:12:36 +0000 (10:12 +0000)] 
Added missing extern keywords. Patch provided by Daniel Richard G. - closes #275536.

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

14 years agoUpdated Subversion ignore list.
Bart Van Assche [Wed, 18 May 2011 06:04:00 +0000 (06:04 +0000)] 
Updated Subversion ignore list.

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

14 years agogdbserver: (#214909 c 91)
Julian Seward [Tue, 17 May 2011 21:35:41 +0000 (21:35 +0000)] 
gdbserver: (#214909 c 91)
add cleanup: line to none/tests/require-text-symbol-2.vgtest
In case Valgrind terminates abnormally, then no cleanup is done.
In this case, the abnormal termination is in the test which checks
--require-text-symbol=:*libc.so*:doesntexist
This patch adds a cleanup: line to the test.

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agogdbserver: (#214909 c 82)
Julian Seward [Tue, 17 May 2011 18:14:53 +0000 (18:14 +0000)] 
gdbserver: (#214909 c 82)

ensure proper cleanup of gdbsrv FIFOs/shmem files with untraced fork/exec

* syswrap-{generic|darwin|aix5}.c : in PRE(sys_execve) : terminate gdbserver
* pub_core_gdbserver.h and m_gdbserver.c : add VG_(gdbserver_prerun_action),
  factorising the actions to do by gdbserver at "startup" (i.e. a traced
  fork or a traced exec).
* scheduler.c : implement startup action using VG_(gdbserver_prerun_action)

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agogdbserver: misc fixes (#214909 c 77)
Julian Seward [Tue, 17 May 2011 17:15:07 +0000 (17:15 +0000)] 
gdbserver: misc fixes (#214909 c 77)
Fix some tests on ppc-debian6,s390x + handled Nick Nethercote, Josef
Weidendorfer comments

* improved testing & related doc
  - added option --vex-iropt-precise-memory-exns=yes to mcsig(no)pass.vgtest
    + updated manual-core.xml
  - cleanup some comments in *.vgtest
  - modified filter_gdb and filter_memcheck_monitor to
    handle specific ppc/debian6.0 mcsig(no)pass output
    handle specific s390x 'missing debug info'
  - added more information in README_DEVELOPPERS on how to
    investigate failing gdbserver tests.

* handled Nick Nethercote comment:
  Replaced kludgy ms.snapshot detailed
              by  ms.detailed_snaphot
  Updated documentation and test.

* handled Josef Weindendorfer comments:
   - do not report an error if ptrace_scope file can't be read.
     Instead, a debug trace is done if -d (debug) option given
   - added an option -l to give the list of active Valgrind
     gdbserver. Useful a.o. to support callgrind_control.
     Updated documentation
   - added ref. to  vgdb help in the vgdb --help message

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agodrd/tests/pth_detached.c: eliminated thread_arg[] array and introduced PTHREAD_STACK_MIN.
Bart Van Assche [Tue, 17 May 2011 16:45:08 +0000 (16:45 +0000)] 
drd/tests/pth_detached.c: eliminated thread_arg[] array and introduced PTHREAD_STACK_MIN.

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

14 years agogdbserver: Fixes for ARM-Thumb (#214909 c 76)
Julian Seward [Tue, 17 May 2011 16:35:11 +0000 (16:35 +0000)] 
gdbserver: Fixes for ARM-Thumb (#214909 c 76)
fix arm thumb by transforming an address to its thumb form when needed

* added a function thumb_pc transforming a pc to its thumb form if needed
  (using an heuristic to guess if this is a thumb address)
* when program counter is modified by gdb, use thumb_pc
* use thumb_pc in monitor command vg.translate

(I was able to check that this improves inferior call on a small
thumb compiled executable + mcinfcallRU test) but I could not compile
all tests with thumb).

(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

14 years agoBetter checking for command line options that should be either 'yes'
Julian Seward [Tue, 17 May 2011 16:29:29 +0000 (16:29 +0000)] 
Better checking for command line options that should be either 'yes'
or 'no'.  Fixes #269144.  (a125246@prtnx.com, Florian Krohm
<britzel@acm.org>)

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

14 years agos390x: add test cases for STCK{,E,F} instructions. See #271779.
Julian Seward [Tue, 17 May 2011 16:19:53 +0000 (16:19 +0000)] 
s390x: add test cases for STCK{,E,F} instructions.  See #271779.
(Christian Borntraeger <borntraeger@de.ibm.com> and Divya Vyas)

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

14 years agoEnable sys_pwrite64 on ppc64-linux. Fixes #272955.
Julian Seward [Tue, 17 May 2011 16:07:33 +0000 (16:07 +0000)] 
Enable sys_pwrite64 on ppc64-linux.  Fixes #272955.
(Maynard Johnson, maynardj@us.ibm.com)

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

14 years agoAdd entry w.r.t. the s390x port. (Florian Krohm <britzel@acm.org> and
Julian Seward [Tue, 17 May 2011 15:54:31 +0000 (15:54 +0000)] 
Add entry w.r.t. the s390x port.  (Florian Krohm <britzel@acm.org> and
Christian Borntraeger <borntraeger@de.ibm.com>)

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

14 years agoUpdate expected outputs.
Julian Seward [Tue, 17 May 2011 15:52:28 +0000 (15:52 +0000)] 
Update expected outputs.

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

14 years agoMake this test much more independent of glibc, and update outputs
Julian Seward [Tue, 17 May 2011 15:36:01 +0000 (15:36 +0000)] 
Make this test much more independent of glibc, and update outputs
accordingly.

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

14 years agoReorder tests poking around in the x86 instruction stream (sigh)
Julian Seward [Mon, 16 May 2011 11:49:40 +0000 (11:49 +0000)] 
Reorder tests poking around in the x86 instruction stream (sigh)
in order to try and avoid segfaults when we back up over a page
boundary.

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

14 years agoSuppressed compiler warnings triggered by none/tests/amd64/fxtract.c too.
Bart Van Assche [Sun, 15 May 2011 17:53:26 +0000 (17:53 +0000)] 
Suppressed compiler warnings triggered by none/tests/amd64/fxtract.c too.

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

14 years agogdbserver_tests/make_local_links: made invocation of "head" POSIX-compliant since...
Bart Van Assche [Sun, 15 May 2011 17:07:47 +0000 (17:07 +0000)] 
gdbserver_tests/make_local_links: made invocation of "head" POSIX-compliant since on some distros only the POSIX-compliant invocation is accepted.

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

14 years agoSilence compiler warnings triggered by certain regression tests programs and that...
Bart Van Assche [Sun, 15 May 2011 17:06:33 +0000 (17:06 +0000)] 
Silence compiler warnings triggered by certain regression tests programs and that we are not interested in.

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

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 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 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 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 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 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 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 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 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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