]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
13 years agoAlso parse stdoutB_filter_args and stderrB_filter_args.
Florian Krohm [Mon, 3 Oct 2011 00:19:05 +0000 (00:19 +0000)] 
Also parse stdoutB_filter_args and stderrB_filter_args.
Forgot to do that in r12045.

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

13 years agoAdd read_Addr and use it so that we work on systems where an address
Tom Hughes [Sun, 2 Oct 2011 12:12:38 +0000 (12:12 +0000)] 
Add read_Addr and use it so that we work on systems where an address
is bigger that an int.

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

13 years agoAvoid using direct access to read multi-byte values from DWARF files
Tom Hughes [Sun, 2 Oct 2011 10:49:35 +0000 (10:49 +0000)] 
Avoid using direct access to read multi-byte values from DWARF files
and use read_Type routines instead as they work rather better on strict
aligned (or semi-strict a la ARM) machines. Fixes #282527.

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

13 years agoUse read_UInt to get the CRC as it may not be aligned. Fixes #283154.
Tom Hughes [Sun, 2 Oct 2011 10:22:08 +0000 (10:22 +0000)] 
Use read_UInt to get the CRC as it may not be aligned. Fixes #283154.

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

13 years agoMove read_<type> routines from readdwarf.c to be module level
Tom Hughes [Sun, 2 Oct 2011 10:20:12 +0000 (10:20 +0000)] 
Move read_<type> routines from readdwarf.c to be module level
routines in misc.c so that other parts of the debuginfo module
can access them.

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

13 years agoUpdate for x86.
Florian Krohm [Sun, 2 Oct 2011 03:06:39 +0000 (03:06 +0000)] 
Update for x86.
r8744 gave mainSort the "noinline" attribute, thereby changing
the backtrace. Nox fixed.

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

13 years agoAdd exp file for x86. This test is known to fail on that platform
Florian Krohm [Sun, 2 Oct 2011 00:38:22 +0000 (00:38 +0000)] 
Add exp file for x86. This test is known to fail on that platform
by omitting a frame in the backtrace. Hence, the "kfail" in the
file name.

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

13 years agoUpdate for x86. This should have happened in r11741 which
Florian Krohm [Sun, 2 Oct 2011 00:18:29 +0000 (00:18 +0000)] 
Update for x86. This should have happened in r11741 which
changed the message format.

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

13 years agoChange the filtering of helgrind's XML output.
Florian Krohm [Sat, 1 Oct 2011 21:07:32 +0000 (21:07 +0000)] 
Change the filtering of helgrind's XML output.
New file helgrind/tests/filter_xml.
Update expected result for tc06_two_races_xml.

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

13 years agoUpdate re OSX 10.7.
Julian Seward [Fri, 30 Sep 2011 17:55:13 +0000 (17:55 +0000)] 
Update re OSX 10.7.

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

13 years ago* (marginally) fix debug printing for new 10.7 syscalls
Julian Seward [Fri, 30 Sep 2011 17:51:21 +0000 (17:51 +0000)] 
* (marginally) fix debug printing for new 10.7 syscalls
* also, remove SfMayBlock annotations for those that obviously won't

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

13 years agoFix a couple of buffer overruns. n-i-bz.
Julian Seward [Fri, 30 Sep 2011 07:11:13 +0000 (07:11 +0000)] 
Fix a couple of buffer overruns.  n-i-bz.
(Philippe Waroquiers, philippe.waroquiers@skynet.be)

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

13 years agoMake wqthread_hijack not assert on x86-darwin. Same hack as
Julian Seward [Fri, 30 Sep 2011 07:05:17 +0000 (07:05 +0000)] 
Make wqthread_hijack not assert on x86-darwin.  Same hack as
for the 64-bit case.

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

13 years agoUse <sys/mman.h> instead of <linux/mman.h> to fix a compile problem
Florian Krohm [Fri, 30 Sep 2011 01:27:26 +0000 (01:27 +0000)] 
Use <sys/mman.h> instead of <linux/mman.h> to fix a compile problem
on SLES 10.  Patch by Rich Coe (rcoe@wi.rr.com). Fixes bugzilla #282238.

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

13 years agoChange the name of the pipes for vgdb by adding username and hostname.
Florian Krohm [Thu, 29 Sep 2011 21:20:49 +0000 (21:20 +0000)] 
Change the name of the pipes for vgdb by adding username and hostname.
Those are obtained by looking at some commonly defined environment
variables.
That should help with problems where /tmp is shared or process IDs get
recycled. We had some intermittent nightly build issues because of that.
Partial fix for bugzilla #280757.

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

