146 Commits

Author SHA1 Message Date
Philippe Waroquiers
d00dd9c2dd Update configure.ac to next version 3.15.GIT ...
As pointed out by Rhys, we need a .GIT postfix waiting
for the release ...
2018-10-20 16:54:19 +02:00
Philippe Waroquiers
e8eda462e9 Update configure.ac to next version 3.15 ... 2018-10-20 11:44:00 +02:00
Julian Seward
3a3000290b --> 3.14.0 final 2018-10-09 13:52:05 +02:00
Julian Seward
d2af42d826 --> 3.14.0.RC2 2018-10-03 15:37:06 +02:00
Julian Seward
7669f536ee --> 3.14.0.RC1 2018-09-30 10:21:27 +02:00
Bart Van Assche
e9a82f3d75 Add a test program for the membarrier() system call
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
2018-06-15 08:25:32 -07:00
Petar Jovanovic
9a6cf7a41c mips64: add N32 ABI support
Adding MIPS N32 ABI support.

BZ issue - #345763.

Contributed and maintained by mulitple people over the years:
  Crestez Dan Leonard, Maran Pakkirisamy, Dimitrije Nikolic,
  Aleksandar Rikalo, Tamara Vlahovic.
2018-06-14 17:40:08 +00:00
Philippe Waroquiers
ab773096df Fix 338252 - building valgrind with -flto (link time optimisation) fails
* Addition of a new configure option --enable-lto=yes or --enable-lto=no
  Default value is --enable-lto=no, as the build is significantly slower,
  so is not appropriate for valgrind development : this should be used
  only on buildbots and/or by packagers.

* Some files containins asm functions have to be compiled without lto:
    coregrind/m_libcsetjmp.c
    coregrind/m_main.c
  If these are compiled with lto, that gives undefined symbols at link time.
  The files to compile without lto are
    coregrind/m_libcsetjmp.c
    coregrind/m_main.c

  To compile these files with other options, a noinst target lib is defined.
  The objects of this library are then added to the libcoregrind.

* memcheck/mc_main.c : move the handwritten asm helpers to mc_main_asm.c.
  This avoids undefined symbols on some toolchains. Due to this,
  the preprocessor symbols that activate the fast or asm memcheck helpers
  are moved to mc_include.h
  Platforms with handwritten helpers will also have the memcheck primary
  map defined non static.

* In VEX, auxprogs/genoffsets.c also has to be compiled without lto,
  as the asm produced by the compiler is post-processed to produce
  pub/libvex_guest_offsets.h. lto not producing asm means the generation
  fails if we used -flto to compile this file.

* all the various Makefile*am are modified to use LTO_CFLAGS for
  (most) targets. LTO_CFLAGS is empty when --enable-lto=no,
  otherwise is set to the flags needed for gcc.
  If --enable-lto=no, LTO_AR and LTO_RANLIB are the standard AR and RANLIB,
  otherwise they are the lto capable versions (gcc-ar and gcc-ranlib).

* This has been tested on:
    debian 9.4/gcc 6.3.0/amd64+x86
    rhel 7.4/gcc 6.4.0/amd64
    ubuntu 17.10/gcc 7.2.0/amd64+x86
    fedora26/gcc 7.3.1/s390x

  No regressions on the above.
2018-03-18 13:53:38 +01:00
Bart Van Assche
025344ae80 configure.ac: Detect support for -faligned-new 2018-03-17 21:31:53 -07:00
Ivo Raisr
f19a956e0a Enable -Wlogical-op for Valgrind; fix an obvious typo.
Fixes BZ#389065.
Reported by: dcb314@hotmail.com
2018-01-23 10:43:19 +01:00
Mark Wielaard
29cc9fc0ed Make sure we can compile in C99 mode.
Use AC_PROG_CC_C99 in configure.ac to make sure the compiler we use is
always in C99 mode. If we detect the compiler doesn't support C99 then
error out.
2018-01-17 13:30:35 +01:00
Petar Jovanovic
0e1fa562e9 mips: MSA tests
This set of tests covers the whole MSA instruction set:

  none/tests/mips32/msa_arithmetic
  none/tests/mips32/msa_comparison
  none/tests/mips32/msa_data_transfer
  none/tests/mips32/msa_fpu
  none/tests/mips32/msa_logical_and_shift
  none/tests/mips32/msa_shuffle

  none/tests/mips64/msa_arithmetic         (symlink to mips32)
  none/tests/mips64/msa_comparison         (symlink to mips32)
  none/tests/mips64/msa_data_transfer
  none/tests/mips64/msa_fpu                (symlink to mips32)
  none/tests/mips64/msa_logical_and_shift  (symlink to mips32)
  none/tests/mips64/msa_shuffle            (symlink to mips32)

Contributed by:
  Tamara Vlahovic, Aleksandar Rikalo and Aleksandra Karadzic.

