]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoAnnounce fix for BZ #269360.
Florian Krohm [Sat, 22 Nov 2014 20:15:11 +0000 (20:15 +0000)] 
Announce fix for BZ #269360.

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

10 years agoUpdate.
Julian Seward [Sat, 22 Nov 2014 11:57:18 +0000 (11:57 +0000)] 
Update.

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

10 years agoisBogusAtom: handle missing case Ico_F32.
Julian Seward [Thu, 20 Nov 2014 10:15:17 +0000 (10:15 +0000)] 
isBogusAtom: handle missing case Ico_F32.

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

10 years agoUpdate mysteriously out-of-date fp_and_simd.stdout.exp.
Julian Seward [Thu, 20 Nov 2014 10:11:42 +0000 (10:11 +0000)] 
Update mysteriously out-of-date fp_and_simd.stdout.exp.

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

10 years agoAdd test cases for {S,U}CVTF fixedpt-to-fp.
Julian Seward [Thu, 20 Nov 2014 10:11:00 +0000 (10:11 +0000)] 
Add test cases for {S,U}CVTF fixedpt-to-fp.

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

10 years agoFix typos in a comment
Philippe Waroquiers [Wed, 19 Nov 2014 22:21:12 +0000 (22:21 +0000)] 
Fix typos in a comment

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

10 years agoAdd test cases for VFPv4 VFNMA, VFNMS added in vex r2995.
Julian Seward [Wed, 19 Nov 2014 16:09:08 +0000 (16:09 +0000)] 
Add test cases for VFPv4 VFNMA, VFNMS added in vex r2995.
Pertains to #340807.

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

10 years agoAdd a lot more intercepts. Very crude. I am sure this is merely
Julian Seward [Wed, 19 Nov 2014 09:15:56 +0000 (09:15 +0000)] 
Add a lot more intercepts.  Very crude.  I am sure this is merely
hiding a whole bunch of problems in the Darwin syscall wrappers.  In
particular it suppresses all invalid address errors arising from
AppleIntelHD4000GraphicsGLDriver.dylib, as it appears that maps
hardware into user space and aspacemgr doesn't know anything about it.

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

10 years agoOSX 10.10: intercept memchr in libsystem_platform.dylib.
Julian Seward [Wed, 19 Nov 2014 09:14:07 +0000 (09:14 +0000)] 
OSX 10.10: intercept memchr in libsystem_platform.dylib.

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

10 years agoFix up the wrapper for getdirentries64 a bit so as to avoid false positives
Julian Seward [Wed, 19 Nov 2014 09:13:12 +0000 (09:13 +0000)] 
Fix up the wrapper for getdirentries64 a bit so as to avoid false positives
from it.  Unfortunately I can't tell why this was happening.

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

10 years agoUse unsigned long int instead of unsigned long long int on LP64
Florian Krohm [Wed, 19 Nov 2014 07:41:19 +0000 (07:41 +0000)] 
Use unsigned long int instead of unsigned long long int on LP64
platforms. This avoids warnings when compiling with -pedantic.
Fixes BZ #211926.

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

10 years agoAnnounce fix of BZ #155125. As of r14685 I think.
Florian Krohm [Tue, 18 Nov 2014 10:03:14 +0000 (10:03 +0000)] 
Announce fix of BZ #155125. As of r14685 I think.
Add testcase.

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

10 years agoEnable test cases for r2993, viz:
Julian Seward [Mon, 17 Nov 2014 11:22:51 +0000 (11:22 +0000)] 
Enable test cases for r2993, viz:
FADDP s_2s, d_2d
FADDP 2d_2d_2d, 4s_4s_4s, 2s_2s_2s
FMAX d_d, s_s
FMIN d_d, s_s
FMAXNM d_d, s_s (not really correct)
FMINNM d_d, s_s (not really correct)

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

10 years agoComment only changes.
Florian Krohm [Sun, 16 Nov 2014 09:56:42 +0000 (09:56 +0000)] 
Comment only changes.

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

10 years agoAdd test cases for all remaining AArch64 ARMv8 SIMD and FP instructions.
Julian Seward [Sat, 15 Nov 2014 22:15:47 +0000 (22:15 +0000)] 
Add test cases for all remaining AArch64 ARMv8 SIMD and FP instructions.

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

10 years agoAdd even more suppressions for Yosemite.
Julian Seward [Sat, 15 Nov 2014 10:30:23 +0000 (10:30 +0000)] 
Add even more suppressions for Yosemite.

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