13 years agoMake {amd64,x86}-darwin use the direct implementations of
Julian Seward [Thu, 29 Sep 2011 18:29:41 +0000 (18:29 +0000)] 
Make {amd64,x86}-darwin use the direct implementations of
VG_MINIMAL_SETJMP and VG_MINIMAL_LONGJMP introduced in r12067.

With this commit, it should be possible to build a working 64 bit
Valgrind using the default gcc as supplied with Xcode 4.1 on OSX 10.7.

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

13 years agoUn-break the compiler version check on Darwin (introduced by r12066)
Julian Seward [Thu, 29 Sep 2011 18:18:37 +0000 (18:18 +0000)] 
Un-break the compiler version check on Darwin (introduced by r12066)
without (hopefully) breaking it on any other platform.

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

13 years agoBe a bit more careful about the return type for VG_MINIMAL_SETJMP,
Julian Seward [Thu, 29 Sep 2011 17:34:17 +0000 (17:34 +0000)] 
Be a bit more careful about the return type for VG_MINIMAL_SETJMP,
both the home-grown versions and the versions that feed through to
__builtin_setjmp.

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

13 years agox86-linux, amd64-linux: Implement VG_MINIMAL_SETJMP and
Julian Seward [Thu, 29 Sep 2011 17:33:58 +0000 (17:33 +0000)] 
x86-linux, amd64-linux: Implement VG_MINIMAL_SETJMP and
VG_MINIMAL_LONGJMP directly, rather than using __builtin_setjmp
and __builtin_longjmp, since clang-2.9 miscompiles the latter
(by completely ignoring it.)

Also, add comment about the return type for VG_MINIMAL_SETJMP.

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

13 years agoAccept clang-2.9 as an allowable compiler.
Julian Seward [Thu, 29 Sep 2011 17:30:13 +0000 (17:30 +0000)] 
Accept clang-2.9 as an allowable compiler.

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

13 years agoCompile everything with -fno-builtin, so as to disable LLVM's
Julian Seward [Thu, 29 Sep 2011 17:29:53 +0000 (17:29 +0000)] 
Compile everything with -fno-builtin, so as to disable LLVM's
idiom-recognition optimisation.  This identifies memset-style
loops and turns them into calls to memset, which in this case
leads to infinite recursion because it does this transformations
in VG_(memset), which is called from memset(), which we also define.

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

13 years agoFix a regression (none/tests/cmdline[12]) which was introduced
Florian Krohm [Thu, 29 Sep 2011 14:26:38 +0000 (14:26 +0000)] 
Fix a regression (none/tests/cmdline[12]) which was introduced
by r12063.
VG_(clo_vgdb_prefix) was used before it was initialized.

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

13 years agoRemove hardwired /tmp directory in vgdb. Honour VG_TMPDIR
Florian Krohm [Thu, 29 Sep 2011 03:03:45 +0000 (03:03 +0000)] 
Remove hardwired /tmp directory in vgdb. Honour VG_TMPDIR
and TMPDIR which was introduced when fixing bugzilla #267020.
Factor out VG_(tmpdir). New function VG_(vgdb_path_prefix).
Partially fixes bugzilla #280757.

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

13 years agoFix a NULL pointer dereference issue spotted by IBM's BEAM checker.
Florian Krohm [Wed, 28 Sep 2011 17:43:44 +0000 (17:43 +0000)] 
Fix a NULL pointer dereference issue spotted by IBM's BEAM checker.

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

13 years agoUpdate how-to-build documentation.
Julian Seward [Tue, 27 Sep 2011 11:54:01 +0000 (11:54 +0000)] 
Update how-to-build documentation.

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

13 years agoAdd support for hardware-specific ioctl wrappers on Android,
Julian Seward [Tue, 27 Sep 2011 11:40:24 +0000 (11:40 +0000)] 
Add support for hardware-specific ioctl wrappers on Android,
starting with those required for the graphics hardware on
Nexus S.

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

13 years agoAndroid: add wrappers for ashmem and binder ioctls. From the AOSP
Julian Seward [Tue, 27 Sep 2011 10:26:52 +0000 (10:26 +0000)] 
Android: add wrappers for ashmem and binder ioctls.  From the AOSP
port of Valgrind.

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

13 years agoUn-break debuginfo image finding on non-Android Linuxes following
Julian Seward [Tue, 27 Sep 2011 10:24:52 +0000 (10:24 +0000)] 
Un-break debuginfo image finding on non-Android Linuxes following
r12057, duh.

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