Related BZ issue - #382563.
2017-10-27 16:27:25 +02:00
Petar Jovanovic
c069589178 mips: add support for bi-arch build on mips64
If native compiler can build Valgrind for mips32 o32 on native mips64
system, it should do it.
This change adds a second architecture for MIPS in a similar way how it has
been previously done for amd64 and ppc64.
2017-10-10 18:06:14 +02:00
Petar Jovanovic
f3637a0853 mips: make sure configure script checks for correct ABIs
For mips64, we currently build for n64.
For mips32, we currently build for o32.

Pass these flags explicitly in configure checks.
2017-10-02 13:28:50 +02:00
Rhys Kidd
1ce04c35c2 Preliminary support for Darwin 17.x (macOS 10.13) 2017-10-01 19:45:10 -04:00
Petar Jovanovic
711d3a53c3 mips64: set mips64r2 as default for 64-builds
Set mips64r2 as default. Major 64-bit platforms are Rev2.
This also fixes small issue when -march=octeon is in conflict with -mips64.
2017-09-29 19:16:37 +02:00
Rhys Kidd
27e1503bc7 Support all Apple clang/LLVM 5.1+
clang has been reasonably good at standards compliance for a while now, and
the Apple-shipped clang-variant in Xcode remains fairly close to upstream.

Let's assume that the Apple-shipped clang-variant is sufficient for
building valgrind, provided it is above a minimum version of 5.1.
2017-09-24 17:51:11 -04:00
Ivo Raisr
63032324b0 Change SVN to GIT in various places and simple scripts. 2017-08-14 15:27:27 +02:00
Ivo Raisr
dfbf6cca38 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
2017-07-31 15:24:08 +00:00
Ivo Raisr
184fc7a804 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
2017-07-28 20:49:20 +00:00
Ivo Raisr
67a6cef292 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
2017-07-16 20:12:26 +00:00
Julian Seward
fdd319ac66 Update version numbers for 3.13.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16431
2017-06-01 15:44:29 +00:00
Philippe Waroquiers
f2ede90cbb 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
2017-05-20 14:59:54 +00:00
Ivo Raisr
eb42c054c4 Increase Valgrind's load address to prevent mmap failure.
Fixes BZ#374963.

Previously Valgrind failed to start when the executable contained
large text, data or bss segments. The load address was increased
for almost all platforms to 0x58000000 (from 0x38000000),
giving another 512 MB for the executable.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16383
2017-05-16 08:22:51 +00:00
Ivo Raisr
84ad3a82c2 Fix compilation problems with some unit tests on Ubuntu 16.10+.
Compiler produces position independent executables (PIE) by default
which gets in the way of some unit tests.
Fixes BZ#377066.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16349
2017-05-10 05:43:03 +00:00
Ivo Raisr
246bb0e25f Remove TileGX/Linux port.
Fixes BZ#379504.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16340
2017-05-08 17:21:59 +00:00
Ivo Raisr
d8f648486e Fix some spelling mistakes.
Fixes BZ#374719
Patch by: klemens <ka7@la-evento.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16336
2017-05-05 22:13:20 +00:00
Petar Jovanovic
f8f1e9cb43 Add musl libc configure/compile
- add musl libc detection (prevents configure error)
- adjust preload and symbol names (based on the OpenWrt patch, see [1])