10 years ago* add a logging mechanism to show repeated messages at exponentially
Julian Seward [Sat, 15 Nov 2014 10:29:57 +0000 (10:29 +0000)] 
* add a logging mechanism to show repeated messages at exponentially
  declining rates, so as to reduce the amount of junk spewed out by
  the various support functions for the MacOS syscall wrappers.

* add a couple more cases to the resync filter for Yosemite.  This
  is working pretty well now.

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

10 years agoPass buffer size to VG_(elapsed_wallclock_time) so the function
Florian Krohm [Fri, 14 Nov 2014 22:34:40 +0000 (22:34 +0000)] 
Pass buffer size to  VG_(elapsed_wallclock_time) so the function
can check it's large enough.

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

10 years agoMinor non-functional cleanups.
Florian Krohm [Fri, 14 Nov 2014 19:25:08 +0000 (19:25 +0000)] 
Minor non-functional cleanups.

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

10 years agom_compiler.c was added to noinst_HEADERS but should of course
Florian Krohm [Fri, 14 Nov 2014 14:47:12 +0000 (14:47 +0000)] 
m_compiler.c was added to noinst_HEADERS but should of course
be added to COREGRIND_SOURCES_COMMON. Now fixed.

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

10 years agoImplement missing heap-intercept function "dh_malloc_usable_size".
Julian Seward [Fri, 14 Nov 2014 10:13:49 +0000 (10:13 +0000)] 
Implement missing heap-intercept function "dh_malloc_usable_size".

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

10 years agoAudit two buffer sizes.
Florian Krohm [Thu, 13 Nov 2014 22:45:58 +0000 (22:45 +0000)] 
Audit two buffer sizes.

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

10 years agoMerge revisions 14445 and 14446 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 13 Nov 2014 21:41:28 +0000 (21:41 +0000)] 
Merge revisions 14445 and 14446 from the BUF_REMOVAL branch to trunk.
Two things:
- remove the buffer argument from VG_(DebugInfo_sect_kind)
- allocate AddrInfo::SectKind::objname dynamically

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

10 years ago* add syscall wrappers for some new OSX 10.10 specific calls
Julian Seward [Thu, 13 Nov 2014 16:30:09 +0000 (16:30 +0000)] 
* add syscall wrappers for some new OSX 10.10 specific calls
  necp_match_policy
    sysctlbyname
      getattrlistbulk (kludged)

* add initial entries for the resync-filter on OSX 10.10.

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

10 years agoUpdate suppressions for OSX 10.10.
Julian Seward [Thu, 13 Nov 2014 16:28:24 +0000 (16:28 +0000)] 
Update suppressions for OSX 10.10.

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

10 years agoBug 340922 arm64: unhandled getgroups/setgroups syscalls.
Mark Wielaard [Thu, 13 Nov 2014 13:03:25 +0000 (13:03 +0000)] 
Bug 340922 arm64: unhandled getgroups/setgroups syscalls.

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

10 years agoFollow up 14714: use a real malloc cost centre instead of an empty string
Philippe Waroquiers [Wed, 12 Nov 2014 21:10:37 +0000 (21:10 +0000)] 
Follow up 14714: use a real malloc cost centre instead of an empty string

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

10 years agoImplement Option --error-markers=<begin>,<end>
Philippe Waroquiers [Wed, 12 Nov 2014 19:43:29 +0000 (19:43 +0000)] 
Implement Option --error-markers=<begin>,<end>

* This option can be used to mark the begin/end of errors in textual
output mode, to facilitate searching/extracting errors in output files
mixing valgrind errors with program output.

* Use the new option in various existing regtests to test the various
  possible usage.

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

10 years agoMerge r14340,14346-14348,14352,14354-14355 from the BUF_REMOVAL branch to
Florian Krohm [Tue, 11 Nov 2014 20:46:34 +0000 (20:46 +0000)] 
Merge r14340,14346-14348,14352,14354-14355 from the BUF_REMOVAL branch to
trunk.
Convert callgrind to use VG_(fprintf).

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

10 years agoInterceot _platform_strncmp also on OSX 10.10.
Julian Seward [Tue, 11 Nov 2014 12:46:58 +0000 (12:46 +0000)] 
Interceot _platform_strncmp also on OSX 10.10.

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

10 years agoPRE(mach_msg) on OSX 10.10 64-bit: replace failing assertion
Julian Seward [Tue, 11 Nov 2014 12:46:19 +0000 (12:46 +0000)] 
PRE(mach_msg) on OSX 10.10 64-bit: replace failing assertion
   vg_assert(! (mh->msgh_bits & MACH_SEND_TRAILER));