13 years agoAdd a facility for ad-hoc location of debuginfo files on Android.
Julian Seward [Tue, 27 Sep 2011 09:26:39 +0000 (09:26 +0000)] 
Add a facility for ad-hoc location of debuginfo files on Android.
All other platforms are unaffected.

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

13 years agoML_(read_elf_debug_info): (no functional change, I hope): fix up
Julian Seward [Tue, 27 Sep 2011 08:57:41 +0000 (08:57 +0000)] 
ML_(read_elf_debug_info): (no functional change, I hope): fix up
confusing control flow, by separating the logic for "is there a
debuginfo file to be found?" from that of "if a debuginfo file was
found, let's record certain facts (section offsets etc) about it."

This makes it possible to add arbitrary other schemes for finding
debuginfo files without further complicating the existing control flow.

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

13 years agoAndroid only: don't ignore zero-sized symbols, since some of them
Julian Seward [Tue, 27 Sep 2011 08:06:14 +0000 (08:06 +0000)] 
Android only: don't ignore zero-sized symbols, since some of them
are ones that m_redir really needs to see.

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

13 years agoarm_linux_android: intercept __dl_strcmp and __dl_strlen in
Julian Seward [Mon, 26 Sep 2011 20:20:19 +0000 (20:20 +0000)] 
arm_linux_android: intercept __dl_strcmp and __dl_strlen in
/system/bin/linker, for the usual reason.

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

13 years agoInitial suppressions from Android 2.3.5 (on ARM).
Julian Seward [Mon, 26 Sep 2011 20:18:29 +0000 (20:18 +0000)] 
Initial suppressions from Android 2.3.5 (on ARM).

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

13 years agoHeap profiler: reduce threshold at which a new profile is shown for
Julian Seward [Mon, 26 Sep 2011 20:17:41 +0000 (20:17 +0000)] 
Heap profiler: reduce threshold at which a new profile is shown for
an arena from 10% to 5%.

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

13 years agoPretty up the debugging hack that allows printing of stack traces
Julian Seward [Mon, 26 Sep 2011 20:16:15 +0000 (20:16 +0000)] 
Pretty up the debugging hack that allows printing of stack traces
for selected syscalls.

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

13 years agoRe-enable the use of loctab (line number table) trimming, for a 5% to
Julian Seward [Mon, 26 Sep 2011 20:15:07 +0000 (20:15 +0000)] 
Re-enable the use of loctab (line number table) trimming, for a 5% to
10% reduction in debuginfo storage requirements for large applications
on 32 bit platforms.  This code had been present since the MacOSX port
was merged but had been disabled.  Remove equivalent code for
shrinking the symbol tables since they are much (4 x) smaller than the
line number tables, trimming them is hardly worth the effort.

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

13 years agorun_a_thread_NORETURN: add trashed-register annotations for the magic
Julian Seward [Mon, 26 Sep 2011 17:50:46 +0000 (17:50 +0000)] 
run_a_thread_NORETURN: add trashed-register annotations for the magic
bits of assembly which finally cause the thread to exit.  How this
ever worked before, on any platform, beats me.  The lack was causing
some Android builds to segfault at thread exit.  Only the s390 version
was correct.

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

13 years agoPrint a slightly less useless failure message if VG_(mkstemp) fails to
Julian Seward [Mon, 26 Sep 2011 16:46:04 +0000 (16:46 +0000)] 
Print a slightly less useless failure message if VG_(mkstemp) fails to
create a temp file, as often happens on Android.

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

13 years agom_mallocfree.c: generalise 'reclaimSuperBlock' to also reclaim
Julian Seward [Mon, 26 Sep 2011 11:28:20 +0000 (11:28 +0000)] 
m_mallocfree.c: generalise 'reclaimSuperBlock' to also reclaim
splittable superblocks.  Bug #282105.

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

A previous patch (bug 250101) introduced the concept of reclaimable
superblock: a superblock that cannot be splitted in smaller blocks
and that can be munmapped.

This patch generalises the reclaimable concept : all superblocks are
now reclaimable. To reduce fragmentation, big superblocks are still
kept unsplittable.

The patch has 4 aspects:
1 The previous concept of 'reclaimable superblock' is renamed
  'unsplittable superblock' (this is a mechanical change).
2 Ensure that splittable blocks can be reclaimed :
  After each free, if the free results in a merged block which
  completely covers the superblock, then the superblock can be reclaimed.
3 If a superblock is reclaimed and there exists some translations
  for this superblock then discard the translations.
  Note : I did not understand the comment speaking about
  circular dependency. Just calling VG_(discard_translations) seems
  to cause no problem. As m_transtab.c does not allocate client memory,
  I believe no circular (dynamic) dependency can be done.