[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/
200-musl_fix.patch?rev=46302

Patch by Peter Seiderer <ps.report@gmx.net>

It fixes Bug 359202.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16296
2017-04-06 12:39:15 +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
Ivo Raisr
fc10a2f3de 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
2017-02-15 15:22:05 +00:00
Petar Jovanovic
55c565435d mips: add regression test for fadvise64
Add regression tests for fadvise64.

Change by A Rikalo.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16175
2016-12-05 18:00:01 +00:00
Ivo Raisr
452db17ca7 Fix the configure test for presense of __xpg[4,6] symbols
on Solaris so that only shared library is considered.
Previously a binary was checked which now started to produce
incorrect results with regards to vg_preload.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16142
2016-11-19 15:15:10 +00:00
Philippe Waroquiers
9fc7f1e22c Now that 3.12 is out, update version under development to 3.13.0.SVN
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16108
2016-10-29 13:27:51 +00:00
Carl Love
c45ae57a04 Power configure fixes.
This patch makes the following updates:
  - Update the configure scripts to fix a configure/build issue seen on Power 7
  - Update the ISA 3.0 hwcaps string.
  - Update the ISA 3.0 ifdef value to be consistent with the hwcaps string

The patch was submitted by Will Schmidt.  Patch reviewed and tested by Carl Love
on Power 7, Power 8 LE and BE, ISA 3.0 simulator for LE and BE.

Bugzilla 369175

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16034
2016-10-10 18:09:01 +00:00
Christian Borntraeger
4e4cde1475 fix building the dfp testcase
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16030
2016-10-07 07:58:00 +00:00
Rhys Kidd
ab2edd2901 Preliminary support for macOS Sierra (10.12). Does not fully resolve bz#365327.
No regressions on OS X 10.11.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15976
2016-09-22 02:55:24 +00:00
Mark Wielaard
87b9c5b125 Add a feature check for tests that use -march=armv8-a+crc.
Older gcc versions for arm64 don't support the crc arch feature.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15971
2016-09-20 17:57:00 +00:00
Mark Wielaard
c5556b2094 Testcases for fma4 instructions. Bug #369000.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15961
2016-09-19 12:41:38 +00:00
Mark Wielaard
a57acb9be6 Correct an Altivec configure think-o.
An earlier change introduced a think-o in the altivec capability
check, allowing a false positive if the compiler supported altivec
but the hardware did not.

Resolves bug #368412 - False positive result for altivec capability check
Patch by Will Schmidt <will_schmidt@vnet.ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15952
2016-09-13 19:18:36 +00:00
Rhys Kidd
002a63dfd7 Support clang compiler shipped with Apple’s Xcode 8. bz#366138.
This applies to both OS X 10.11 and macOS 10.12.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15949
2016-09-11 13:54:04 +00:00
Rhys Kidd
72097ab0f7 Improve configure output error message, when compiler version not supported. n-i-bz.
Based on a patch by Jeremy Hu <jeremyhu@uclink4.berkeley.edu>. Refer bz#366138.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15948
2016-09-11 13:42:50 +00:00
Ivo Raisr
6260274e4e Follow recent Solaris development with respect to
SUNWDTRACE program header. Newer Solaris no longer utilizes
this program header as a scratchspace for DTrace fasttrap
provider, before libc is loaded.
For the time being, it serves as a space for initial thread
pointer.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15936
2016-08-12 22:28:50 +00:00
Ivo Raisr
86203023fa Set executable protection on schedctl pages only when necessary.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15903
2016-07-11 21:05:03 +00:00
Ivo Raisr
570c5b6509 Unbreak non-Solaris builds after r15882.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15883
2016-05-29 08:21:50 +00:00
Ivo Raisr
aad88ea2d0 Solaris: Add syscall modctl with several commands implemented.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15882
2016-05-28 22:05:43 +00:00
Ivo Raisr
da7df0f276 Valgrind is able to read compressed debuginfo sections in two formats:
- zlib ELF gABI format with SHF_COMPRESSED flag (gcc option -gz=zlib)
  - zlib GNU format with .zdebug sections (gcc option -gz=zlib-gnu)

Patch by: Aleksandar Rikalo <aleksandar.rikalo@imgtec.com>
Fixes BZ#303877



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15868
2016-04-23 20:28:27 +00:00
Ivo Raisr
a91bd93900 Fix build on newer illumos distributions where struct fpchip_state
was renamed to _fpchip_state.
n-i-z


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15856
2016-04-17 10:05:29 +00:00
Carl Love
efb480318c Power PC Add support for ISA 3.0, part 1
The Floating-point condition code bits FPCC is bits[15:12] of the FPSCR.
The instructions fcmpu, fcmpo, dcmpu, dcmpq, dtstdc, dtstdcq, xscmpodq
and xscmpudq set the FPCC bits in addition to the BE field of the CC
register.  This support is needed by the ISA 3.0 instructions to be added.
    
Added support to emulate the modsw, moduw, modsd, modud, extswsli,
maddld, maddhd, maaddhdu, xxperm, xxpermr, vabsdub, vabsduh, vabsduw,
mtvsrws, xxextractuw, xxinsertw, xxspltib, xxbrh, xxbrw, xxbrd, xxbrq,
vpermr, vextractub, vextractuh, vextractuw, vextractd, vinsertb, vinserth,
vinsertw, vinsertd, lxvwsx, stxvb16x, stxvx, lxvb16x, lxvh8x, lxvx
instructions.

valgrind bugzilla 359767
VEX commit 3214


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15837
2016-03-29 21:28:43 +00:00
Mark Wielaard
a848da57ad Add arm64 scalar test. Enable tested syscalls.
The new memcheck/tests/arm64-linux/scalar test is based on the
memcheck/tests/x86-linux/scalar test and contains all syscalls
that are also available on arm64. To make comparison of exp results
easier the order of the tested syscalls is the same as on x86.
This enables a couple extra arm64 syscalls. Part of the fix for
bug #359503 - Add missing syscalls for aarch64 (arm64).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15825
2016-03-09 16:18:36 +00:00
Petar Jovanovic
d7a9a37a07 mips: determine page size at runtime
Instead of passing an option to the configure script, use runtime detection
of the page size. Remove the "--with-pagesize" parameter from the configure
script.
Also accept 8k and 32k as valid page sizes.

Patch by Maran Pakkirisamy

It fixes BZ#342356.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15813
2016-02-26 15:30:53 +00:00