with a warning message, but let it continue.

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

10 years agoRemove unneeded macro definition.
Florian Krohm [Mon, 10 Nov 2014 21:54:34 +0000 (21:54 +0000)] 
Remove unneeded macro definition.

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

10 years agoAdd support for the getrandom system call. BZ#340788.
Tom Hughes [Mon, 10 Nov 2014 09:55:59 +0000 (09:55 +0000)] 
Add support for the getrandom system call. BZ#340788.

Requires r14705 for updated system call lists.

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

10 years agoMacOSX 10.10: Resolve "UNKNOWN attrlist flags 0:0x10000000. Fixes
Julian Seward [Mon, 10 Nov 2014 07:26:43 +0000 (07:26 +0000)] 
MacOSX 10.10: Resolve "UNKNOWN attrlist flags 0:0x10000000.  Fixes
#340722.  Patch from Rhys Kidd (rhyskidd@gmail.com)

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

10 years agoFix a bug spotted by IBM's BEAM checker in VG_(describe_IP).
Florian Krohm [Sun, 9 Nov 2014 21:57:23 +0000 (21:57 +0000)] 
Fix a bug spotted by IBM's BEAM checker in VG_(describe_IP).
In the non-XML part buf_dirname was read without observing the
know_dirinfo guard. Now fixed. Initialise buf_dirname nevertheless.
Also remove a dead assignment.

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

10 years agoChange VG_(mkstemp) such that
Florian Krohm [Sun, 9 Nov 2014 16:15:23 +0000 (16:15 +0000)] 
Change VG_(mkstemp) such that
(a) the 2nd argument must not be NULL
    This was true anyhow and requiring it allows us to simplify the function
    by eliminating the local buffer.
(b) the memory pointed to by the 2nd argument is always initialised
    In the past the output file name was not initialised in case VG_(open)
    failed 10 times in a row. The call sites in m_main.c and m_gdbserver/target.c
    were reading the uninitialised filename unconditionally. This was spotted
    by IBM's BEAM checker.
Fix call sites, eliminate some magic constants along the way.

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

10 years agoUpdate system call lists.
Tom Hughes [Sun, 9 Nov 2014 13:59:51 +0000 (13:59 +0000)] 
Update system call lists.

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

10 years agoComment only changes.
Philippe Waroquiers [Fri, 7 Nov 2014 22:16:27 +0000 (22:16 +0000)] 
Comment only changes.
* Clarify in the dedup pool comments that all bytes of elements are compared.
* pub_core_options.h : remove old/misplaced comment for clo_trace_children
                       and replace by a more clear comment (matching the --help)

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

10 years agoAdd some Mac OSX 10.10 specific wrappers.
Julian Seward [Fri, 7 Nov 2014 00:08:13 +0000 (00:08 +0000)] 
Add some Mac OSX 10.10 specific wrappers.

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

10 years agoEnable suppressions for zlib false positives on OSX 10.10.
Julian Seward [Fri, 7 Nov 2014 00:06:26 +0000 (00:06 +0000)] 
Enable suppressions for zlib false positives on OSX 10.10.

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

10 years agoAdd a no-op wrapper for a new-in-10.10 syscall: getattrlistbulk
Julian Seward [Fri, 7 Nov 2014 00:05:56 +0000 (00:05 +0000)] 
Add a no-op wrapper for a new-in-10.10 syscall: getattrlistbulk

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

10 years agoMerge revisions 14366 and 14367 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 6 Nov 2014 22:01:15 +0000 (22:01 +0000)] 
Merge revisions 14366 and 14367 from the BUF_REMOVAL branch to trunk.
In function dump_state_togdb use VG_(gdb_printf) directly. No need to write
to a buffer first.

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

10 years agoMerge revisions 14344 and 14345 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 6 Nov 2014 21:43:44 +0000 (21:43 +0000)] 
Merge revisions 14344 and 14345 from the BUF_REMOVAL branch to trunk.
Basically:
CLG_(sprint_eventmapping)  --> CLG_(eventmapping_as_string)
CLG_(sprint_mappingcost)   --> CLG_(mappingcost_as_string)
The new functions return the string in a dynamically allocated buffer
that caller ought to free.

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