4 Activate 'unsplittable superblock' for all arenas.

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

13 years agoMake filter_helgrind executable. Should unbreak the build.
Florian Krohm [Mon, 26 Sep 2011 04:35:45 +0000 (04:35 +0000)] 
Make filter_helgrind executable. Should unbreak the build.

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

13 years agoChange the backtrace filtering machinery for the helgrind regression
Florian Krohm [Mon, 26 Sep 2011 00:29:44 +0000 (00:29 +0000)] 
Change the backtrace filtering machinery for the helgrind regression
bucket. Instead of removing what we don't want to see in a backtrace
(e.g. path segments through libc and libpthread), we simply keep what
we do want to see. That way .exp files can be generic.
We need to make sure that GCC inlining does not get in the way. So all
the ..._WRK function in hg_intercepts.c are attributed as noinline.
The backtrace filtering is done in the new filter_helgrind script.
filter_stderr is simplified quite a bit.
Fixes bug #281468. See also the comments #5 and #6 there.

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

13 years agoRemove code duplication from the dispatchers. Keep the core loop
Florian Krohm [Sun, 25 Sep 2011 00:15:54 +0000 (00:15 +0000)] 
Remove code duplication from the dispatchers. Keep the core loop
in common.
To accomplish that without penalizing the non-profiling dispatcher
we do the stats gathering *after* the jitted code returns to the
dispatcher. For that to work properly, we need to stash away the
instruction adddress before entering the jitted code so we can use
it later. (See also VEX r2208).

Two other tweaks are included here:
(1) For the non-profiling dispatcher it is not necessary to update
    the LR in each iteration. Quite obviously the jitted code cannot
    modify the LR in its iteration because it needs it at the very end
    when it returns. So we move this step out of the core loop.
(2) Move loading the address of VG_(tt_fast) past testing for a changed
    guest state pointer.

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

13 years agoAdd initial support for Mac OS X 10.7 (Lion). Tracked by bug #275168.
Julian Seward [Wed, 21 Sep 2011 08:43:08 +0000 (08:43 +0000)] 
Add initial support for Mac OS X 10.7 (Lion).  Tracked by bug #275168.

* configure.in support

* new supp file darwin11.supp

* comment out many intercepts in mc_replace_strmem.c and
  vg_replace_malloc.c that are apparently unnecessary for Darwin

* add minimal handling for the following new syscalls and mach traps:
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost

* wqthread_hijack on amd64-darwin: deal with
  tst->os_state.pthread having an apparently different offset,
  which caused an assertion failure

* m_debuginfo: for 32 bit processes on Lion, use the DebugInfoFSM
  cleanup added in r12041/12042 to handle apparently new dyld
  behaviour, which is to map text areas r-- first and only
  vm_protect them later to r-x.

The following cleanups remain to be done

* remove apparently pointless, commented out wrapper macro
  invokations in mc_replace_strmem.c, eg

  //MEMMOVE(VG_Z_DYLD,        memmove)

  (or determine that they are still necessary, and uncomment)

* ditto in vg_replace_malloc.c, plus general VGO_darwin cleanups
  there

* write proper syscall wrappers for
    mach_port_set_context
    task_get_exception_ports
    getaudit_addr
    psynch_mutexwait
    psynch_mutexdrop
    psynch_cvbroad
    psynch_cvsignal
    psynch_cvwait
    psynch_rw_rdlock
    psynch_rw_wrlock
    psynch_rw_unlock
    psynch_cvclrprepost
  These are currently just no-ops and may be causing Memcheck to
  report false undef-value errors

* figure out why it doesn't work properly unless built with gcc-4.2 on
  Lion.

  gcc-4.2 is the "normal" gcc (i686-apple-darwin11-gcc-4.2.1).  Plain
  gcc is the hybrid gcc-front-end clang-back-end thing
  (i686-apple-darwin11-llvm-gcc-4.2).  Whereas on Snow Leopard, plain
  gcc is the normal gcc.

  The symptoms of the failure are that wqthread_hijack in
  syswrap-amd64-linux.c hits this /*NOTREACHED*/ vg_assert(0); right
  at the end (you need a pretty complex threaded app to trigger this),
  which makes me think that either ML_(wqthread_continue_NORETURN) or
  call_on_new_stack_0_1 do return, which they are not expected to.

* figure out if some of the uninitialised value errors reported in
  system libraries on are caused by Memcheck being confused by LLVM
  generated code, as per bug #242137

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

