]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
9 years agoImplement the most important cases for amd64 direct-reload optimisation:
Julian Seward [Tue, 28 Mar 2017 14:57:17 +0000 (14:57 +0000)] 
Implement the most important cases for amd64 direct-reload optimisation:

   cmpq $imm32, %vreg  ->  cmpq $imm32, (stack-slot-of-vreg)
   orq %vreg, %reg     ->  orq (stack-slot-of-vreg), %reg

This is in support of "Bug 375839 - Temporary storage exhausted, when long
sequence of vfmadd231ps instructions to be executed", and reduces code size by
around 3% in that case.

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

9 years agoRewrite dis_FMA so it generates not-quite-so-terrible code. It's still terrible
Julian Seward [Mon, 27 Mar 2017 18:32:10 +0000 (18:32 +0000)] 
Rewrite dis_FMA so it generates not-quite-so-terrible code.  It's still terrible
(breaks vectors into scalars) but this rewrite does it in a way which makes it
interact better with put-to-get forwarding.  It also removes all the
Iop_Reinterp casting involved.  For long sequences of FMA instructions this
reduces the amount of memcheck-generated code to about 75% of what it was
before.  Improves the situation for
  Bug 375839 - Temporary storage exhusted , when long sequence of vfmadd231ps instructions to be executed
but isn't a convincing fix.

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

9 years agofcntl syscall wrapper was missing flock structure check on Linux.
Ivo Raisr [Mon, 27 Mar 2017 05:06:32 +0000 (05:06 +0000)] 
fcntl syscall wrapper was missing flock structure check on Linux.
Fixes BZ#377930.

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

9 years agoUse consistently chase1() in MSVC specific transformation hacks.
Ivo Raisr [Fri, 24 Mar 2017 13:46:15 +0000 (13:46 +0000)] 
Use consistently chase1() in MSVC specific transformation hacks.
This code is experimental and not used by default but should be self-consistent.
n-i-bz

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

9 years agomemcheck/tests/unit_oset.c: Fix compiler warnings
Bart Van Assche [Fri, 24 Mar 2017 02:07:14 +0000 (02:07 +0000)] 
memcheck/tests/unit_oset.c: Fix compiler warnings

Avoid that the compiler warns about using the result of an assignment
as a truth value.

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

9 years agoFix for 377698 - Missing memory check for futex() uaddr arg for FUTEX_WAKE,
Ivo Raisr [Thu, 23 Mar 2017 23:22:21 +0000 (23:22 +0000)] 
Fix for 377698 - Missing memory check for futex() uaddr arg for FUTEX_WAKE,
and FUTEX_WAKE_BITSET, check only 4 args for FUTEX_WAKE_BITSET,
and 2 args for FUTEX_TRYLOCK_PI.
Fixes BZ#377698.
Patch by: diane.meirowitz@oracle.com

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

9 years agoAnnounce fix for bug 377717 in the NEWS
Ivo Raisr [Thu, 23 Mar 2017 22:12:03 +0000 (22:12 +0000)] 
Announce fix for bug 377717 in the NEWS

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

9 years agoBug 377717 - Fix massive space leak when reading compressed debuginfo sections.
Julian Seward [Mon, 20 Mar 2017 21:34:02 +0000 (21:34 +0000)] 
Bug 377717 - Fix massive space leak when reading compressed debuginfo sections.

This makes reading of compressed debuginfo usable for very large object files.
It also adds a bunch extra documentation about a tricky invariant in the
compressed debuginfo handling (a recursive cache refill path!) and adds a
whole bunch of assertions.

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

9 years agoAnd some more follow up for 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION
Philippe Waroquiers [Fri, 17 Mar 2017 18:45:23 +0000 (18:45 +0000)] 
And some more follow up for 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION
causing some addresses to be wrongly marked as addressable

Just in case, do the assert after ARG2 has been truncated to 32 bits,
to avoid comparing sign extended requests on 64 bits.

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

9 years agoFollow up to fix 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some
Philippe Waroquiers [Fri, 17 Mar 2017 18:38:42 +0000 (18:38 +0000)] 
Follow up to fix 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some
        addresses to be wrongly marked as addressable

As noted by Ivo, if the syscall fails, then we have a leak.

So, enable the flag SfPostOnFail if we allocate memory.
In the POST ioctl, check that FAILURE only happens for this drm ioctl,
and free the memory for both SUCCESS and FAILURE.
Do the POST_MEM_WRITE only if SUCCESS

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

