]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
7 years agoir_inject.c now plays according to the new rules.
Ivo Raisr [Tue, 8 Aug 2017 04:38:54 +0000 (06:38 +0200)] 
ir_inject.c now plays according to the new rules.

7 years agoSupport If-Then-Else and Phi nodes in the IR optimizer.
Ivo Raisr [Tue, 8 Aug 2017 04:31:55 +0000 (06:31 +0200)] 
Support If-Then-Else and Phi nodes in the IR optimizer.

7 years agoImplement support for If-Then-Else and Phi nodes into ir_defs.c.
Ivo Raisr [Tue, 8 Aug 2017 04:20:57 +0000 (06:20 +0200)] 
Implement support for If-Then-Else and Phi nodes into ir_defs.c.

7 years agoIntroduce If-Then-Else concept and Phi nodes into VEX IR.
Ivo Raisr [Tue, 8 Aug 2017 04:15:58 +0000 (06:15 +0200)] 
Introduce If-Then-Else concept and Phi nodes into VEX IR.

7 years agoUntil all VEX backends are back in place, libvexmultiarch_test cannot be built.
Ivo Raisr [Sun, 13 Aug 2017 17:14:51 +0000 (19:14 +0200)] 
Until all VEX backends are back in place, libvexmultiarch_test cannot be built.

7 years agoFocus initially on x86 architecture and Memcheck tool.
Ivosh Raisr [Tue, 8 Aug 2017 08:19:30 +0000 (10:19 +0200)] 
Focus initially on x86 architecture and Memcheck tool.

7 years agoAdd missing entries to .gitignore.
Ivo Raisr [Wed, 9 Aug 2017 10:35:50 +0000 (12:35 +0200)] 
Add missing entries to .gitignore.

7 years agogit-HOWTO.txt: Add to repository
Bart Van Assche [Mon, 26 Jun 2017 12:56:52 +0000 (14:56 +0200)] 
git-HOWTO.txt: Add to repository

7 years agoConvert release-HOWTO.txt from SVN to GIT
Ivo Raisr [Sat, 4 Mar 2017 21:21:33 +0000 (22:21 +0100)] 
Convert release-HOWTO.txt from SVN to GIT

7 years agoChange Subversion to GIT in various places
Ivo Raisr [Sat, 4 Mar 2017 21:10:03 +0000 (22:10 +0100)] 
Change Subversion to GIT in various places

7 years agofix verbose version reporting for git
Austin English [Sun, 26 Feb 2017 08:05:24 +0000 (02:05 -0600)] 
fix verbose version reporting for git

Signed-off-by: Austin English <austinenglish@gmail.com>
7 years agoFix nightly build script to work with new Valgrind GIT repository.
Ivo Raisr [Sun, 26 Feb 2017 14:00:42 +0000 (15:00 +0100)] 
Fix nightly build script to work with new Valgrind GIT repository.

7 years agoUpdate auxprogs/update-demangler for Valgrind in GIT.
Ivo Raisr [Sun, 26 Feb 2017 04:02:33 +0000 (05:02 +0100)] 
Update auxprogs/update-demangler for Valgrind in GIT.

7 years agoChange SVN to GIT in various places and simple scripts.
Ivo Raisr [Fri, 16 Jun 2017 14:40:58 +0000 (16:40 +0200)] 
Change SVN to GIT in various places and simple scripts.

7 years agoConvert svn:ignore properties to combined .gitignore.
Ivo Raisr [Mon, 14 Aug 2017 10:26:40 +0000 (12:26 +0200)] 
Convert svn:ignore properties to combined .gitignore.

7 years agoMerge VEX/HEAD into Valgrind/HEAD
Ivo Raisr [Mon, 14 Aug 2017 10:26:12 +0000 (12:26 +0200)] 
Merge VEX/HEAD into Valgrind/HEAD

7 years agoEnsure host stack trace has better chance to work when valgrind is exiting
Philippe Waroquiers [Tue, 8 Aug 2017 21:15:45 +0000 (21:15 +0000)] 
Ensure host stack trace has better chance to work when valgrind is exiting

When investigating bug 383275, the host stacktrace was containing
only one IP. This is because the tid corresponding to the lwpid
is dead, and so no valid thread state was returned.
This then gave a rubbish stacktop of 0, which means unwinding
stops at first frame.

So, try harder to find a valid thread state when reporting the
host stacktrace.

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

7 years agoFix 383275 - massif valgrind: m_xarray.c:162 (ensureSpaceXA): Assertion '!xa->arr...
Philippe Waroquiers [Tue, 8 Aug 2017 19:52:03 +0000 (19:52 +0000)] 
Fix 383275 - massif valgrind: m_xarray.c:162 (ensureSpaceXA): Assertion '!xa->arr' failed

When a massif xtree snapshot is taken when no allocation was done,
the xtree contains no exe context.
The data structure ips_order_xecu is then szied to 0 using VG_(hintSizeXA).
m_xarray.c then allocates an empty array, while later on, a zero size
is expected to correspond to no allocated array.