10 years agoAdds initial support for new syscalls on MacOS X 10.10, including new
Julian Seward [Thu, 6 Nov 2014 20:29:01 +0000 (20:29 +0000)] 
Adds initial support for new syscalls on MacOS X 10.10, including new
syscall numbers, and dummy wrappers for bsdthread_ctl and
sysctlbyname.  Mash up of patches from fxcoudert@gcc.gnu.org and Rhys
Kidd (rhyskidd@gmail.com).  Part of bug 339045.

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

10 years agoOn MacOS X 10.10, when postprocessing tool executables, set the SVMA
Julian Seward [Thu, 6 Nov 2014 20:23:22 +0000 (20:23 +0000)] 
On MacOS X 10.10, when postprocessing tool executables, set the SVMA
of __PAGEZERO to zero.  Without this, the 10.10 kernel refuses to
start these executables.  Based on investigations and a
proof-of-concept implementation by Rhys Kidd (rhyskidd@gmail.com).
Part of bug 339045.

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

10 years agoOn MacOS X 10.10, provide a dummy definition for voucher_mach_msg_set.
Julian Seward [Thu, 6 Nov 2014 20:20:01 +0000 (20:20 +0000)] 
On MacOS X 10.10, provide a dummy definition for voucher_mach_msg_set.
Not sure why this is necessary, but without it, the tool executables
don't link.  Part of bug 339045.

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

10 years agoBuild system changes to enable building on MacOS X 10.10 (Yosemite).
Julian Seward [Thu, 6 Nov 2014 20:16:05 +0000 (20:16 +0000)] 
Build system changes to enable building on MacOS X 10.10 (Yosemite).
See bug 339045.  Part of a patch from fxcoudert@gcc.gnu.org.

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

10 years agoFix symbol name typo (correct: DARWIN_VERS wrong: DARWIN_VERSION).
Julian Seward [Wed, 5 Nov 2014 21:27:36 +0000 (21:27 +0000)] 
Fix symbol name typo (correct: DARWIN_VERS  wrong: DARWIN_VERSION).

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

10 years agoCompile (arm). Fix typo from r14664
Josef Weidendorfer [Wed, 5 Nov 2014 19:46:21 +0000 (19:46 +0000)] 
Compile (arm). Fix typo from r14664

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

10 years agoBack out the darwin-specific part of r14683, since darwin doesn't
Julian Seward [Wed, 5 Nov 2014 15:54:21 +0000 (15:54 +0000)] 
Back out the darwin-specific part of r14683, since darwin doesn't
appear to have SHM_HUGETLB, and it causes build failures.

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

10 years agoUnmask all signals in vgdb, as the process that launches vgdb
Philippe Waroquiers [Tue, 4 Nov 2014 20:28:36 +0000 (20:28 +0000)] 
Unmask all signals in vgdb, as the process that launches vgdb
might have masked some.

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

10 years agoAdds initial support for AArch64 (arm64) on Android. Small programs
Julian Seward [Tue, 4 Nov 2014 17:44:21 +0000 (17:44 +0000)] 
Adds initial support for AArch64 (arm64) on Android.  Small programs
(/system/bin/ls, /system/bin/date) run.  Still to do:

* enable more malloc/free intercepts

* enable wrappers for ashmem and binder syscalls

* check to see if any special ioctl support is required for ARM Mali GPUs

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

10 years agoPRE(sys_openat): when checking whether ARG1 == VKI_AT_FDCWD, be sure
Julian Seward [Tue, 4 Nov 2014 17:35:04 +0000 (17:35 +0000)] 
PRE(sys_openat): when checking whether ARG1 == VKI_AT_FDCWD, be sure
only to check the lowest 32 bits, since that arg is a file descriptor
-- hence "int" -- and checking all 64 bits fails unexpectedly if ARG1
and VKI_AT_FDCWD are not both zero- or sign- extended.

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

10 years agoBug 340632 arm64: unhandled instruction fcvtas
Mark Wielaard [Tue, 4 Nov 2014 15:43:27 +0000 (15:43 +0000)] 
Bug 340632 arm64: unhandled instruction fcvtas

NEWS entry for VEX commit r2987.

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

10 years agoMerge r14339 from BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 4 Nov 2014 15:08:53 +0000 (15:08 +0000)] 
Merge r14339 from BUF_REMOVAL branch to trunk.
Prepare print_file function to be converted to use VG_(fprintf).
Basically get rid of arithmetic involving the output buffer.

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

10 years agoBug 340630 arm64: fchmod (52) and fchown (55) syscalls not recognized.
Mark Wielaard [Tue, 4 Nov 2014 13:43:21 +0000 (13:43 +0000)] 
Bug 340630 arm64: fchmod (52) and fchown (55) syscalls not recognized.

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