9 years agoUpdate the list of fixed issues
Petar Jovanovic [Thu, 16 Mar 2017 15:07:12 +0000 (15:07 +0000)] 
Update the list of fixed issues

The bug 377376 has been fixed with r16273 and r16275.

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

9 years agoFix broken build on non-Linux systems
Petar Jovanovic [Thu, 16 Mar 2017 13:10:16 +0000 (13:10 +0000)] 
Fix broken build on non-Linux systems

After r16273, non-Linux Valgrind builds report:

 m_signals.c:1732:36:
 error: 'VKI_PT_PTRACED' undeclared (first use in this function)

Fix the issue with #if defined(VGO_linux) for the reported code.

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

9 years agoFix 376956 syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
Philippe Waroquiers [Wed, 15 Mar 2017 19:35:29 +0000 (19:35 +0000)] 
Fix 376956  syswrap of SNDDRV and DRM_IOCTL_VERSION causing some addresses
        to be wrongly marked as addressable

Patch from Daniel Glöckner, slightly modified.

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

9 years agoAdd support for syscall ptrace(traceme)
Petar Jovanovic [Wed, 15 Mar 2017 15:23:27 +0000 (15:23 +0000)] 
Add support for syscall ptrace(traceme)

It fixes Bug 377376.

Patch by Aleksandra Karadzic.

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

9 years agoUpdate the list of fixed bugs
Petar Jovanovic [Tue, 14 Mar 2017 17:11:51 +0000 (17:11 +0000)] 
Update the list of fixed bugs

The following issues have been fixed:

341481 MIPS64: Iop_CmpNE32 triggers false warning on MIPS64 platforms
(VEX r3304)

344524 store conditional of guest applications always fail - observed
on Octeon3(MIPS)
(Valgrind r16269, VEX r3316)

376142 Segfaults on MIPS Cavium Octeon boards
(Valgrind r16261)

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

9 years agoFix type of t_inc to correct IRTemp.
Ivo Raisr [Tue, 14 Mar 2017 00:47:45 +0000 (00:47 +0000)] 
Fix type of t_inc to correct IRTemp.
No functional change.
n-i-bz

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

9 years agoThere is a typo in the configure.ac file that causes the HAS_ISA_3_00
Carl Love [Mon, 13 Mar 2017 20:14:08 +0000 (20:14 +0000)] 
There is a typo in the configure.ac file that causes the HAS_ISA_3_00
variable to not be set.

The mask64 value, in file VEX/priv/guest_ppc_toIR.c is missing the
HWCAPS bit for ISA3.0.

vex commit 3317.

bugzilla 377478

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

9 years agoThe mask64 value, in file VEX/priv/guest_ppc_toIR.c is missing the
Carl Love [Mon, 13 Mar 2017 20:10:40 +0000 (20:10 +0000)] 
The mask64 value, in file VEX/priv/guest_ppc_toIR.c is missing the
HWCAPS bit for ISA3.0.

bugzilla 377478

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

9 years agomips: improve emulation of LL/SC
Petar Jovanovic [Mon, 13 Mar 2017 17:55:07 +0000 (17:55 +0000)] 
mips: improve emulation of LL/SC

Follow up to VEX r3316.

Related issue KDE #344524.

Patch by Maran Pakkirisamy.

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

9 years agomips: emulate LL/SC w/ guest_LLaddr and guest_LLdata
Petar Jovanovic [Mon, 13 Mar 2017 17:50:25 +0000 (17:50 +0000)] 
mips: emulate LL/SC w/ guest_LLaddr and guest_LLdata

Improve LL/SC emulation with introduction of LLaddr and LLdata in the
guest state. LLaddr gets invalidated when the threads switch.

More info at KDE #344524. This patch should fix the issue.

Currently, this is effective for Cavium boards only.

Patch by Maran Pakkirisamy.

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

9 years agoAdd missing break for the DRM ioctl operations that do not have any args
Philippe Waroquiers [Sat, 11 Mar 2017 21:07:21 +0000 (21:07 +0000)] 
Add missing break for the DRM ioctl operations that do not have any args
Due to this missing break, the code was falling through to
the case VKI_SNDRV_CTL_IOCTL_PVERSION:
and was then setting some bytes as defined at (whatever address is in) ARG3.

Patch and analysis by Daniel Glöckner

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

9 years agoPowerPC: Fix incorrect register pair check for lxv, stxv, stxsd, stxssp, lxsd,
Carl Love [Fri, 10 Mar 2017 20:10:49 +0000 (20:10 +0000)] 
PowerPC:  Fix incorrect register pair check for lxv, stxv, stxsd, stxssp, lxsd,
lxssp instructions