Fix the problem in m_xarray.c, by not doing any allocation if the
size hint is 0.

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

8 years agoRemove empty directory VEX/docs.
Ivo Raisr [Sat, 5 Aug 2017 13:52:46 +0000 (13:52 +0000)] 
Remove empty directory VEX/docs.

SVN->GIT migration recipe gets slightly confused with it.
n-i-bz

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

8 years agoDocument Solaris kernel interfaces used. Not exhaustive list.
Ivo Raisr [Thu, 3 Aug 2017 20:46:33 +0000 (20:46 +0000)] 
Document Solaris kernel interfaces used. Not exhaustive list.
n-i-bz

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

8 years agoFix handling command line option --xml-socket.
Ivo Raisr [Thu, 3 Aug 2017 05:22:01 +0000 (05:22 +0000)] 
Fix handling command line option --xml-socket.
Fixes BZ#382998
Patch by: Orgad Shaneh <orgads@gmail.com>

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

8 years agoVarious minor fixes and correction in user manual and monitor command help
Philippe Waroquiers [Tue, 1 Aug 2017 20:21:38 +0000 (20:21 +0000)] 
Various minor fixes and correction in user manual and monitor command help

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

8 years agoFix 382515 - valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree...
Philippe Waroquiers [Mon, 31 Jul 2017 20:43:43 +0000 (20:43 +0000)] 
Fix  382515 - valgrind: "Assertion 'di->have_dinfo' failed." on wine's dlls/mscoree/tests/mscoree.c

* produce (more) user messages when valgrind cannot read a pdb file.
* recover properly from an invalid/unsupported pdb file.

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

8 years agoFix the Solaris build after development trunk has been renamed.
Ivo Raisr [Mon, 31 Jul 2017 15:24:08 +0000 (15:24 +0000)] 
Fix the Solaris build after development trunk has been renamed.

Effectively Solaris 12 is now becoming Solaris 11.4.

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

8 years agoCheck whether it is ok to use compiler flag '-pie'.
Ivo Raisr [Fri, 28 Jul 2017 20:49:20 +0000 (20:49 +0000)] 
Check whether it is ok to use compiler flag '-pie'.
Some compilers actually do not support -pie and report its usage
as an error. We need to check if it is safe to use it first.
n-i-bz

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

8 years agovalgrind core side for Add inner requests in VEX (cfr revision 3399)
Philippe Waroquiers [Thu, 27 Jul 2017 19:11:21 +0000 (19:11 +0000)] 
valgrind core side for Add inner requests in VEX (cfr revision  3399)

When running Valgrind under Valgrind, the VEX memory allocation
(temporary or permanent) was not checked, as there was no
inner request.
This patch changes VEX to mark the temporary and permanent
allocations with redzone, and memory is marked unaddressable
when the VEX temporary pool is cleared.

The changes are:
* add a file libvex_inner.h which mostly takes over what
  was in pub_core_inner.h (which now just includes libvex_inner.h)

* modify main_util.h and main_util.c to mark the temporary
  and permanent pool with memcheck pool requests to indicate
  when a block is allocated or freed.

* Impact is (should be) none, unless Valgrind is configured
  as an inner.

* Outer memcheck/inner regression tests run on gcc20 (amd64).
  Nothing (more worrying than the 3.13 self hosting) detected

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

8 years agoAdd inner requests in VEX
Philippe Waroquiers [Thu, 27 Jul 2017 19:10:30 +0000 (19:10 +0000)] 
Add inner requests in VEX

When running Valgrind under Valgrind, the VEX memory allocation
(temporary or permanent) was not checked, as there was no
inner request.
This patch changes VEX to mark the temporary and permanent
allocations with redzone, and memory is marked unaddressable
when the VEX temporary pool is cleared.

The changes are:
* add a file libvex_inner.h which mostly takes over what
  was in pub_core_inner.h (which now just includes libvex_inner.h)

* modify main_util.h and main_util.c to mark the temporary
  and permanent pool with memcheck pool requests to indicate
  when a block is allocated or freed.

* Impact is (should be) none, unless Valgrind is configured
  as an inner.

* Outer memcheck/inner regression tests run on gcc20 (amd64).
  Nothing (more worrying than the 3.13 self hosting) detected

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

8 years agoNew command line option "--terse" for vg_perf.
Ivo Raisr [Sat, 22 Jul 2017 05:10:05 +0000 (05:10 +0000)] 
New command line option "--terse" for vg_perf.
Fixes BZ#382407.

Produces the following terse output:

-- bigcode1 --
vanilla   :  no: -----  me: -----  ca: -----  he: -----  ca: -----  dr: -----  ma: -----
ra3-005   :  no:  0.0%  me: -4.7%  ca:  0.2%  he: -1.1%  ca: -1.5%  dr: -0.6%  ma:  0.0%
ra3-005-J :  no:  0.0%  me:  0.4%  ca:  0.3%  he: -0.5%  ca: -0.9%  dr:  0.0%  ma:  0.6%
ra3-006   :  no:  0.0%  me:  0.4%  ca:  0.2%  he: -0.0%  ca: -1.2%  dr:  0.0%  ma:  0.0%
ra3-007   :  no:  0.0%  me:  0.7%  ca:  0.5%  he: -0.5%  ca: -0.6%  dr:  0.0%  ma:  1.2%

instead the full output (when the option is not used):
-- bigcode1 --
bigcode1 vanilla:0.09s  no: 1.6s (18.0x, -----)  me: 3.1s (35.0x, -----)  ca:12.7s (140.8x, -----)  he: 2.0s (22.8x, -----)  ca: 3.7s (41.2x, -----)  dr: 2.0s (22.2x, -----)  ma: 1.9s (20.7x, -----)
bigcode1 ra3-005:0.09s  no: 1.6s (17.8x,  1.2%)  me: 3.0s (33.3x,  4.8%)  ca:12.7s (140.7x,  0.1%)  he: 2.0s (22.2x,  2.4%)  ca: 3.6s (40.2x,  2.4%)  dr: 1.9s (21.7x,  2.5%)  ma: 1.9s (20.7x,  0.0%)

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

8 years agofix misleading indentation
Philippe Waroquiers [Fri, 21 Jul 2017 18:46:35 +0000 (18:46 +0000)] 
fix misleading indentation

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

8 years agoFix the configure check whether the compiler supports compressed debug sections.
Ivo Raisr [Sun, 16 Jul 2017 20:12:26 +0000 (20:12 +0000)] 
Fix the configure check whether the compiler supports compressed debug sections.
We need to actually link instead of just compile.
Fixes BZ#382256.

Patch by: Ross Burton <ross@burtonini.com>

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

8 years agoBug 381805 arm32 needs ld.so index hardwire for new glibc security fixes
Mark Wielaard [Wed, 5 Jul 2017 09:57:48 +0000 (09:57 +0000)] 
Bug 381805 arm32 needs ld.so index hardwire for new glibc security fixes

glibc added some security hardening adding (optimized) index/strchr
calls in the LD_PRELOAD path:

    commit 6d0ba622891bed9d8394eef1935add53003b12e8
    Author: Florian Weimer <fweimer@redhat.com>
    Date:   Mon Jun 19 22:31:04 2017 +0200

        ld.so: Reject overly long LD_PRELOAD path elements

arm32 doesn't have an ld.so hardwire for index/strchr like other
architectures and so will always complain during early startup:

    ==9495== Conditional jump or move depends on uninitialised value(s)
    ==9495==    at 0x401CF84: index (in /usr/lib/ld-2.25.so)
    ==9495==
    ==9495== Conditional jump or move depends on uninitialised value(s)
    ==9495==    at 0x401CF88: index (in /usr/lib/ld-2.25.so)

index/strchr is doing a word load from a partially-written
stack-allocated buffer, therefore accessing uninitialized data.
This is normal for an optimized string function. The uninitialized
data does not affect the function result.

This can be suppressed by adding a index hardwire for ld.so on arm32
like on other arches. There even was already some commented out code
to do that. Enable that code.

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

8 years agomemcheck/tests: Use ucontext_t instead of struct ucontext
Mark Wielaard [Thu, 29 Jun 2017 15:26:30 +0000 (15:26 +0000)] 
memcheck/tests: Use ucontext_t instead of struct ucontext

glibc 2.26 does not expose struct ucontext anymore.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16457

8 years agoRevert r16455.
Tom Hughes [Mon, 26 Jun 2017 12:14:29 +0000 (12:14 +0000)] 
Revert r16455.

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

8 years agoAllow setuid/setgid/setcap binaries to be run if
Tom Hughes [Mon, 26 Jun 2017 12:10:42 +0000 (12:10 +0000)] 
Allow setuid/setgid/setcap binaries to be run if
valgrind is running as root.

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

8 years agoAfter fork, vgdb activity is polled according to the nr of bbs done :
Philippe Waroquiers [Sun, 25 Jun 2017 20:25:50 +0000 (20:25 +0000)] 
After fork, vgdb activity is polled according to the nr of bbs done :
once the nr of bbs done reaches the next vgdb poll, a check for vgdb
activity is done.
This might lead to the activation of gdbserver after fork.
Such poll is however not expected, unless the children is
to be trace.
This spurious poll in the forked child can cause failures
depending on the nr of bbs done before the fork, and the
nr of bbs done between the fork and the exec.

=> disable vgdb poll in the child in the cleanup after fork
in the child, unless the children have to be traced.

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

8 years agoFix some tests failure with GDB 8.0
Philippe Waroquiers [Sun, 25 Jun 2017 12:40:53 +0000 (12:40 +0000)] 
Fix some tests failure with GDB 8.0