13 years agoUn-break Darwin build following r12041 (creation of struct _DebugInfoFSM)
Julian Seward [Tue, 20 Sep 2011 22:36:26 +0000 (22:36 +0000)] 
Un-break Darwin build following r12041 (creation of struct _DebugInfoFSM)

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

13 years agoA refactoring change; no functional effect. struct _DebugInfo
Julian Seward [Tue, 20 Sep 2011 21:59:50 +0000 (21:59 +0000)] 
A refactoring change; no functional effect.  struct _DebugInfo
contains a bunch of fields which are used as a very simple state
machine that observes mmap calls and decides when to read debuginfo
for the associated file.  This change moves these fields into their
own structure, struct _DebugInfoFSM, for cleanness, so as to make it
clear they have a common purpose.

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

13 years agoGet rid of DebugInfo::memname, a hangover from the now-removed
Julian Seward [Tue, 20 Sep 2011 16:10:59 +0000 (16:10 +0000)] 
Get rid of DebugInfo::memname, a hangover from the now-removed
AIX5 support.

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

13 years agoDisable sending diffs for the z900 build for now.
Florian Krohm [Mon, 19 Sep 2011 02:33:35 +0000 (02:33 +0000)] 
Disable sending diffs for the z900 build for now.
They are too big to be posted to the mailing list without
moderator interaction.

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

13 years agoFix tc23_bogus_condwait.c testcase for s390x.
Florian Krohm [Sun, 18 Sep 2011 00:11:12 +0000 (00:11 +0000)] 
Fix tc23_bogus_condwait.c testcase for s390x.
The testcase used to cause a SIGILL because the address of the bogus
mutex  1 + (char*)&mx[0]  denotes a memory location that will eventually
appear in a compare-and-swap instruction. That insn does not allow
memory operands that are not word-aligned. Hence, the SIGILL.
With this fix both incarnations of this testcase (in helgrind and drd)
pass.

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

13 years agoTweak s390x dispatcher. Using CG elminates two load insns.
Florian Krohm [Sat, 17 Sep 2011 22:18:01 +0000 (22:18 +0000)] 
Tweak s390x dispatcher. Using CG elminates two load insns.

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

13 years agoDispatcher tweak. Saves ALU operation. Suggested by Julian Seward.
Florian Krohm [Sat, 17 Sep 2011 15:46:59 +0000 (15:46 +0000)] 
Dispatcher tweak. Saves ALU operation. Suggested by Julian Seward.
Implemented by Christian Borntraeger (borntraeger@de.ibm.com).
See bugzilla #274378

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

13 years agoMake drd/drd_pthread_intercepts.c compile again on Linux systems without usable ...
Bart Van Assche [Sat, 17 Sep 2011 06:24:49 +0000 (06:24 +0000)] 
Make drd/drd_pthread_intercepts.c compile again on Linux systems without usable <linux/futex.h> header

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

13 years agoAdd exp files for s390x. GCC's use of the MVC insn causes
Florian Krohm [Tue, 13 Sep 2011 16:00:38 +0000 (16:00 +0000)] 
Add exp files for s390x. GCC's use of the MVC insn causes
duplicate errors and a different memory access pattern.

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

13 years agoFix the system call wrapper for the clone system call (s390x).
Florian Krohm [Tue, 13 Sep 2011 14:57:35 +0000 (14:57 +0000)] 
Fix the system call wrapper for the clone system call (s390x).
Fixes #281883. Patch by Christian Borntraeger (borntraeger@de.ibm.com).

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

13 years agoAdd an .exp for s390x. Certain older kernels had a bug in providing
Florian Krohm [Mon, 12 Sep 2011 20:22:38 +0000 (20:22 +0000)] 
Add an .exp for s390x. Certain older kernels had a bug in providing
an invalid siginfo for SIGBUS. Hunted down and fixed by
Christian Borntraeger (borntraeger@de.ibm.com).

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

13 years agoThis testcase is sensitive to some sleep period. On slower
Florian Krohm [Sun, 11 Sep 2011 14:39:02 +0000 (14:39 +0000)] 
This testcase is sensitive to some sleep period. On slower
machines we need to sleep longer. See bugzilla #268623 comment #2.
So let's sleep 500ms instead of 100ms, get rid of the load
barrier and enable the testcase for s390x again.

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

13 years agoAdd more .exp files for s390 due to GCC's use of the MVC insn.
Florian Krohm [Sat, 10 Sep 2011 21:46:08 +0000 (21:46 +0000)] 
Add more .exp files for s390 due to GCC's use of the MVC insn.

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

13 years agoBack out r12026; instead add a new .exp file for s390x.
Florian Krohm [Sat, 10 Sep 2011 20:54:17 +0000 (20:54 +0000)] 
Back out r12026; instead add a new .exp file for s390x.

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