The lfdpx, stdpx, lfdp and stfdp instructions work on a register pair.  The
register pair test must only be applied to these instructions in the
dis_fp_pair() function.

Updating NEWS file for the commit

VEX commit 3308  makes the fix in VEX/priv/guest_ppc_toIR.c

bugzilla 377427

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

9 years agoPowerPC: Fix incorrect register pair check for lxv, stxv, stxsd, stxssp, lxsd,
Carl Love [Fri, 10 Mar 2017 20:07:09 +0000 (20:07 +0000)] 
PowerPC:  Fix incorrect register pair check for lxv, stxv, stxsd, stxssp, lxsd,
lxssp instructions

The lfdpx, stdpx, lfdp and stfdp instructions work on a register pair.  The
register pair test must only be applied to these instructions in the
dis_fp_pair() function.

bugzilla 377427

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

9 years agomips: do not unmap vDSO
Petar Jovanovic [Wed, 8 Mar 2017 16:30:19 +0000 (16:30 +0000)] 
mips: do not unmap vDSO

vDSO cannot be unmaped for mips architecture because there is no
support for custom signal restorer since kernel 2.5.

It should fix KDE Bug #376142.

Patch by Tamara Vlahovic.

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

9 years agoFinished importing new bugs and made a first pass through all of them.
Julian Seward [Mon, 6 Mar 2017 20:04:24 +0000 (20:04 +0000)] 
Finished importing new bugs and made a first pass through all of them.

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

9 years agoUpdate. Slowly working through huge bug backlog.
Julian Seward [Mon, 6 Mar 2017 14:50:38 +0000 (14:50 +0000)] 
Update.  Slowly working through huge bug backlog.

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

9 years agoFix two safe_to_deref/sizeof mismatches in sys_sigaction/sys_rt_sigaction.
Mark Wielaard [Thu, 2 Mar 2017 11:14:36 +0000 (11:14 +0000)] 
Fix two safe_to_deref/sizeof mismatches in sys_sigaction/sys_rt_sigaction.

Before dereferencing the sigaction pointer and reading the fields we
need to make sure the whole struct is safe_to_deref. We were using the
size of the pointer, but needed the size of the struct.

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

9 years agoMinor refactoring for assignedOnce_Stmt().
Ivo Raisr [Wed, 1 Mar 2017 18:44:21 +0000 (18:44 +0000)] 
Minor refactoring for assignedOnce_Stmt().
No functional change.
n-i-bz

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

9 years agoUpdate.
Julian Seward [Wed, 1 Mar 2017 14:28:38 +0000 (14:28 +0000)] 
Update.

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

9 years agoFix incorrect variable type (IRTemp->IRType)
Ivo Raisr [Mon, 27 Feb 2017 10:16:50 +0000 (10:16 +0000)] 
Fix incorrect variable type (IRTemp->IRType)
n-i-bz

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

9 years agoIntroduce macro ASSUME_ALIGNED and use it in vki-linux.h.
Ivo Raisr [Sun, 26 Feb 2017 21:37:04 +0000 (21:37 +0000)] 
Introduce macro ASSUME_ALIGNED and use it in vki-linux.h.
Reduces the number of compiler warnings on MIPS platforms.
Partial fix for BZ#370028.
Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>

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

9 years agoFollow up to SVN r16253 (fix expected output of gdbserver_tests/solaris/nlcontrolc)
Ivo Raisr [Fri, 24 Feb 2017 08:32:59 +0000 (08:32 +0000)] 
Follow up to SVN r16253 (fix expected output of gdbserver_tests/solaris/nlcontrolc)
SVN r16253 (follow up to r16251) was not complete.

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

9 years agoPush some spec rules for amd64 that have been sitting around for a while:
Julian Seward [Tue, 21 Feb 2017 15:08:28 +0000 (15:08 +0000)] 
Push some spec rules for amd64 that have been sitting around for a while:

  amd64g_calculate_condition:
    S and NS after SUBW
    Z and NZ after SHRQ
    NZ after SHRL (Z after SHRL was already present)

  amd64g_calculate_rflags_c:
    C after ADDQ
    C after ADDL

At least the first 5 reduce the Memcheck noise level from running
optimised code compiled by Clang.

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

9 years agoPatch submitted by Will Schmidt for PPC64.
Carl Love [Mon, 20 Feb 2017 19:04:13 +0000 (19:04 +0000)] 
Patch submitted by Will Schmidt for PPC64.