10 years agoMerge r14308 from the BUF_REMOVAL branch to trunk
Florian Krohm [Mon, 3 Nov 2014 22:43:42 +0000 (22:43 +0000)] 
Merge r14308 from the BUF_REMOVAL branch to trunk
Changes VG_(describe_IP) to return the untruncated result in a statically
allocated local buffer. Fix call sites and update two .exp files who had
truncated names.

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

10 years agoAdd tests for all SIMD FP instructions, except int<->fp conversions.
Julian Seward [Mon, 3 Nov 2014 09:52:57 +0000 (09:52 +0000)] 
Add tests for all SIMD FP instructions, except int<->fp conversions.

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

10 years agofix 338995 shmat with hugepages (SHM_HUGETLB) fails with EINVAL
Philippe Waroquiers [Sat, 1 Nov 2014 22:00:50 +0000 (22:00 +0000)] 
fix 338995  shmat with hugepages (SHM_HUGETLB) fails with EINVAL

Bug is not really fixed, instead the SHM_HUGETLB flag is ignored.
Note that it is not straightforward to properly fix this,
as this implies either to learn aspacemgr what huge pages are.
Also, the trick used in the fix for 333051 cannot be used easily,
because the SHM_HUGETLB flag is given in shmget, while the mmap
is done in shmat.

So, the easiest is to just ignore the SHM_HUGETLB flag.

SHM_HUGETLB is supposed to only give a performance impact.
Ignoring it should be benign.
Theoretically, the caller might expect a sucessful shmget(SHM_HUGETLB)+shmat
to give pages aligned on e.g. 1MB.
In this case, bad luck, the program will misbehave under valgrind.
To warn of this, a warning is given (once) when SHM_HUGETLB is seen.

The map_unmap.c test has been restructured somewaht to allow
TEST_SHM_HUGETLB to be tested independently (or not) of the TEST_MAP_HUGETLB.

Note also that by default, testing  MAP_HUGETLB and SHM_HUGETLB
is disabled as usually, huge pages are not enabled.

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

10 years agoFix 333051 mmap of huge pages fails due to incorrect alignment
Philippe Waroquiers [Sat, 1 Nov 2014 21:02:13 +0000 (21:02 +0000)] 
Fix 333051  mmap of huge pages fails due to incorrect alignment

Learning aspacemgr to handle huge page is too difficult.
So, huge page requests that fails due to bad advice by aspacemgr
will (we hope) succeed if a mmap retry is done with the kernel,
without any constraints.

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

10 years agoRearrange the test case generators to be exactly in the same order
Julian Seward [Sat, 1 Nov 2014 12:05:09 +0000 (12:05 +0000)] 
Rearrange the test case generators to be exactly in the same order
that they are called, so as to make future editing easier.  And
generally tidy up.  No functional change.

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

10 years agoUpdate.
Julian Seward [Fri, 31 Oct 2014 12:11:41 +0000 (12:11 +0000)] 
Update.

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

10 years agoAdd test cases and expected outputs for
Julian Seward [Fri, 31 Oct 2014 10:29:23 +0000 (10:29 +0000)] 
Add test cases and expected outputs for
FMLA 2d_2d_d[], 4s_4s_s[], 2s_2s_s[]
FMLS 2d_2d_d[], 4s_4s_s[], 2s_2s_s[]
PRFM (immediate)

Unfortunately huge diff for arm64/fp_and_simd.stdout.exp because the
new cases are not at the end, and the random data for all after it is
different.  ToDo: reset RNG after each test.

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

10 years agoMerge revisions 14222, 14268, and 14270 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 30 Oct 2014 22:17:56 +0000 (22:17 +0000)] 
Merge revisions 14222, 14268, and 14270 from the BUF_REMOVAL branch to trunk.
Assorted fixes in exp-bbv to eliminate a few buffers.
Implement a suggestion found in the massif source, namely to add the
equivalent of fprintf to m_libcprint. Good suggestion. Thusly
- VgFile: similar to FILE; buffered output, 8k buffer
- VG_(fopen): similar to fopen, but with arguments as in VG_(open)
- VG_(fprintf) and VG_(vfprintf): like [v]fprintf with VgFile 1at argument
- VG_(fclose)
Change massif, exp-bbv and cachegrind to use this functionality.

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

