Commit Graph

96 Commits

Author SHA1 Message Date
Ivo Raisr
f71b442444 Solaris syscall: commands A_GETSTAT and A_SETSTAT
for auditon(2) subcode of the auditsys() syscall
were removed in Solaris 12.
However they stay for Solaris 11 and illumos.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15791
2016-02-17 18:11:32 +00:00
Ivo Raisr
970c6d26d2 New gcc versions (4.9, 5.3) provided by Solaris enable
largefile support by default. This gets in the way what
Valgrind core expects (vki, various m_libc modules).
Therefore disable largefile support if it is enabled.
Anyway, support for 32-bit applications is going away in Solaris 12.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15785
2016-02-12 13:43:59 +00:00
Ivo Raisr
24e1e9f493 Solaris syscall: Add support for getrandom(143).
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15782
2016-02-05 22:57:42 +00:00
Bart Van Assche
85cbffe27b configure.ac: Port to gcc 5
Apparently gcc 5 behaves as follows:
$ gcc -dumpversion
5



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15773
2016-01-25 04:27:25 +00:00
Ivo Raisr
6ef7c1085f Solaris syscall: Add support for pset family (207).
Provide scalar tests as well.
Fixes BZ #353398.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15700
2015-10-12 19:10:42 +00:00
Ivo Raisr
a0bde0618b Solaris syscall: Add support for system_stats (154).
Provide scalar test as well.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15684
2015-09-25 21:04:45 +00:00
Julian Seward
0a8d1755ec Merge, from branches/VALGRIND_3_11_BRANCH, NEWS and docs/xml/vg-entities.xml.
Bump version to 3.12.0.SVN.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15679
2015-09-23 13:35:36 +00:00
Florian Krohm
b41e80f228 Do not compile with -Wcast-align on arm. There are too many
warnings due to GCC being very conservative. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15651
2015-09-14 21:11:32 +00:00
Mark Wielaard
758fab675c Fix bug #339636 Use fxsave64 and fxrstor64 mnemonics again.
Just add a configure check to see if the assembler understands
fxsave64/fxrstor64 and fall back to the old-school rex64 prefix
otherwise.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15625
2015-09-04 21:52:52 +00:00
Florian Krohm
38aa18c184 To test extended BFP opcodes we need sizeof(long double) == 16.
Certain old versions of GCC don't have that as default. So we must
give -mlong-double-128 on the command line.
Pertains to BZ #352183.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15623
2015-09-04 20:52:20 +00:00
Florian Krohm
d0cf6ac4fa Suppress unwanted clang 3.7 warnings.
Fix undefined behaviour in perf/tinycc.c


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15616
2015-09-02 15:47:33 +00:00
Ivo Raisr
b66705c636 Newer Solaris has added /proc/self/cmdline and /proc/<pid>/cmdline.
Add support for it in the syswrap machinery and test it more thoroughly.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15545
2015-08-14 20:50:11 +00:00
Florian Krohm
f583a9bbf9 Fix build breakage introduced in r15510.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15511
2015-08-09 08:16:54 +00:00
Florian Krohm
9a3883bf3d Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15510
2015-08-08 21:45:33 +00:00
Florian Krohm
31b1a2ec78 Silence a few more warnings from GCC 5.1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15472
2015-08-02 19:45:58 +00:00
Ivo Raisr
9ac1832814 Check for Solaris specific program headers PT_SUNW_SYSSTAT and PT_SUNW_SYSSTAT_ZONE;
and act accordingly. Test cases provided. n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15469
2015-08-01 21:53:08 +00:00
Bart Van Assche
48ee0165f2 configure.ac: Improve portability of the code introduced in r15423
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15452
2015-07-25 14:31:02 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
Authors of this port:
    Petr Pavlu         setup@dagobah.cz
    Ivo Raisr          ivosh@ivosh.net
    Theo Schlossnagle  theo@omniti.com
            


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426
2015-07-21 14:44:28 +00:00
Carl Love
a06e72acfe Patch 6 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

Rework hwcap checking in configure.ac.  This adds and swizzles
some of the capability checking as found in configure.ac.
This cleans up some corner cases where capabilities were assumed
based on compiler features, but not supported by the platform.
- clean up vsx kludge, and remove associated comment.
- check assorted capabilities against the hwcap values, including
  altivec, vsx, dfp, htm, ISA_2_0* .

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15424
2015-07-20 21:57:21 +00:00
Carl Love
aa85e04a41 Patch 4 and 5 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