On ppc64*, the TOC ptr should not be considered a scratch
register, and should not be in the clobber list.
This is called out in newer GCC (i.e. gcc7) and triggers an error.

Thusly, remove R2 from the clobber list.

Signed-Off-By: Will Schmidt <will_schmidt@vnet.ibm.com>
Tested and committed by: Carl Love <cel@us.ibm.com>

Bugzilla is 376729.

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

9 years agoFollow up to SVN r16251
Ivo Raisr [Mon, 20 Feb 2017 15:02:31 +0000 (15:02 +0000)] 
Follow up to SVN r16251
Fix expected output for gdbserver_tests/solaris/nlcontrolc.

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

9 years agoFix sr_EQ() comparison on Solaris syscall failure
Ivo Raisr [Mon, 20 Feb 2017 08:07:21 +0000 (08:07 +0000)] 
Fix sr_EQ() comparison on Solaris syscall failure
On rare occasions, garbage is found in sr1._val2
while sr2._val2 contains 0.

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

9 years agomodifty sleepers to have easier evaluation of interaction between cpu freq scaling
Philippe Waroquiers [Sun, 19 Feb 2017 11:23:46 +0000 (11:23 +0000)] 
modifty sleepers to have easier evaluation of interaction between cpu freq scaling
and scheduler lock (pipe based or futex based)

See http://www.valgrind.org/docs/manual/manual-core.html#manual-core.pthreads_perf_sched
for background info about cpu freq scaling and valgrind thread scheduler.

To reproduce the interaction, do:
for sched in --fair-sched=yes --fair-sched=no
do
  for affinity in 0 1
  do
    echo $sched $affinity
    time ./vg-in-place $sched -q ./gdbserver_tests/sleepers 1000000 0 1000 B-B-B-B- $affinity
  done
done

which gives the below output (intel core i5-6402P, debian 8, kernel  3.16.0).
In summary: the fair scheduler is fair, the pipe based scheduler
can be really unfair (e.g. with --fair-sched=no and no affinity,
2 threads are finishing their work, while the 2 other threads are
starting their work only after the first 2 have fully finished).
The difference in timing is significant : 1m14s versus around 47 seconds.

  Note: If the governor is set to performance, strangely, the time needed for
  --fair-sched=no increases slighltly (to around 48 seconds).
  The time for --fair-sched=yes with or without affinity is then also
  to around 48 seconds.

Below is timing with on-demand governor:

--fair-sched=yes 0
loops/sleep_ms/burn/threads_spec/affinity:  1000000 0 1000 B-B-B-B- 0
Brussels ready to sleep and/or burn
London ready to sleep and/or burn
Petaouchnok ready to sleep and/or burn
main ready to sleep and/or burn
Brussels finished to sleep and/or burn
London finished to sleep and/or burn
Petaouchnok finished to sleep and/or burn
main finished to sleep and/or burn

real 1m14.582s
user 1m14.348s
sys 0m0.204s
--fair-sched=yes 1
loops/sleep_ms/burn/threads_spec/affinity:  1000000 0 1000 B-B-B-B- 1
Brussels ready to sleep and/or burn
London ready to sleep and/or burn
Petaouchnok ready to sleep and/or burn
main ready to sleep and/or burn
main finished to sleep and/or burn
Brussels finished to sleep and/or burn
Petaouchnok finished to sleep and/or burn
London finished to sleep and/or burn

real 0m46.785s
user 0m46.756s
sys 0m0.032s
--fair-sched=no 0
loops/sleep_ms/burn/threads_spec/affinity:  1000000 0 1000 B-B-B-B- 0
Brussels ready to sleep and/or burn
Brussels finished to sleep and/or burn
London ready to sleep and/or burn
London finished to sleep and/or burn
Petaouchnok ready to sleep and/or burn
main ready to sleep and/or burn
Petaouchnok finished to sleep and/or burn
main finished to sleep and/or burn

real 0m47.742s
user 0m48.224s
sys 0m0.084s
--fair-sched=no 1
loops/sleep_ms/burn/threads_spec/affinity:  1000000 0 1000 B-B-B-B- 1
Brussels ready to sleep and/or burn
London ready to sleep and/or burn
Petaouchnok ready to sleep and/or burn
main ready to sleep and/or burn
Brussels finished to sleep and/or burn
London finished to sleep and/or burn
main finished to sleep and/or burn
Petaouchnok finished to sleep and/or burn

real 0m46.601s
user 0m46.568s
sys 0m0.036s

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