At the beginning of a Valgrind gdbserver test,
2 messages are produced when launching the command
   target remote | vgdb

A message output by vgdb:
   relaying data between gdb and process <pid>
(this message is read by GDB from the vgdb pipe, and re-output
on stderr)
and a message produced by GDB:
   Remote debugging using | ./vgdb

GDB 8.0 changes the order in which the above messages are output.
This causes 2 tests to fail, as the 'relaying' line appears
then in a part of the output deleted by a filter script.

To avoid this, change the filter scripts to always remove
this 'relaying line', which is not particularly interesting to check.
All the .exp files containining such a 'relaying' line are updated
accordingly.

This has been tested with various gdb versions (7.5, 7.7, 7.12, 8.0)
on amd64 and/or ppc64.

Thanks to Mark Wielaard, which helped to investigate this problem
by bisecting the GDB patches in GDB 8.0 causing this change of
behaviour.

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

8 years agoAdd VEX fix 'powerpc too chatty even with --sigill-diagnostics=no' to NEWS.
Mark Wielaard [Tue, 20 Jun 2017 17:58:07 +0000 (17:58 +0000)] 
Add VEX fix 'powerpc too chatty even with --sigill-diagnostics=no' to NEWS.

Bug 381274. VEX svn r3398.

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

8 years agoBug 381274 powerpc too chatty even with --sigill-diagnostics=no.
Mark Wielaard [Tue, 20 Jun 2017 17:55:13 +0000 (17:55 +0000)] 
Bug 381274 powerpc too chatty even with --sigill-diagnostics=no.

Even with valgrind --sigill-diagnostics=no (or -q) guest_ppc_toIR.c
will report various cases why it didn't handle an instruction. e.g.

  disInstr(ppc): found the Power 8 instruction 0x10000508 that can't be
  handled by Valgrind on this host.  This instruction requires a host
  that supports Power 8 instructions.

After which valgrind will generate a SIGILL. But in case the user uses
-q or --sigill-diagnostics=no they aren't interested in that diagnostics.
For example openssl will try some power 8 instructions while initializing
and catch the SIGILL if not supported without issue.

Guard those cases with if (sigill_diag) like the generic decode_failure.

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

8 years agoepoll_pwait can have a NULL sigmask.
Mark Wielaard [Sat, 17 Jun 2017 13:49:22 +0000 (13:49 +0000)] 
epoll_pwait can have a NULL sigmask.

According to the epoll_pwait(2) man page:

       The  sigmask  argument  may  be  specified  as  NULL,  in  which  case
       epoll_pwait() is equivalent to epoll_wait().

But doing that under valgrind gives:

==13887== Syscall param epoll_pwait(sigmask) points to unaddressable byte(s)
==13887==    at 0x4F2B940: epoll_pwait (epoll_pwait.c:43)
==13887==    by 0x400ADE: main (syscalls-2007.c:89)
==13887==  Address 0x0 is not stack'd, malloc'd or (recently) free'd

This is because the sys_epoll_pwait wrapper has:

   if (ARG4)
      PRE_MEM_READ( "epoll_pwait(sigmask)", ARG5, sizeof(vki_sigset_t) );

Which looks like a typo (ARG4 is timeout and ARG5 is sigmask).

This shows up with newer glibc which translates an epoll_wait call into
an epoll_pwait call with NULL sigmask.

Fix typo and add a testcase.

https://bugs.kde.org/show_bug.cgi?id=381289

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

8 years agoppc64 doesn't compile test_isa_2_06_partx.c without VSX support
Mark Wielaard [Fri, 16 Jun 2017 09:33:35 +0000 (09:33 +0000)] 
ppc64 doesn't compile test_isa_2_06_partx.c without VSX support

The #ifdef HAS_VSX guard is wrongly placed. It makes the standard
include headers not be used. Causing a build failure. Fix by moving
the #ifdef HAS_VSX after the standard includes.

https://bugs.kde.org/show_bug.cgi?id=381272

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

8 years agoResync this with the 3.13.0 final version.
Julian Seward [Fri, 16 Jun 2017 09:13:41 +0000 (09:13 +0000)] 
Resync this with the 3.13.0 final version.

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

8 years agoAnnounce fix for BZ#381162.
Ivo Raisr [Tue, 13 Jun 2017 18:15:26 +0000 (18:15 +0000)] 
Announce fix for BZ#381162.
Related VEX commit r3392.

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

8 years agoFix a possible array overrun in VEX register allocator.
Ivo Raisr [Tue, 13 Jun 2017 18:14:28 +0000 (18:14 +0000)] 
Fix a possible array overrun in VEX register allocator.
Fixes BZ#381162.

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

8 years agoFix a minor doc issue in cachegrind manual example
Philippe Waroquiers [Fri, 9 Jun 2017 19:28:04 +0000 (19:28 +0000)] 
Fix a minor doc issue in cachegrind manual example

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