13 years agoAdd config files for z900 nightly build
Florian Krohm [Sat, 10 Sep 2011 18:59:10 +0000 (18:59 +0000)] 
Add config files for z900 nightly build

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

13 years agoSensitivity fix. On slow machines (s390x z900) need to sleep longer.
Florian Krohm [Sat, 10 Sep 2011 18:28:57 +0000 (18:28 +0000)] 
Sensitivity fix. On slow machines (s390x z900) need to sleep longer.

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

13 years agoFor s390x we also need to accept a reported size of 1.
Florian Krohm [Sat, 10 Sep 2011 17:56:21 +0000 (17:56 +0000)] 
For s390x we also need to accept a reported size of 1.
This is due to older versions of GCC who use the MVC insn for
assignments and that creates a sequence of 1-byte memory accesses.

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

13 years agoUpdate build instructions.
Julian Seward [Sat, 10 Sep 2011 11:28:51 +0000 (11:28 +0000)] 
Update build instructions.

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

13 years agoML_(read_elf_debug_info): debug printing of program header entries: print file
Julian Seward [Sat, 10 Sep 2011 11:21:59 +0000 (11:21 +0000)] 
ML_(read_elf_debug_info): debug printing of program header entries: print file
offsets consistently in base 10, not 16.

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

13 years agoML_(read_elf_debug_info): if we exit from this routine via the BAD
Julian Seward [Sat, 10 Sep 2011 11:20:26 +0000 (11:20 +0000)] 
ML_(read_elf_debug_info): if we exit from this routine via the BAD
macro, set di->soname back to NULL, so that if we later reenter with
the same 'di', we don't fall over the initial di->soname == NULL
assertion.

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

13 years agoAvoid excessive fragmentation in m_mallocfree by munmapping unused
Julian Seward [Sat, 10 Sep 2011 10:17:35 +0000 (10:17 +0000)] 
Avoid excessive fragmentation in m_mallocfree by munmapping unused
superblocks in some circumstances (second attempt).  Bug 250101
comment 15.  (Philippe Waroquiers, philippe.waroquiers@skynet.be).

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