9 years agoUpdate NEWS with bug numbers of recently implemented linux-arm64 syscalls.
Mark Wielaard [Sat, 18 Feb 2017 21:46:38 +0000 (21:46 +0000)] 
Update NEWS with bug numbers of recently implemented linux-arm64 syscalls.

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

9 years agoRemove arm64 specific (unused) setup_child () and assign_guest_tls ().
Mark Wielaard [Sat, 18 Feb 2017 21:16:05 +0000 (21:16 +0000)] 
Remove arm64 specific (unused) setup_child () and assign_guest_tls ().

valgrind svn r16186 (which fixed bug #342040 and #373192) introduced a
generic linux way of handling setup_child and assign_guest_tls. So there
is no need anymore for arch specific implementations. And gcc complained
they were unused.

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

9 years agoaarch64: mark not implemented syscalls as such
Mark Wielaard [Sat, 18 Feb 2017 21:16:04 +0000 (21:16 +0000)] 
aarch64: mark not implemented syscalls as such

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable sethostname syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:04 +0000 (21:16 +0000)] 
aarch64: enable sethostname syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable getcpu syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:03 +0000 (21:16 +0000)] 
aarch64: enable getcpu syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable kcmp syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:02 +0000 (21:16 +0000)] 
aarch64: enable kcmp syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable clock_adjtime syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:01 +0000 (21:16 +0000)] 
aarch64: enable clock_adjtime syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable fanotify_mark syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:00 +0000 (21:16 +0000)] 
aarch64: enable fanotify_mark syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable fanotify_init syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:16:00 +0000 (21:16 +0000)] 
aarch64: enable fanotify_init syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable rt_tgsigqueueinfo syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:59 +0000 (21:15 +0000)] 
aarch64: enable rt_tgsigqueueinfo syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable move_pages syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:58 +0000 (21:15 +0000)] 
aarch64: enable move_pages syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable request_key syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:57 +0000 (21:15 +0000)] 
aarch64: enable request_key syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable tkill syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:56 +0000 (21:15 +0000)] 
aarch64: enable tkill syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable sched_rr_get_interval syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:55 +0000 (21:15 +0000)] 
aarch64: enable sched_rr_get_interval syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable delete_module syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:54 +0000 (21:15 +0000)] 
aarch64: enable delete_module syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable get_robust_list syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:53 +0000 (21:15 +0000)] 
aarch64: enable get_robust_list syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable unshare syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:53 +0000 (21:15 +0000)] 
aarch64: enable unshare syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable sync_file_range syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:52 +0000 (21:15 +0000)] 
aarch64: enable sync_file_range syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: enable pivot_root syscall (generic wrapper)
Mark Wielaard [Sat, 18 Feb 2017 21:15:51 +0000 (21:15 +0000)] 
aarch64: enable pivot_root syscall (generic wrapper)

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: remove bogus syscall part
Mark Wielaard [Sat, 18 Feb 2017 21:15:50 +0000 (21:15 +0000)] 
aarch64: remove bogus syscall part

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agoaarch64: add missing syscalls into table
Mark Wielaard [Sat, 18 Feb 2017 21:15:49 +0000 (21:15 +0000)] 
aarch64: add missing syscalls into table

All entries are added disabled - enabling them will be done later.

Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

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

9 years agofix order of timer_* syscalls on aarch64 - bug #371225
Mark Wielaard [Sat, 18 Feb 2017 21:15:48 +0000 (21:15 +0000)] 
fix order of timer_* syscalls on aarch64 - bug #371225

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16229

9 years agoBug 376611 - ppc64 and arm64 don't know about prlimit64 syscall.
Mark Wielaard [Sat, 18 Feb 2017 13:20:16 +0000 (13:20 +0000)] 
Bug 376611 - ppc64 and arm64 don't know about prlimit64 syscall.

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

9 years agoSolaris: Add syscall wrapper for fast trap getlgrp(6)
Ivo Raisr [Thu, 16 Feb 2017 18:29:46 +0000 (18:29 +0000)] 
Solaris: Add syscall wrapper for fast trap getlgrp(6)
Fixes BZ#376518.

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

9 years agoSolaris: include <sys/lgrp_user_impl.h> only on newer Solaris.
Ivo Raisr [Wed, 15 Feb 2017 15:22:05 +0000 (15:22 +0000)] 
Solaris: include <sys/lgrp_user_impl.h> only on newer Solaris.
Follow up to SVN r16224 and r16225, BZ#376455.

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