10 years agoBug 340236 - 4 unhandled syscalls on aarch64/arm64:
Julian Seward [Thu, 30 Oct 2014 14:28:14 +0000 (14:28 +0000)] 
Bug 340236 - 4 unhandled syscalls on aarch64/arm64:
mknodat (33), fchdir (50), chroot (51), fchownat (54)
Patch from Miroslav Franc (mfranc@redhat.com)

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

10 years agoBug 340028 - unhandled syscalls for arm64 (msync, pread64, setreuid
Julian Seward [Thu, 30 Oct 2014 14:11:32 +0000 (14:11 +0000)] 
Bug 340028 - unhandled syscalls for arm64 (msync, pread64, setreuid
and setregid)
Patch from dimitry@google.com.

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

10 years agoBug 339940 - (arm64/aarch64) unhandled syscall: 83 (sys_fdatasync) + patch
Julian Seward [Thu, 30 Oct 2014 13:54:24 +0000 (13:54 +0000)] 
Bug 339940 - (arm64/aarch64) unhandled syscall: 83 (sys_fdatasync) + patch
Patch from David Abdurachmanov <davidlt@cern.ch>

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

10 years agoConfigury and Makefile tweaks to support compilation with Intel's
Florian Krohm [Wed, 29 Oct 2014 13:57:49 +0000 (13:57 +0000)] 
Configury and Makefile tweaks to support compilation with Intel's
ICC Compiler. Patch mostly by Gregory Czajkowski <gregczajkowski@yahoo.com>.
Fixes BZ #339542.

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

10 years agoNew file m_compiler.c
Florian Krohm [Wed, 29 Oct 2014 08:21:18 +0000 (08:21 +0000)] 
New file m_compiler.c
Provides implementations of __builtin_popcount/clz/ctz which some
older GCCs do not provide.

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

10 years agoMerge revision 14309 from BUF_REMOVAL branch to trunk.
Florian Krohm [Tue, 28 Oct 2014 20:52:07 +0000 (20:52 +0000)] 
Merge revision 14309 from BUF_REMOVAL branch to trunk.
Eliminates a fixed size buffer in helgrind. Instead of building up a
string in a buffer and then writing the string to stdout can as well
write to stdout directly.

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

10 years agoWhen traversing VG_(args_for_client) there is no need to check
Florian Krohm [Tue, 28 Oct 2014 20:28:32 +0000 (20:28 +0000)] 
When traversing VG_(args_for_client) there is no need to check
the array element for NULL. Function VG_(split_up_argv), which
sets up that array, ensures that no element is NULL.

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

10 years agoFix some grammatical weirness which was reported in BZ #340430.
Florian Krohm [Tue, 28 Oct 2014 16:25:23 +0000 (16:25 +0000)] 
Fix some grammatical weirness which was reported in BZ #340430.

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

10 years agoMerge revisions 14356-14358 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Mon, 27 Oct 2014 22:03:47 +0000 (22:03 +0000)] 
Merge revisions 14356-14358 from the BUF_REMOVAL branch to trunk.
Rewrite cg_merge.c to avoid fixed size arrays.

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

10 years agoMerge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Mon, 27 Oct 2014 12:06:35 +0000 (12:06 +0000)] 
Merge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
The functions VG_(get_filename) and VG_(get_filename_lineno) now return
a pointer to filename and directory name instead of copying them into
buffers passed in from the caller.
The returned strings are persistent as long as the DebugInfo to which
they belong is not discarded. The caller therefore needs to stash them
away as needed.
Function VG_(strncpy_safely) has been removed as it is no longer needed.

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

10 years agoEnable test cases for
Julian Seward [Mon, 27 Oct 2014 09:35:12 +0000 (09:35 +0000)] 
Enable test cases for

