Commit Graph

12644 Commits

Author SHA1 Message Date
Julian Seward
a718a920b3 Fix compilation warnings about pointer size conversions following vex r3340
(x86 guest: switch descriptor table registers to ULong type).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16291
2017-04-03 10:20:11 +00:00
Julian Seward
d52a222f8b Bug 358697 - valgrind.h: Some code remains even when defining NVALGRIND.
Patch from Matthias Schwarzott (zzam@gentoo.org).  The patch removes
a volatile memory read which was only there to stop compilers warning
about |format| being unused.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16290
2017-03-30 12:14:23 +00:00
Ivo Raisr
76e451c60d fcntl syscall wrapper was missing flock structure check on Linux.
Fixes BZ#377930.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16287
2017-03-27 05:06:32 +00:00
Bart Van Assche
935a7fcdd8 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
2017-03-24 02:07:14 +00:00
Ivo Raisr
d9f02db4c8 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
2017-03-23 23:22:21 +00:00
Ivo Raisr
e21ebbcae5 Announce fix for bug 377717 in the NEWS
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16284
2017-03-23 22:12:03 +00:00
Julian Seward
9e280aa166 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
2017-03-20 21:34:02 +00:00
Philippe Waroquiers
c54854475c 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
2017-03-17 18:45:23 +00:00
Philippe Waroquiers
eb0d79c25a 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
2017-03-17 18:38:42 +00:00
Petar Jovanovic
183c296cf5 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
2017-03-16 15:07:12 +00:00
Petar Jovanovic
1a9da5927f 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
2017-03-16 13:10:16 +00:00
Philippe Waroquiers
a6a72c71be 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
2017-03-15 19:35:29 +00:00
Petar Jovanovic
30717ab5a2 Add support for syscall ptrace(traceme)
It fixes Bug 377376.

Patch by Aleksandra Karadzic.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16273
2017-03-15 15:23:27 +00:00
Petar Jovanovic
85075802b2 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
2017-03-14 17:11:51 +00:00
Carl Love
6476ec268f 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
2017-03-13 20:14:08 +00:00
Petar Jovanovic
ff3c67a396 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
2017-03-13 17:55:07 +00:00
Philippe Waroquiers
5bc11df85c 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
2017-03-11 21:07:21 +00:00
Carl Love
0caebe1f07 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
2017-03-10 20:10:49 +00:00
Petar Jovanovic
1e7427106a 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
2017-03-08 16:30:19 +00:00
Julian Seward
0c0a97f91c Finished importing new bugs and made a first pass through all of them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16260
2017-03-06 20:04:24 +00:00
Julian Seward
1bdfb3763c Update. Slowly working through huge bug backlog.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16259
2017-03-06 14:50:38 +00:00
Mark Wielaard
add127dbf9 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
2017-03-02 11:14:36 +00:00
Julian Seward
4b69b40852 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16257
2017-03-01 14:28:38 +00:00
Ivo Raisr
f1a6076bcf 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
2017-02-26 21:37:04 +00:00
Ivo Raisr
d572868caf 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
2017-02-24 08:32:59 +00:00
Carl Love
41308849ef 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
2017-02-20 19:04:13 +00:00
Ivo Raisr
e4195be983 Follow up to SVN r16251
Fix expected output for gdbserver_tests/solaris/nlcontrolc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16253
2017-02-20 15:02:31 +00:00
Ivo Raisr
39dcf62ccd 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
2017-02-20 08:07:21 +00:00
Philippe Waroquiers
d7ccda99e6 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
2017-02-19 11:23:46 +00:00
Mark Wielaard
91e7677668 Update NEWS with bug numbers of recently implemented linux-arm64 syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16250
2017-02-18 21:46:38 +00:00
Mark Wielaard
42ff65da99 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
2017-02-18 21:16:05 +00:00
Mark Wielaard
fb6b3d98c2 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
2017-02-18 21:16:04 +00:00
Mark Wielaard
90147d8c7f aarch64: enable sethostname syscall (generic wrapper)
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16247
2017-02-18 21:16:04 +00:00
Mark Wielaard
ddc6432205 aarch64: enable getcpu syscall (generic wrapper)
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16246
2017-02-18 21:16:03 +00:00
Mark Wielaard
c33888cd76 aarch64: enable kcmp syscall (generic wrapper)
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16245
2017-02-18 21:16:02 +00:00
Mark Wielaard
83530aa5cb 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
2017-02-18 21:16:01 +00:00
Mark Wielaard
cb5c2db67d 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
2017-02-18 21:16:00 +00:00
Mark Wielaard
a0c40043fd 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
2017-02-18 21:16:00 +00:00
Mark Wielaard
cbc35e55e3 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
2017-02-18 21:15:59 +00:00
Mark Wielaard
2bb11a32ac 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
2017-02-18 21:15:58 +00:00
Mark Wielaard
67c85b2cc8 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
2017-02-18 21:15:57 +00:00
Mark Wielaard
c4ce4f8099 aarch64: enable tkill syscall (generic wrapper)
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16238
2017-02-18 21:15:56 +00:00
Mark Wielaard
b49d8c0666 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
2017-02-18 21:15:55 +00:00
Mark Wielaard
3729c265d0 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
2017-02-18 21:15:54 +00:00
Mark Wielaard
2d6a711e16 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
2017-02-18 21:15:53 +00:00
Mark Wielaard
ce78c07359 aarch64: enable unshare syscall (generic wrapper)
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16234
2017-02-18 21:15:53 +00:00
Mark Wielaard
c97d53db3a 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
2017-02-18 21:15:52 +00:00
Mark Wielaard
1dbcb195da 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
2017-02-18 21:15:51 +00:00
Mark Wielaard
dc1e28e958 aarch64: remove bogus syscall part
Patch by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16231
2017-02-18 21:15:50 +00:00
Mark Wielaard
58b58f73e4 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
2017-02-18 21:15:49 +00:00