Patches 4 and 5 need to be applied together.  Add convenience function
for processing hwcap entries. Add logic to check for HTM support in compiler.

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15423
2015-07-20 21:25:32 +00:00
Rhys Kidd
0fcd971d15 Preliminary support for OS X 10.11 (El Capitan). Refer BZ#348909 for ongoing work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15403
2015-07-08 13:46:57 +00:00
Florian Krohm
c35a95ac9c Beef up configury for the undefined behaviour sanitiser.
If the compiler supports -fno-sanitize=alignment use it.
Otherwise, there will be complaints about misaligned
memory accesses. This is needed for GCC 5.1.
If that flag is not supported simply pass in -fsantize=undefined
and assume that it won't check for alignment violations (which
is true for GCC 4.9).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15351
2015-06-23 20:31:52 +00:00
Florian Krohm
d771b5cb1d Stick in -Werror when attempting to detect whether a compiler
option is available. This is needed for clang. See also r15323.
Fixes BZ #348890


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15332
2015-06-09 21:53:48 +00:00
Florian Krohm
0ef5cbd9af Followup to r15323. Cannot use AC_GCC_WARNING_SUBST to detect
whether -Wformat-security is supported. Special handling is needed.

gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2  accepts -Wformat-security
without -Wformat being present on the command line. Other GCC
versions will issue a warning if -Wformat is missing. r15323
adds -Werror to AC_GCC_WARNING_SUBST and therefore turns that
warning into an error.  With the consequence that
-Wformat-security appears to be unsupported -- a false conclusion.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15331
2015-06-09 21:44:58 +00:00
Rhys Kidd
8c4149b404 Fix undefined symbols for architecture x86_64: _global, referenced from: _test_so_global in tls_so-tls_so.o. bz#347982.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15328
2015-06-08 08:56:33 +00:00
Florian Krohm
b6c5130bdc clang, as opposed to gcc, does not terminate with a non-zero return code
in case an unrecognised command line option is encountered. configure.ac
however was assuming just that which led to compile time warnings later on.
Add -Werror to the configure bits to make clang behave like gcc in this
regard. Fixes BZ #348565.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15323
2015-06-05 21:19:06 +00:00
Florian Krohm
6009f4d5f9 Remove configure bits for -Wno-format-zero-length. The option is
not used.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15321
2015-06-05 17:40:53 +00:00
Florian Krohm
4880368c8d Simplify configury and eliminate AC_GCC_WARNING_COND which was only used
in one place and can be replaced with AC_GCC_WARNING_SUBST_NEW. Adjust
perf/Makefile.am.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15320
2015-06-05 17:09:57 +00:00
Florian Krohm
2de98199b0 Add -Wempty-body to the list of compile flags.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15319
2015-06-05 16:26:14 +00:00
Florian Krohm
a727bec9cb Remove configury bits for -Wno-empty-body. It is not needed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15318
2015-06-05 16:03:31 +00:00
Mark Wielaard
d2b96ae95b GCC 5.1 is too smart. Disable Identical Code Folding for preload libs.
We want to disabled Identical Code Folding for the tools preload shared
objects to get better backraces. For GCC 5.1 -fipa-icf is enabled by
default at -O2.

    The optimization reduces code size and may disturb
    unwind stacks by replacing a function by equivalent
    one with a different name.

Add a configure check to see if GCC supports -fno-ipa-icf.
If it does then add the flag to AM_CFLAGS_PSO_BASE.

Without this GCC will notice some of the preload replacement functions
in vg_replace_strmem are identical and fold them all into one picking
a random (existing) function name. This causes backtraces showing
completely unexpected function names.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15305
2015-06-02 20:23:06 +00:00
Rhys Kidd
9351332329 Signal handler ucontext_t not filled out correctly on OS X
bz#341419

Before:

== 589 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15296
2015-05-28 12:49:00 +00:00
Florian Krohm
096bcbf059 Enable a few more compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15243
2015-05-16 16:17:52 +00:00
Florian Krohm
9d3d254a8b Fix an assertion in the address space manager. BZ #345887.
The VG_(extend_stack) call needs to be properly guarded because the
passed-in address is not necessarily part of an extensible stack
segment. And an extensible stack segment is the only thing that
function should have to deal with.
Previously, the function VG_(am_addr_is_in_extensible_client_stack)
was introduced to guard VG_(extend_stack) but it was not added in all
places it should have been.

Also, extending the client stack during signal delivery (in sigframe-common.c)
was simply calling VG_(extend_stack) hoping it would do the right thing.
But that was not always the case. The new testcase 
none/tests/linux/pthread-stack.c exercises this (3.10.1 errors out on it).

Renamed ML_(sf_extend_stack) to ML_(sf_maybe_extend_stack) and add
proper guard logic for VG_(extend_stack).

Testcases none/tests/{amd64|x86}-linux/bug345887.c by Ivo Raisr.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15138
2015-04-23 15:20:00 +00:00
Julian Seward
639b5687b1 Make the version checking for Apple LLVM a bit less strict.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15088
2015-04-13 11:41:30 +00:00
Julian Seward
082f9298a1 Add a port to Linux/TileGx. Zhi-Gang Liu (zliu@tilera.com)
Valgrind aspects, to match vex r3124.