9 years agoSolaris: Add additional subcodes for lgrpsys(180) syscall
Ivo Raisr [Tue, 14 Feb 2017 12:38:06 +0000 (12:38 +0000)] 
Solaris: Add additional subcodes for lgrpsys(180) syscall
Fixes BZ#376455.

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

9 years agoSolaris: Add syscall wrapper for lgrpsys(180)
Ivo Raisr [Tue, 14 Feb 2017 10:35:20 +0000 (10:35 +0000)] 
Solaris: Add syscall wrapper for lgrpsys(180)
Fixes BZ#376455.

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

9 years agoadd none/tests/linux/clonev to svn:ignore list
Petar Jovanovic [Mon, 13 Feb 2017 18:06:10 +0000 (18:06 +0000)] 
add none/tests/linux/clonev to svn:ignore list

add clonev to the svn:ignore list, for the sake of tidiness.

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

9 years agomips64: do correct 32-bit comparison for Iop_CmpNE32
Petar Jovanovic [Mon, 13 Feb 2017 16:15:24 +0000 (16:15 +0000)] 
mips64: do correct 32-bit comparison for Iop_CmpNE32

Make sure that we take into account 32-bit size of values in comparison
on MIPS64-platforms. This is done either by sign extending these values
before comparison or sign extending xored values (depending on what
comparison we do). This should avoid false-positives like the one
reported in BZ #341481.

Patch based on code provided by Crestez Dan Leonard and Tamara Vlahovic.

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

9 years agoAdd comment about HINT instructions.
Tom Hughes [Sat, 11 Feb 2017 10:46:57 +0000 (10:46 +0000)] 
Add comment about HINT instructions.

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

9 years agoDocument BZ#376279
Tom Hughes [Sat, 11 Feb 2017 10:46:02 +0000 (10:46 +0000)] 
Document BZ#376279

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

9 years agoHandle unknown HINT instructions on aarch64 by ignoring them. BZ#376279.
Tom Hughes [Sat, 11 Feb 2017 10:44:29 +0000 (10:44 +0000)] 
Handle unknown HINT instructions on aarch64 by ignoring them. BZ#376279.

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

9 years agoFix non-mips build breakage from VEX r3300
Tom Hughes [Sat, 11 Feb 2017 10:40:48 +0000 (10:40 +0000)] 
Fix non-mips build breakage from VEX r3300

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

9 years agomips: rewrite mips_irgen_load_and_add32|64 and code around it
Petar Jovanovic [Fri, 10 Feb 2017 17:58:40 +0000 (17:58 +0000)] 
mips: rewrite mips_irgen_load_and_add32|64 and code around it

Make sure that mips_irgen_load_and_add32 gets both expected value and
new value, so the function code makes more sense and does load/store in
a atomic way.

Minor renaming and code style issues added too.

Patch by Tamara Vlahovic.

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

9 years agoam_munmap_both_wrk: safely initialise out-param for all return paths.
Julian Seward [Wed, 8 Feb 2017 08:27:34 +0000 (08:27 +0000)] 
am_munmap_both_wrk: safely initialise out-param for all return paths.
Silences what I think is a false complaint from gcc at -O3.

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

9 years agofix leak-segv-jmp test for platforms with 64K pagesize
Petar Jovanovic [Fri, 3 Feb 2017 01:19:55 +0000 (01:19 +0000)] 
fix leak-segv-jmp test for platforms with 64K pagesize

Increase the size of allocated array, so mprotect call does not end up
protecting non-allocated areas. This enables the test to work on
platforms with pagesize=64K.

Issue discovered on MIPS XLP machine with 64K pagesize.

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

9 years agoadd suppression for helgrind/tests/tc22_exit_w_lock
Petar Jovanovic [Fri, 3 Feb 2017 00:34:52 +0000 (00:34 +0000)] 
add suppression for helgrind/tests/tc22_exit_w_lock

Function pthread_create indirectly calls function memcpy. Helgrind
considers that memcpy is not thread safe function. For error reported
from pthread_create there is the suppression helgrind---_dl_allocate_tls
in the file glibc-2.34567-NPTL-helgrind.supp.
Since glibc version 2.23, memcpy is implemented by __mempcpy_inline.
This causes that call to memcpy from pthread_create is no longer
recognized by the suppression.
In test helgrind/tests/tc22_exit_w_lock, pthread_create is called twice,
and second call reports error, which causes failing of the test.
This patch adds suppression for glibc 2.23 and greater.

Patch by Tamara Vlahovic.

Related issue #375806.

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