LD1/ST1 (multiple 1-elem structs to/from 2 regs
LD1/ST1 (multiple 1-elem structs to/from 3 regs
LD1/ST1 (multiple 1-elem structs to/from 4 regs
LD1R (single structure, replicate)
LD2R (single structure, replicate)
LD3R (single structure, replicate)
LD4R (single structure, replicate)
LD1/ST1 (single structure, to/from one lane)
LD2/ST2 (single structure, to/from one lane)
LD3/ST3 (single structure, to/from one lane)
LD4/ST4 (single structure, to/from one lane)

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

10 years agoMerge r14289 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 26 Oct 2014 19:16:14 +0000 (19:16 +0000)] 
Merge r14289 from the BUF_REMOVAL branch to trunk.
Change CLG_(get_debug_info) to not build up an absolute pathname in its
'file' parameter. Instead give it an additional parameter to hold the
directory name. Callers can then build up the absolute pathname if needed.
This change will come in handy soonish when VG_(get_filename_lineno) will be
changed and those buffers will disappear.
The change has a bit of ripple to get_fn_node_inseg and CLG_(get_file_node).

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

10 years agoMerge r14288 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sun, 26 Oct 2014 17:12:12 +0000 (17:12 +0000)] 
Merge r14288 from the BUF_REMOVAL branch to trunk.
What it does it changing cachegrind's get_debug_info function such
that it no longer builds up an absolute pathname. Instead the function
get an additional parameter for the directory name and the absolute
pathname is built when it is needed. This will come in handy soonish
when VG_(get_filename_lineno) will be changed and those buffers will
disappear.

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

10 years agoMerge r14202 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Sat, 25 Oct 2014 19:20:38 +0000 (19:20 +0000)] 
Merge r14202 from the BUF_REMOVAL branch to trunk.
This patch changes the interface and behaviour of VG_(demangle) and
VG_(maybe_Z_demangle). Instead of copying the demangled name into a
fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf),
the demangling functions will now return a pointer to the full-length
demangled name (HChar **result). It is the caller's responsiblilty to
make a copy if needed.

This change in function parameters ripples upward
- first: to get_sym_name
- then to the convenience wrappers
  - VG_(get_fnname)
  - VG_(get_fnname_w_offset)
  - VG_(get_fnname_if_entry)
  - VG_(get_fnname_raw)
  - VG_(get_fnname_no_cxx_demangle)
  - VG_(get_datasym_and_offset)

The changes in foComplete then forces the arguments of
  - VG_(get_objname) to be changed as well

There are some issues regarding the ownership and persistence of
character strings to consider.
In general, the returned character string is owned by "somebody else"
which means the caller must not free it. Also, the caller must not
modify the returned string as it possibly points to read only memory.
Additionally, the returned string is not necessarily persistent. Here are
the scenarios:
- the returned string is a demangled function name in which case the
  memory holding the string will be freed when the demangler is called again.
- the returned string hangs off of a DebugInfo structure in which case
  it will be freed when the DebugInfo is discarded
- the returned string hangs off of a segment in the address space manager
  in which case it may be overwritten when the segment is merged with
  another segment
So the rule of thunb here is: if in doubt strdup the string.

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

10 years agoUse AC_GCC_WARNING_COND to figure out whether the compiler
Florian Krohm [Fri, 24 Oct 2014 07:42:19 +0000 (07:42 +0000)] 
Use AC_GCC_WARNING_COND to figure out whether the compiler
supports -Wcast-qual.

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

10 years agoAdd --resync-filter to the --help output.
Julian Seward [Thu, 23 Oct 2014 21:49:58 +0000 (21:49 +0000)] 
Add --resync-filter to the --help output.

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

10 years agoDarwin only: add a filter mechanism that aims to remove pointless
Julian Seward [Thu, 23 Oct 2014 19:48:01 +0000 (19:48 +0000)] 
Darwin only: add a filter mechanism that aims to remove pointless
memory-map resync operations.  Without the filter, such operations
come to dominate the running time of complex apps with thousands of
memory segments (eg Firefox) and it becomes unusably slow.  With
the filter in place, the huge performance loss is mostly avoided.

Has no meaning and no effect on non-Darwin targets.  Controlled by
flag --resync-filter=no|yes|verbose [yes].  Filter is currently only
set up for Mac OS X 10.9 (Mavericks) 64 bit and will not produce
any performance benefit on any other configuration.

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

10 years agoEnable reading of Dwarf2 frame-unwind info on MacOS. It seems
Julian Seward [Thu, 23 Oct 2014 19:44:21 +0000 (19:44 +0000)] 
Enable reading of Dwarf2 frame-unwind info on MacOS.  It seems
as if more recent XCodes rely on it.

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

10 years ago2 pints later: more coregrind constification.
Florian Krohm [Thu, 23 Oct 2014 17:47:15 +0000 (17:47 +0000)] 
2 pints later: more coregrind constification.

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

10 years agoAdd a bit of casting to avoid a compiler warning following recent
Julian Seward [Thu, 23 Oct 2014 14:14:49 +0000 (14:14 +0000)] 
Add a bit of casting to avoid a compiler warning following recent
const-ification.

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

10 years agoFollowup to r14656. Fix compile problem on Darwin.
Florian Krohm [Thu, 23 Oct 2014 11:38:12 +0000 (11:38 +0000)] 
Followup to r14656. Fix compile problem on Darwin.
Patch by Rhys Kidd <rhyskidd@gmail.com>.

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