See bug 339778 - Linux/TileGx platform support to Valgrind



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15080
2015-04-10 12:30:09 +00:00
Florian Krohm
f7d604f2c7 New directory: none/tests/scripts
Move corresponding testcases there.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15065
2015-04-03 15:47:19 +00:00
Florian Krohm
6dce653240 Add support for building with -fsanitize=undefined.
- add configure option --enable-ubsan 
- add __ubsan helpers (by Julian)

This requires gcc 4.9.2 or later. Not all platforms are supported, though.
With this change and VEX r3099 regression tests pass on amd64
with a valgrind compiled with -fsanitize=undefined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14995
2015-03-10 16:13:59 +00:00
Christian Borntraeger
3f384a5c94 Fix configure for Linux kernel >= 4.0-rc1
In addition raise the minimal Linux version to 2.6 as there is almost
no test coverage for 2.4 and 2.6 was released in 2003.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955
2015-02-23 20:19:03 +00:00
Philippe Waroquiers
4875942bb1 PTRACE_GETREGS might not be detected on some distro, due to a missing #include
in the configure test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14899
2015-02-02 22:40:54 +00:00
Florian Krohm
9ee522e2a3 Fix compiler detection for ICC.
Patch by Gregory Czajkowski (gregczajkowski@yahoo.com).
Part of fixing BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14851
2015-01-05 14:28:46 +00:00
Florian Krohm
5ea4e32525 Update detection of tool-chain support for MPX insns
to better work for older assemblers.
Pertains to BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14805
2014-12-12 17:44:36 +00:00
Florian Krohm
f38d96dd61 Add -Wformat -Wformat-security to the list of compile flags.
This was not as straight forward as expected. Specifically, adding the
new flag to CFLAGS in configure.ac did not work and was causing
compiler warnings. For instance, compiling memcheck/tests/execve2.c will
generate a -Wnonnull warning even though the testcase is explicitly
compiled with -Wno-nonnull. The reason is that (a) -Wformat is implied by
-Wnonnull and (b) the list of compiler flags gets assembled in the wrong
order. The culprit appears to be that we modify CFLAGS in configure.ac and
that really is not the right place. Conceptually, configure should determine
tool-chain capabilities and not assemble compiler flags. That should be done
in Makefiles. This patch entangles all this.

So, whatever was added to CFLAGS in configure.ac has now been moved to
Makefile.all.am and Makefile.tool-tests.am. Those are:
-Wno-long-long
-Wwrite-strings
-Wcast-qual
-fno-stack-protector
Note, that this change allows us to simplify Makefile.tool-tests.am which
in the past was disabling some of those flags (e.g. by adding -Wno-cast-qual
again).
In case of the clang compiler, extra command line options are needed. I've
moved those into a separate 'if COMPILER_IS_CLANG' section and not merge
them into baseline flags.

Related to BZ 334727.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14798
2014-12-03 22:53:00 +00:00
Julian Seward
ca44cf32c3 Build system changes to enable building on MacOS X 10.10 (Yosemite).
See bug 339045.  Part of a patch from fxcoudert@gcc.gnu.org.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14695
2014-11-06 20:16:05 +00:00
Florian Krohm
b21985c758 Configury and Makefile tweaks to support compilation with Intel's
ICC Compiler. Patch mostly by Gregory Czajkowski <gregczajkowski@yahoo.com>.
Fixes BZ #339542.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14674
2014-10-29 13:57:49 +00:00
Florian Krohm
489cc7d5e0 New file m_compiler.c
Provides implementations of __builtin_popcount/clz/ctz which some
older GCCs do not provide.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14673
2014-10-29 08:21:18 +00:00
Florian Krohm
e34eb41e96 Use AC_GCC_WARNING_COND to figure out whether the compiler
supports -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14663
2014-10-24 07:42:19 +00:00
Florian Krohm
070ad41c3b Enable -Wcast-qual when compiling the valgrind source.
Testcases are not compiled with -Wcast-qual.
Introduce CONST_CAST macro to work around in the few spots
where a cast that drops type qualifiers is needed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14652
2014-10-22 12:53:16 +00:00
Julian Seward
5857d57571 Modify the compiler detection test so as to accept "Apple LLVM version
5.1" (etc) and identify it as a Clang variant.  Without that, it gets
misidentified as a gcc variant, which causes problems with Makefile.am's
that use the derived COMPILER_IS_CLANG conditional.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14624
2014-10-13 13:03:50 +00:00
Florian Krohm
6876abee24 r14319 dropped adding -Wwrite-strings to the compile flags.
Add it back in.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14555
2014-09-18 19:39:10 +00:00