9 years agoAdd PROT_READ flag to mmap, as Valgrind needs to be able to read the
Petar Jovanovic [Thu, 2 Feb 2017 17:24:14 +0000 (17:24 +0000)] 
Add PROT_READ flag to mmap, as Valgrind needs to be able to read the
code before it executes it.

This fixes none/tests/bigcode on some MIPS platforms.

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

9 years agoforce old implementation of std::string for leak_cpp_interior test
Petar Jovanovic [Tue, 31 Jan 2017 18:22:20 +0000 (18:22 +0000)] 
force old implementation of std::string for leak_cpp_interior test

This patch forces leak_cpp_interior to be compiled using old implementation
of std::string.

Related issue #373069

Patch by Aleksandar Rikalo.

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

9 years agoFix +1 error in get_elf_symbol_info() when computing value of 'hi' address for ML_...
Ivo Raisr [Tue, 31 Jan 2017 12:33:54 +0000 (12:33 +0000)] 
Fix +1 error in get_elf_symbol_info() when computing value of 'hi' address for ML_(find_rx_mapping)()
Fixes BZ#375772

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

9 years agomips: implement calculation for static TLS
Petar Jovanovic [Mon, 30 Jan 2017 19:33:47 +0000 (19:33 +0000)] 
mips: implement calculation for static TLS

Extend valgrind_get_tls_addr() with static TLS calculation for MIPS.

Related issue #375514.

Patch by Aleksandar Rikalo.

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

9 years agoSamll changes on xtree leak event short names
Philippe Waroquiers [Sun, 29 Jan 2017 16:11:19 +0000 (16:11 +0000)] 
Samll changes on xtree leak event short names

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

9 years agoAdding new filter to memcheck/tests/filter_stderr
Petar Jovanovic [Fri, 27 Jan 2017 18:20:50 +0000 (18:20 +0000)] 
Adding new filter to memcheck/tests/filter_stderr

This should fix issue with sendmsg test and glibc 2.22.

Glibc 2.22 introduced sysdeps/unix/sysv/linux/sendmsg.c that has
__libc_sendmsg function implementation (in comparison to earlier
implementation in syscall-template.S).
So, test suite needs to filter out this case, otherwise we get test
diffs such as:

 Syscall param sendmsg(msg) points to uninitialised byte(s)
-   at 0x........: sendmsg (in /...libc...)
+   at 0x........: sendmsg (sendmsg.c:28)

which are false positives.

This fixes memcheck/tests/sendmsg (stderr) on platforms with 2.22+ glibc.

Patch by Aleksandra Karadzic.

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

9 years agomips: fix target_get_drv() function
Petar Jovanovic [Fri, 27 Jan 2017 17:55:13 +0000 (17:55 +0000)] 
mips: fix target_get_drv() function

Return correct Dtv location. Top of MIPS tcbhead structure is located
0x7000 bytes before the value of ULR. Dtv is the first of two pointers
in the tcbhead structure.

This fixes gdbserver_tests/hgtls on some MIPS platforms.

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

9 years agomips32: add support for ptrace syscall
Petar Jovanovic [Fri, 27 Jan 2017 17:01:49 +0000 (17:01 +0000)] 
mips32: add support for ptrace syscall

Add wrapers for ptrace syscall for mips32.

Patch by Aleksandra Karadzic.

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

9 years agoDocument limitation of --log-file when a program forks.
Ivo Raisr [Wed, 25 Jan 2017 07:22:18 +0000 (07:22 +0000)] 
Document limitation of --log-file when a program forks.
Follow up to r16200 and BZ#162848.

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

9 years agoxtree: use "UnknownFile???" and "UnknownFn???" instead of "???"
Philippe Waroquiers [Sat, 21 Jan 2017 19:24:33 +0000 (19:24 +0000)] 
xtree: use  "UnknownFile???" and "UnknownFn???" instead of "???"
and "file ???"

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

9 years agoSimilar to xtree memory, give a user msg with the xtree leak filename
Philippe Waroquiers [Sat, 21 Jan 2017 15:46:44 +0000 (15:46 +0000)] 
Similar to xtree memory, give a user msg with the xtree leak filename

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

9 years agoFix --help for --xtree-leak-file
Philippe Waroquiers [Sat, 21 Jan 2017 13:22:06 +0000 (13:22 +0000)] 
Fix --help for --xtree-leak-file

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

9 years agoxtree leak.
Philippe Waroquiers [Sat, 21 Jan 2017 12:20:33 +0000 (12:20 +0000)] 
xtree leak.
As option --xtree-leak=yes is useless without a full leak report,
sets automatically full leak report if xtree leak report is requested.

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