10 years agoConstify coregrind.
Florian Krohm [Wed, 22 Oct 2014 22:25:30 +0000 (22:25 +0000)] 
Constify coregrind.

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

10 years agoConstify a variable.
Florian Krohm [Wed, 22 Oct 2014 20:35:27 +0000 (20:35 +0000)] 
Constify a variable.

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

10 years agoChange VG_(allocEltDedupPA) to return a pointer to const. The reason is
Florian Krohm [Wed, 22 Oct 2014 17:42:37 +0000 (17:42 +0000)] 
Change VG_(allocEltDedupPA) to return a pointer to const. The reason is
that once an element has been allocated and added to the pool it must
not be modified afterwards. See the documentation in pub_tool_deduppoolalloc.h
The rest of the patch is ripple.

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

10 years agoAdd test cases for all known arm64 load/store instructions.
Julian Seward [Wed, 22 Oct 2014 13:47:07 +0000 (13:47 +0000)] 
Add test cases for all known arm64 load/store instructions.

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

10 years agoEnable -Wcast-qual when compiling the valgrind source.
Florian Krohm [Wed, 22 Oct 2014 12:53:16 +0000 (12:53 +0000)] 
Enable -Wcast-qual when compiling the valgrind source.
Testcases are not compiled with -Wcast-qual.
Introduce CONST_CAST macro to work around in the few spots
where a cast that drops type qualifiers is needed.

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

10 years agoChange the return type of the replacement function for rawmemchr
Florian Krohm [Wed, 22 Oct 2014 12:06:22 +0000 (12:06 +0000)] 
Change the return type of the replacement function for rawmemchr
to match that of glibc's rawmemchr.

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

10 years agoChange the initialisation of the newly allocated struct sched_lock
Florian Krohm [Wed, 22 Oct 2014 09:44:34 +0000 (09:44 +0000)] 
Change the initialisation of the newly allocated struct sched_lock
object. Just memset the whole thing to 0. That avoids a cast that
drops type qualifiction.

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

10 years agoFollowup to r14646. The symbol TIOCSIG is not necessarily defined,
Florian Krohm [Wed, 22 Oct 2014 09:25:03 +0000 (09:25 +0000)] 
Followup to r14646. The symbol TIOCSIG is not necessarily defined,
e.g. on s390x with glibc 2.3.4. Modify the testcase to bypass the ioctl
call in that case.

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

10 years agoUpdate list of ignored files.
Florian Krohm [Wed, 22 Oct 2014 09:19:12 +0000 (09:19 +0000)] 
Update list of ignored files.

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

10 years agoRewritten to avoid cast that drops const qualification.
Florian Krohm [Tue, 21 Oct 2014 17:15:14 +0000 (17:15 +0000)] 
Rewritten to avoid cast that drops const qualification.

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

10 years agoAdd support for ioctl(fd, TIOCSIG, signal_number) which used
Florian Krohm [Tue, 21 Oct 2014 07:20:20 +0000 (07:20 +0000)] 
Add support for ioctl(fd, TIOCSIG, signal_number) which used
to issue a false complaint. Fixes BZ #339706
Source patch by David Herrmann (dh.herrmann@gmail.com).
Testcase by myself.

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

10 years agoFix BZ 339789. /bin/true does not exist on Darwin.
Florian Krohm [Mon, 20 Oct 2014 21:29:26 +0000 (21:29 +0000)] 
Fix BZ 339789.  /bin/true does not exist on Darwin.
Patch by rhyskidd@gmail.com.

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

10 years agoFix the prerequisite of the none/tests/rlimit64_nofile testcase.
Florian Krohm [Mon, 20 Oct 2014 21:15:31 +0000 (21:15 +0000)] 
Fix the prerequisite of the none/tests/rlimit64_nofile testcase.
Patch by rhyskidd@gmail.com. Fixes BZ 339808.

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

10 years agoFix some testcases which implicitly assumed that TMPDIR was either
Florian Krohm [Mon, 20 Oct 2014 20:59:13 +0000 (20:59 +0000)] 
Fix some testcases which implicitly assumed that TMPDIR was either
not set or set to /tmp   This is not always true. Fixes BZ 340115.
Patch by rhyskidd@gmail.com.

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

10 years agoConstify the tool interface.
Florian Krohm [Mon, 20 Oct 2014 19:02:38 +0000 (19:02 +0000)] 
Constify the tool interface.

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