8 years agofix: Bug 380202 - Assertion failure for cache line size (vg_assert(cls == 64)) on...
Julian Seward [Fri, 9 Jun 2017 13:13:48 +0000 (13:13 +0000)] 
fix: Bug 380202 - Assertion failure for cache line size (vg_assert(cls == 64)) on aarch64.

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

8 years agoFix pub_tool_basics.h build issue with g++ 4.4.7.
Mark Wielaard [Tue, 6 Jun 2017 09:03:03 +0000 (09:03 +0000)] 
Fix pub_tool_basics.h build issue with g++ 4.4.7.

g++ 4.4.7 doesn't accept union field initializers:
In file included from ../../include/pub_tool_vki.h:50,
                 from valgrind_cpp_test.cpp:13:
../../include/vki/vki-linux.h: In function â€˜vki_cmsghdr* __vki_cmsg_nxthdr(void*, __vki_kernel_size_t, vki_cmsghdr*)’:
../../include/vki/vki-linux.h:673: error: expected primary-expression before â€˜.’ token

Assign value after declaration which works for any g++ version.

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

8 years agoAdd a replacement for __GI_strcspn() required on s390x/Linux.
Ivo Raisr [Mon, 5 Jun 2017 21:09:06 +0000 (21:09 +0000)] 
Add a replacement for __GI_strcspn() required on s390x/Linux.
Fixes BZ#380397.
Patch by: Andreas Arnez <arnez@linux.vnet.ibm.com>

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

8 years agoFix 380200 - xtree generated callgrind files refer to files without directory name
Philippe Waroquiers [Fri, 2 Jun 2017 21:15:04 +0000 (21:15 +0000)] 
Fix 380200 - xtree generated callgrind files refer to files without directory name

Patch from  Matthias Schwarzott, slightly modified

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

8 years agoUpdate version numbers for 3.13.
Julian Seward [Thu, 1 Jun 2017 15:44:29 +0000 (15:44 +0000)] 
Update version numbers for 3.13.

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

8 years agoFinalise for 3.13.
Julian Seward [Thu, 1 Jun 2017 15:28:45 +0000 (15:28 +0000)] 
Finalise for 3.13.

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

8 years agoBack out r16414 (Enable fair scheduling by default on Linux.) following
Julian Seward [Thu, 1 Jun 2017 05:46:54 +0000 (05:46 +0000)] 
Back out r16414 (Enable fair scheduling by default on Linux.) following
further investigations showing large performance losses in some case, and no
obvious way to fix the problem.

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

8 years agoIgnore sim hint "no-nptl-pthread-stackcache"
Ivo Raisr [Wed, 31 May 2017 13:47:57 +0000 (13:47 +0000)] 
Ignore sim hint "no-nptl-pthread-stackcache"
on Solaris and Mac OS X. Do not produce a warning
message when it is given.
n-i-bz

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

8 years agoConnect also 32-bit cet_nops tests.
Ivo Raisr [Wed, 31 May 2017 12:36:26 +0000 (12:36 +0000)] 
Connect also 32-bit cet_nops tests.
Pertains to BZ#379525.

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

8 years agoConnect cet_nops test cases with other OSes:
Ivo Raisr [Wed, 31 May 2017 11:22:06 +0000 (11:22 +0000)] 
Connect cet_nops test cases with other OSes:
- with fs prefix for Solaris
- with gs prefix for OS X (Darwin)
Pertains to BZ#379525.

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

8 years agoSplit test cases from none/tests/amd64/cet_nops
Ivo Raisr [Wed, 31 May 2017 06:19:50 +0000 (06:19 +0000)] 
Split test cases from none/tests/amd64/cet_nops
into three different files with regards to using
fs prefix, gs prefix or no fs/gs prefix.
Pertains to BZ#379525.

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

8 years agoHandle x86 CET prefixes (32 bit only). Pertains to #379525.
Julian Seward [Tue, 30 May 2017 13:17:23 +0000 (13:17 +0000)] 
Handle x86 CET prefixes (32 bit only).  Pertains to #379525.
Patch from tatyana.a.mineeva@intel.com.

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

8 years agoForce removal of include/vgversion.h.tmp in make_or_upd_vgversion_h.
Mark Wielaard [Wed, 24 May 2017 15:59:53 +0000 (15:59 +0000)] 
Force removal of include/vgversion.h.tmp in make_or_upd_vgversion_h.

When someone created a read only src dir and builds in a separate build
dir then the original read only vgversion.h is copied from the src dir
into the build dir as vgversion.h.tmp (also read only). It could then
not be removed again in the auxprogs/make_or_upd_vgversion_h script.

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

8 years agoFinal update before creating the 3_13 branch.
Julian Seward [Wed, 24 May 2017 15:25:27 +0000 (15:25 +0000)] 
Final update before creating the 3_13 branch.

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

8 years agoUpdate doc building notes for Fedora 25.
Julian Seward [Wed, 24 May 2017 15:24:16 +0000 (15:24 +0000)] 
Update doc building notes for Fedora 25.

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