13 years agoProperly preserve FP registers (and, more generally, the entire guest
Julian Seward [Sat, 10 Sep 2011 09:10:03 +0000 (09:10 +0000)] 
Properly preserve FP registers (and, more generally, the entire guest
state) across signal deliveries.  Fixes #281488.

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

13 years agoAdditional .exp file for s390x.
Florian Krohm [Sat, 10 Sep 2011 03:28:11 +0000 (03:28 +0000)] 
Additional .exp file for s390x.

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

13 years agoDisable testcase on s390x. Still hangs occasionally.
Florian Krohm [Fri, 9 Sep 2011 20:58:13 +0000 (20:58 +0000)] 
Disable testcase on s390x. Still hangs occasionally.

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

13 years agoFix testcase for s390x. Provide implementation of XCHG_M_R.
Florian Krohm [Fri, 9 Sep 2011 18:37:55 +0000 (18:37 +0000)] 
Fix testcase for s390x. Provide implementation of XCHG_M_R.

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

13 years agoAdd a prerequisite because drd/tests/annotate_smart_pointer is not always
Florian Krohm [Fri, 9 Sep 2011 15:50:45 +0000 (15:50 +0000)] 
Add a prerequisite because drd/tests/annotate_smart_pointer is not always
built.

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

13 years agoAdd config files for nightly s390 builds.
Florian Krohm [Fri, 9 Sep 2011 02:56:00 +0000 (02:56 +0000)] 
Add config files for nightly s390 builds.

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

13 years agoSupport CLCL and MVCL instructions. This is the non-VEX part.
Florian Krohm [Thu, 8 Sep 2011 15:39:10 +0000 (15:39 +0000)] 
Support CLCL and MVCL instructions. This is the non-VEX part.
Fixes #279027.  See VEX r2200.

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

13 years agoMake some vgdb interface to callgrind_control internal
Josef Weidendorfer [Tue, 6 Sep 2011 19:08:35 +0000 (19:08 +0000)] 
Make some vgdb interface to callgrind_control internal

The vgdb "status" monitor command is still available, but
used for pretty printing of status information now (acutally,
just some place holder for real information up to now: just
number of running threads). The internal interface used by
callgrind_control to provide stack traces and event counts
is using "status internal", and is not documented, as the
format is not for human consumption.

This also adds some documentation.

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

13 years agoAllow overriding not-supported auto-detected cache configs
Josef Weidendorfer [Tue, 6 Sep 2011 19:08:31 +0000 (19:08 +0000)] 
Allow overriding not-supported auto-detected cache configs

Patch by Philippe Waroquiers, slightly changed.

This actually was a regression from 3.6.1, but the patch
also improves on printed messages, and refactors common
code between cachegrind and callgrind.

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

13 years agoChange get_svn_revision to also work with older subversion releases
Florian Krohm [Tue, 6 Sep 2011 17:17:41 +0000 (17:17 +0000)] 
Change get_svn_revision to also work with older subversion releases
that do not allow specifying a revision with svn info.

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

13 years agoPrint the (pseudo-)soname when doing debug printing for Mach-O
Julian Seward [Tue, 6 Sep 2011 11:26:31 +0000 (11:26 +0000)] 
Print the (pseudo-)soname when doing debug printing for Mach-O
debuginfo reading.

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

13 years ago* whitespace changes
Julian Seward [Mon, 5 Sep 2011 22:18:13 +0000 (22:18 +0000)] 
* whitespace changes

* move MEMCPY(NONE, ZuintelZufastZumemcpy) to the correct ifdef;
  it got put in the wrong place by r12009 a couple of hours ago.

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

13 years agoFor intercepts in libc and the dynamic linker (ld.so or dyld), split
Julian Seward [Mon, 5 Sep 2011 20:39:57 +0000 (20:39 +0000)] 
For intercepts in libc and the dynamic linker (ld.so or dyld), split
the Linux and Darwin definitions so they are in completely separate
ifdefs -- iow, remove any definitions that are common to both.  This
gives some duplication, but the upside is that it is now possible to
edit the Darwin intercepts without fear of breaking the Linux ones.
This will be important when it comes to supporting OSX 10.7.

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

13 years agoAvoid hanging on older s390x systems.
Florian Krohm [Mon, 5 Sep 2011 15:32:39 +0000 (15:32 +0000)] 
Avoid hanging on older s390x systems.
See also bugzilla #268623 comment 3.

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

13 years agoAdd support for IBM Power ISA 2.06 -- stage 3 -- Test cases.
Julian Seward [Mon, 5 Sep 2011 12:15:16 +0000 (12:15 +0000)] 
Add support for IBM Power ISA 2.06 -- stage 3 -- Test cases.
Bug 279994 comment 2).
(Maynard Johnson, maynardj@us.ibm.com)

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

13 years agoAdd support for new primops added in vex r2199.
Julian Seward [Mon, 5 Sep 2011 12:12:34 +0000 (12:12 +0000)] 
Add support for new primops added in vex r2199.
See Bug 279994 comment 1.
(Maynard Johnson, maynardj@us.ibm.com)

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

13 years agoAdd support for s390x model z114. See also VEX r2198
Florian Krohm [Fri, 2 Sep 2011 22:20:41 +0000 (22:20 +0000)] 
Add support for s390x model z114. See also VEX r2198

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

13 years agodrd: Yet another regression test reliability improvement.
Bart Van Assche [Tue, 30 Aug 2011 15:09:37 +0000 (15:09 +0000)] 
drd: Yet another regression test reliability improvement.

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

13 years agodrd: Avoid reporting false positive race reports inside pthread_join().
Bart Van Assche [Wed, 24 Aug 2011 15:02:21 +0000 (15:02 +0000)] 
drd: Avoid reporting false positive race reports inside pthread_join().

Note: I haven't analyzed yet since which commit these false positives
started to appear but it's most likely a commit applied after the 3.6
release.

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

13 years agofix the suppressions to also match libc-2.XX.y.so
Dirk Mueller [Tue, 23 Aug 2011 20:29:10 +0000 (20:29 +0000)] 
fix the suppressions to also match libc-2.XX.y.so

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

13 years agoMake a copy of any environment string we are going to modify when
Tom Hughes [Tue, 23 Aug 2011 10:11:02 +0000 (10:11 +0000)] 
Make a copy of any environment string we are going to modify when
we are cleaning up the environment before an exec, otherwise we
will seg fault if the string is read only. Fixes #270326.

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

13 years agoFix link error for 32-bit build on OSX 10.7 (Lion). This is the
Julian Seward [Tue, 23 Aug 2011 07:35:42 +0000 (07:35 +0000)] 
Fix link error for 32-bit build on OSX 10.7 (Lion).  This is the
failure referred to in #275168 comment 0.

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

13 years agoRemove the svn:executable property from a source file
Bart Van Assche [Mon, 22 Aug 2011 14:35:04 +0000 (14:35 +0000)] 
Remove the svn:executable property from a source file

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