9 years agoAllow memcheck to output the leak results as a callgrind xtree file.
Philippe Waroquiers [Sat, 21 Jan 2017 11:00:39 +0000 (11:00 +0000)] 
Allow memcheck to output the leak results as a callgrind xtree file.

* New command line options --xtree-leak=no|yes and --xtree-leak-file=<file>
  to produce the end of execution leak report in a xtree callgrind format
  file.

* New option 'xtleak' in the memcheck leak_check monitor command, to
  produce the leak report in an xtree file.

* File name template arguments (such as --log-file, --xtree-memory-file, ...)
  have a new %n format letter that is replaced by a sequence number.

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

9 years agox86: Recognize the SS segment prefix on x86. Bug 344139 comment 4.
Julian Seward [Fri, 20 Jan 2017 10:01:42 +0000 (10:01 +0000)] 
x86: Recognize the SS segment prefix on x86.  Bug 344139 comment 4.
Patch from Sebastian Lackner, sebastian@fds-team.de.

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

9 years agoSmall comment fix: point at the correct file name
Philippe Waroquiers [Fri, 20 Jan 2017 09:59:05 +0000 (09:59 +0000)] 
Small comment fix: point at the correct file name

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

9 years agox86-linux: Initialize x86 system GDT on first use. Bug 344139 comment 3.
Julian Seward [Fri, 20 Jan 2017 09:58:15 +0000 (09:58 +0000)] 
x86-linux: Initialize x86 system GDT on first use.  Bug 344139 comment 3.
Patch from Sebastian Lackner, sebastian@fds-team.de.

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

9 years agoConnect the v8 FP and SIMD tests to the build system.
Julian Seward [Thu, 19 Jan 2017 06:53:13 +0000 (06:53 +0000)] 
Connect the v8 FP and SIMD tests to the build system.

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

9 years agoImplement:
Julian Seward [Wed, 18 Jan 2017 15:02:55 +0000 (15:02 +0000)] 
Implement:
  VCVT{A,N,P,M}{.F32 d_d, .F32 q_q}
  VRINT{A,N,P,M,X,Z}{.F32 d_d, .F32 q_q}

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

9 years agoImplement V{MAX,MIN}NM{.F32 d_d_d, .F32 q_q_q}.
Julian Seward [Mon, 16 Jan 2017 07:15:04 +0000 (07:15 +0000)] 
Implement V{MAX,MIN}NM{.F32 d_d_d, .F32 q_q_q}.

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

9 years agodis_neon_data_3same: don't silently accept invalid instructions. Instead,
Julian Seward [Mon, 16 Jan 2017 05:14:24 +0000 (05:14 +0000)] 
dis_neon_data_3same: don't silently accept invalid instructions.  Instead,
"return False" for any instruction not accepted by this function.  Also,
add a few switch default backstops.

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

9 years agoImplement VRINTX.F64.F64 d_d, VRINTX.F32.F32 s_s.
Julian Seward [Sun, 15 Jan 2017 18:25:18 +0000 (18:25 +0000)] 
Implement VRINTX.F64.F64 d_d, VRINTX.F32.F32 s_s.

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

9 years agoAdd support for Iop_MaxNumF64, Iop_MinNumF64, Iop_MaxNumF32 and
Julian Seward [Fri, 13 Jan 2017 18:02:38 +0000 (18:02 +0000)] 
Add support for Iop_MaxNumF64, Iop_MinNumF64, Iop_MaxNumF32 and
Iop_MinNumF32, as introduced in vex r3293.

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

9 years agoImplement
Julian Seward [Fri, 13 Jan 2017 17:58:57 +0000 (17:58 +0000)] 
Implement
  V{MIN,MAX}NM.F64 Dd, Dn, Dm
  V{MIN,MAX}NM.F32 Sd, Sn, Sm

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

9 years agomips64: update exp file for test_math
Petar Jovanovic [Fri, 13 Jan 2017 16:29:15 +0000 (16:29 +0000)] 
mips64: update exp file for test_math

Leave the old exp file that covers cases in which __addtf3 and __subtf3
did not take into account rounding modes. New exp file is the same file
that already exists in mips32 folder, so we just create a symbolic link
to it.

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

9 years agoImplement:
Julian Seward [Fri, 13 Jan 2017 12:51:29 +0000 (12:51 +0000)] 
Implement:
  VRINT{Z,R}.F64.F64 d_d, VRINT{Z,R}.F32.F32 s_s
  VCVT{A,N,P,M}{.S32,.U32}{.F64,.F32}

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