8 years agoAdd test cases for x86 CET nops. Pertains to #379525.
Julian Seward [Wed, 24 May 2017 14:29:41 +0000 (14:29 +0000)] 
Add test cases for x86 CET nops.  Pertains to #379525.
Test case from tatyana.a.mineeva@intel.com.

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

8 years agoHandle x86 CET prefixes (64 bit only). Fixes #379525.
Julian Seward [Wed, 24 May 2017 14:28:25 +0000 (14:28 +0000)] 
Handle x86 CET prefixes (64 bit only).  Fixes #379525.
Patch from tatyana.a.mineeva@intel.com.

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

8 years agoEnable fair scheduling by default on Linux. n-i-bz.
Julian Seward [Wed, 24 May 2017 14:07:49 +0000 (14:07 +0000)] 
Enable fair scheduling by default on Linux.  n-i-bz.

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

8 years agoUpdate.
Julian Seward [Wed, 24 May 2017 13:43:08 +0000 (13:43 +0000)] 
Update.

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

8 years agoWhen a thread hints that it is in a spin-wait loop (eg, x86 REP NOP insn),
Julian Seward [Wed, 24 May 2017 13:42:33 +0000 (13:42 +0000)] 
When a thread hints that it is in a spin-wait loop (eg, x86 REP NOP insn),
deschedule the thread much sooner (300 evchecks) than previously (1000
evchecks).  Once the thread is spinning, there's absolutely no point in
continuing with it, since only a different thread can get it out of the loop,
so we need to drop the current thread ASAP.

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

8 years agoPort changes from r16407 to Solaris OS.
Ivo Raisr [Tue, 23 May 2017 21:37:50 +0000 (21:37 +0000)] 
Port changes from r16407 to Solaris OS.
n-i-bz

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

8 years agoFix expected output of brk tests after r16407.
Ivo Raisr [Tue, 23 May 2017 21:22:31 +0000 (21:22 +0000)] 
Fix expected output of brk tests after r16407.
n-i-bz

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

8 years agoFix expected output of none/tests/cmdline{1,2}.
Ivo Raisr [Tue, 23 May 2017 09:13:31 +0000 (09:13 +0000)] 
Fix expected output of none/tests/cmdline{1,2}.
Follow up to r16406.

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

8 years agomips: implement missing case for Iop_Not64
Petar Jovanovic [Mon, 22 May 2017 15:22:06 +0000 (15:22 +0000)] 
mips: implement missing case for Iop_Not64

Add missing implementation of Iop_Not64 in iselInt64Expr_wrk.

Patch by Aleksandar Rikalo.

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

8 years agomips: fix set_MIPS_rounding_mode()
Petar Jovanovic [Mon, 22 May 2017 15:14:06 +0000 (15:14 +0000)] 
mips: fix set_MIPS_rounding_mode()

Do not override input argument. This fixes issues seen with CSE.

Patch by Tamara Vlahovic.

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

8 years agomips32: add Iex_ITE implementation for floating point numbers
Petar Jovanovic [Mon, 22 May 2017 12:21:18 +0000 (12:21 +0000)] 
mips32: add Iex_ITE implementation for floating point numbers

Add missing case in Iex_ITE implementation for floating point numbers on
mips32.

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

8 years agoAllow "sub.w reg, sp, reg, lsl #N" for N in 0 .. 5 rather than N in 0 .. 3.
Julian Seward [Mon, 22 May 2017 09:03:54 +0000 (09:03 +0000)] 
Allow "sub.w reg, sp, reg, lsl #N" for N in 0 .. 5 rather than N in 0 .. 3.
Fixes bug 379890.  (jeundery@gmail.com)

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

8 years agoEnable reading of inlined unwind info for exp-dhat. n-i-bz.
Julian Seward [Mon, 22 May 2017 08:53:37 +0000 (08:53 +0000)] 
Enable reading of inlined unwind info for exp-dhat.  n-i-bz.

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

8 years agoMake the message "brk segment overflow in thread #%u: can't grow to %#lx"
Julian Seward [Mon, 22 May 2017 08:50:07 +0000 (08:50 +0000)] 
Make the message "brk segment overflow in thread #%u: can't grow to %#lx"
be printed only once, rather than every time it happens.  Also make it
not be printed in silent mode (-q).

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

8 years agoIncrease the size of the translation cache to keep up with the demands
Julian Seward [Mon, 22 May 2017 08:47:24 +0000 (08:47 +0000)] 
Increase the size of the translation cache to keep up with the demands
of running modern large applications:

* the maximum number of sectors is increased from 24 to 48

* the default number of sectors is increased from 16 to 32 on all targets
  except Android

* the default number of sectors is increased from 6 to 12 on Android targets

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

8 years agoFix order of strings in a warning message, that has always been wrong.
Julian Seward [Mon, 22 May 2017 08:41:07 +0000 (08:41 +0000)] 
Fix order of strings in a warning message, that has always been wrong.
n-i-bz.

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