13 years agoMake sure this gets built with -fomit-frame-pointer, even on x86-linux,
Julian Seward [Sat, 20 Aug 2011 15:55:07 +0000 (15:55 +0000)] 
Make sure this gets built with -fomit-frame-pointer, even on x86-linux,
where it otherwise wouldn be.  On x86-linux running Memcheck, gives a
6% instruction count reduction and a 10% reduction in memory traffic.
(Duh!)

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

13 years agomemcheck/tests/linux/timerfd-syscall: Avoid failure on heavily loaded systems
Bart Van Assche [Sat, 20 Aug 2011 11:08:48 +0000 (11:08 +0000)] 
memcheck/tests/linux/timerfd-syscall: Avoid failure on heavily loaded systems

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

13 years agoAdd more info about cache sizes.
Florian Krohm [Fri, 19 Aug 2011 19:41:57 +0000 (19:41 +0000)] 
Add more info about cache sizes.

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

13 years agoMake callgrind report the detected cache configuration as well.
Tom Hughes [Fri, 19 Aug 2011 09:05:13 +0000 (09:05 +0000)] 
Make callgrind report the detected cache configuration as well.

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

13 years agoReport the detected cache configuration with "-v -v" before we
Tom Hughes [Fri, 19 Aug 2011 09:01:22 +0000 (09:01 +0000)] 
Report the detected cache configuration with "-v -v" before we
validate it to make validation failures easier to diagnose.

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

13 years agoAdd a new simulation hint, --sim-hints=fuse-compatible, which causes
Julian Seward [Thu, 18 Aug 2011 15:08:20 +0000 (15:08 +0000)] 
Add a new simulation hint, --sim-hints=fuse-compatible, which causes
a bunch of file-related syscalls to be handled on the might-block
syscall path rather than the fast syscall path.  This fixes deadlocks
when running some FUSE-specific filesystem codes.  Fixes #278057.
(Mike Shal, marfey@gmail.com)

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

13 years agox86-linux: don't add redirections for strchr/index in ld.so since they
Julian Seward [Thu, 18 Aug 2011 13:49:48 +0000 (13:49 +0000)] 
x86-linux: don't add redirections for strchr/index in ld.so since they
are already hardwiredly-redirected at startup, and so these are
redundant.

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

13 years agoExtend the behavioural-equivalence-class mechanism for redirection
Julian Seward [Thu, 18 Aug 2011 13:09:55 +0000 (13:09 +0000)] 
Extend the behavioural-equivalence-class mechanism for redirection
functions to include the ability to give a priority to each function,
as well as a tag indicating its behavioural class.  Add logic in
m_redir.c to resolve conflicting redirections with the same eclass but
different priorities by preferring the redirection with the higher
priority.  Use all of the above in mc_replace_strmem.c, to cause a
conflict between redirections for "memcpy" and "memcpy@GLIBC_2.2.5" to
be resolved in favour of the latter (the non-overlap-checking
version).

This is all related to the massive swamp that is #275284.

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

13 years agoDon't compare src and dst to work out which direction to iterate
Tom Hughes [Thu, 18 Aug 2011 08:10:20 +0000 (08:10 +0000)] 
Don't compare src and dst to work out which direction to iterate
in for a memcpy/memmove if the length is zero. Fixes #268563.

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

13 years agoTemporary partial backout of r11911 (fix for #250101) pending
Julian Seward [Wed, 17 Aug 2011 22:13:14 +0000 (22:13 +0000)] 
Temporary partial backout of r11911 (fix for #250101) pending
investigation of assertion failures listed at #250101 comment 12.

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

13 years agoRedirect memcpy@@GLIBC_2.14 differently from memcpy@GLIBC_2.2.5, so as
Julian Seward [Wed, 17 Aug 2011 21:25:50 +0000 (21:25 +0000)] 
Redirect memcpy@@GLIBC_2.14 differently from memcpy@GLIBC_2.2.5, so as
to retain overlap checks for the former whilst skipping them for the
latter.  Pertains to #275284.  (Tom Hughes, tom@compton.nu)

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

13 years agoImprovements to debug printing with -v -v. (Tom Hughes, tom@compton.nu)
Julian Seward [Wed, 17 Aug 2011 21:23:21 +0000 (21:23 +0000)] 
Improvements to debug printing with -v -v.  (Tom Hughes, tom@compton.nu)

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

13 years agoUn-break the build on OSX following r11985.
Julian Seward [Tue, 16 Aug 2011 22:31:45 +0000 (22:31 +0000)] 
Un-break the build on OSX following r11985.

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