8 years agoDocuments --sim-hints=fallback-llsc. Pertains to bug 369459.
Julian Seward [Mon, 22 May 2017 08:29:58 +0000 (08:29 +0000)] 
Documents --sim-hints=fallback-llsc.  Pertains to bug 369459.

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

8 years agoBug 379966 - WARNING: unhandled amd64-linux syscall: 313 (finit_module).
Julian Seward [Mon, 22 May 2017 07:53:04 +0000 (07:53 +0000)] 
Bug 379966 - WARNING: unhandled amd64-linux syscall: 313 (finit_module).
Patch from Bartosz Golaszewski (bartekgola@gmail.com).

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

8 years agoFix some warnings reported by PVS studio (see bug 379502)
Philippe Waroquiers [Sat, 20 May 2017 17:00:39 +0000 (17:00 +0000)] 
Fix some warnings reported by PVS studio (see bug 379502)

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

8 years agoRemoves a useless part of a condition, as discussed in bug 375415
Philippe Waroquiers [Sat, 20 May 2017 16:13:33 +0000 (16:13 +0000)] 
Removes a useless part of a condition, as discussed in bug 375415

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

8 years agoCompile fb_test_amd64 only if adx instructions can be compiled
Philippe Waroquiers [Sat, 20 May 2017 14:59:54 +0000 (14:59 +0000)] 
Compile fb_test_amd64 only if adx instructions can be compiled

Note: this just unbreaks the build on avx + non_adx capable systems
(such as gcc farm gcc20).

adx capable system should probably be better handled:
  * ./tests/x86_amd64_features cannot check for adx flag
    (so fb_test_amd64 is run if compiled and system is avx capable, which
     might give problems if gcc/as can compile the test, but the cpu
     cannot execute adx instructions)
  * on an adx capable system, a native run of cpuid tells it is adx capable
    but under valgrind, cpuid reports the valgrind synthetic cpu is not adx
    capable.

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

8 years agomips: fix a typo in log
Petar Jovanovic [Fri, 19 May 2017 13:57:28 +0000 (13:57 +0000)] 
mips: fix a typo in log

Minor typo. Log "cfc1 " instead of "ctc1 " for Min_MfFCSR.

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

8 years agomips32: remove assembler warning in memcheck/leak* tests
Petar Jovanovic [Fri, 19 May 2017 13:51:02 +0000 (13:51 +0000)] 
mips32: remove assembler warning in memcheck/leak* tests

Use .set noat directive to prevent assembler from complaining about
subsequent instructions that use register $at.

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

8 years agomips32: fix wrong register use
Petar Jovanovic [Fri, 19 May 2017 13:25:41 +0000 (13:25 +0000)] 
mips32: fix wrong register use

Fix wrong register use in none/tests/mips32/MoveIns.c.

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

8 years agoMissing VEX commit for Valgrind SVN r16393.
Ivo Raisr [Thu, 18 May 2017 09:47:51 +0000 (09:47 +0000)] 
Missing VEX commit for Valgrind SVN r16393.
Follow up to VEX r3365 and BZ#360415.

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

8 years agoProtect vgversion.h in a tarball from getting deleted by make clean
Mark Wielaard [Thu, 18 May 2017 08:39:21 +0000 (08:39 +0000)] 
Protect vgversion.h in a tarball from getting deleted by make clean

Create a file vgversion_dist.h in the tarball.
This file is not deleted by make clean
Change auxprogs/make_or_upd_vgversion_h to use vgversion_dist.h if it is
available.
Add some missing quotes to auxprogs/make_or_upd_vgversion_h

Patch by Matthias Schwarzott <zzam@gentoo.org>

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

8 years agoFix vgversion.h generation for builddir != srcdir.
Mark Wielaard [Wed, 17 May 2017 20:38:18 +0000 (20:38 +0000)] 
Fix vgversion.h generation for builddir != srcdir.

Make sure to include the builddir include directory to find the
generated vgversion.h. Make include/vgversion.h a .PHONY target
so it always gets regenerated even if the file is already there.
Make sure to run svnversion in the srcdir.

Patch by Matthias Schwarzott <zzam@gentoo.org>

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

8 years agoPPC64, ISA 3.0 fixes
Carl Love [Wed, 17 May 2017 20:11:32 +0000 (20:11 +0000)] 
PPC64, ISA 3.0 fixes

- Fix mffs instruction, FPSCR, C_FPCC field access is not
  working correctly.
- Fix xscmpexpdp again still had a bug.
- Remove duplicate tests from test_isa_3_0.c
- Comment out he tests for the new ISA 3.0B instructions.  There
  seem to be some issues between the simulator and early HW that
  need to be sorted out.

Bugzilla 379925, VEX commit 3375

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

8 years agoPPC64, ISA 3.0 fixes
Carl Love [Wed, 17 May 2017 20:09:46 +0000 (20:09 +0000)] 
PPC64, ISA 3.0 fixes

- Fix mffs instruction, FPSCR, C_FPCC field access is not
  working correctly.
- Fix xscmpexpdp again still had a bug.
- Remove duplicate tests from test_isa_3_0.c
- Comment out he tests for the new ISA 3.0B instructions.  There
  seem to be some issues between the simulator and early HW that
  need to be sorted out.

Bugzilla 379925

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

8 years agomips32: update clobbers in none/mips32/LoadStore tests
Petar Jovanovic [Wed, 17 May 2017 15:35:48 +0000 (15:35 +0000)] 
mips32: update clobbers in none/mips32/LoadStore tests

Add missing registers to clobbers.

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

8 years agomips32: minor update to the branches test
Petar Jovanovic [Wed, 17 May 2017 14:51:13 +0000 (14:51 +0000)] 
mips32: minor update to the branches test

Update inline assembly with .set noreorder.
This prevents assembler from reordering the instructions.

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

8 years agoFix test fb_test_amd64.
Ivo Raisr [Wed, 17 May 2017 11:06:53 +0000 (11:06 +0000)] 
Fix test fb_test_amd64.
Follow up to r16372.

The test is now built if the compiler understands AVX
instructions. The test is executed if the host speaks AVX
is well. Finally bogus printf format flags were fixed as
they caused the output to be inconsistent on Linux and Solaris.

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

8 years agoPOST syscall wrapper for clock_gettime was not properly hooked up on Solaris.
Ivo Raisr [Wed, 17 May 2017 04:36:06 +0000 (04:36 +0000)] 
POST syscall wrapper for clock_gettime was not properly hooked up on Solaris.
This resulted in false positive undefined warnings.
Fixes BZ#379895.

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

8 years agoPower PC ISA 3.0 fixes:
Carl Love [Tue, 16 May 2017 20:38:35 +0000 (20:38 +0000)] 
Power PC ISA 3.0 fixes:
  Fix for stxvx instruction.
  Add LE support for stxv instruction
  Fix for the xscmpexpdp instruction

Bugzilla: 379703

VEX commit: 3374

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

8 years agoPower PC ISA 3.0 fixes:
Carl Love [Tue, 16 May 2017 20:35:28 +0000 (20:35 +0000)] 
Power PC ISA 3.0 fixes:
  Fix for stxvx instruction.
  Add LE support for stxv instruction
  Fix for the xscmpexpdp instruction

Bugzilla: 379703

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

8 years agomips64: add a workaround for Cavium CPUs to support mips32r1-r2-mips64r1
Petar Jovanovic [Tue, 16 May 2017 16:31:16 +0000 (16:31 +0000)] 
mips64: add a workaround for Cavium CPUs to support mips32r1-r2-mips64r1

Linux kernel incorrectly shows that MIPS Cavium CPUs do not support mips32r1,
mips32r2 and mips64r1. This is due to incorrect defines in

arch/mips/include/asm/mach-cavium-octeon/cpu-feature-overrides.h

that affect show_cpuinfo() function.

Until that is changed in Linux kernel, we need a workaround in Valgrind, so
all supported ISAs can be executed correctly.

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

8 years agomips: rewrite parts of mips_dirtyhelper_rdhwr
Petar Jovanovic [Tue, 16 May 2017 15:21:35 +0000 (15:21 +0000)] 
mips: rewrite parts of mips_dirtyhelper_rdhwr

The idea behind this change is to be less dependent on build-flags, and
more dependent on runtime environment.
So, if the code is compiled for mips32r1, it should be able to execute
mips32r2 code if the platforms supports it.

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

8 years agoAdd include/vgversion.h to clean-local.
Mark Wielaard [Tue, 16 May 2017 15:17:13 +0000 (15:17 +0000)] 
Add include/vgversion.h to clean-local.

It is a generated file that needs to be cleaned up.

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

8 years agoAdd dlopen_lib.h to drd/tests/Makefile.am noinst_HEADERS.
Mark Wielaard [Tue, 16 May 2017 15:17:12 +0000 (15:17 +0000)] 
Add dlopen_lib.h to drd/tests/Makefile.am noinst_HEADERS.

It is used in drd/tests/dlopen_lib.c and drd/tests/dlopen_main.c.

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

8 years agoCall $(top_srcdir)/auxprogs/make_or_upd_vgversion_h.
Mark Wielaard [Tue, 16 May 2017 15:17:10 +0000 (15:17 +0000)] 
Call $(top_srcdir)/auxprogs/make_or_upd_vgversion_h.

Fixes srcdir != builddir builds.

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

8 years agoRedo rev 16384 to use the "house" conditionalisation scheme. Pertains to
Julian Seward [Tue, 16 May 2017 09:30:50 +0000 (09:30 +0000)] 
Redo rev 16384 to use the "house" conditionalisation scheme.  Pertains to
BZ#368529.

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