12042 Commits

Author SHA1 Message Date
Philippe Waroquiers
8f0961e770 Change default value for --keep-stacktraces has been changed to alloc-and-free
Default value changed following discussion on valdev.

Giving more information for errors with freed blocks can help
when investigating difficult problems (e.g. double free, programs
using 'cleanup list' collecting different types of memory, ...)

Regression tested on various setup (x86, ppc64, s390x, amd64, debian or fedora)

Tests that have only one exp files have been updated to use the output
of the new default value in their .exp file.

Tests having more than one exp file have been changed so as to
specify explicitely the previous clo default value (i.e. adding
 --keep-stacktraces=alloc-then-free in the vgtest file).

Possibly, some tests might fail on non tested platforms
(e.g. mips, macos, solaris, tilegx).
Fixes should be straightforward, using one of the above fix techniques.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15597
2015-08-29 10:45:26 +00:00
Rhys Kidd
2c1bd53275 Intercept platform_memchr$VARIANT$Haswell on OS X
bz#351756

On OS X 10.10 (without Haswell hardware)

Before:

== 595 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 595 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15596
2015-08-29 07:42:40 +00:00
Florian Krohm
158c67e9ee Announce new command line option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15595
2015-08-27 17:56:56 +00:00
Florian Krohm
2c79dd79f5 New memcheck command line option: --expensive-definedness-check
Pertains to BZ #340392


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15594
2015-08-27 17:50:47 +00:00
Julian Seward
6a85ef75ec First pass at tidying up the release notes for 3.11.0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15593
2015-08-27 12:43:32 +00:00
Florian Krohm
6d4d9a3317 Support
envB: var=value
in the .vgtest file. This is similar to "env:" except the environment
variable is set prior to invoking progB.
Adapt gdbserver_tests/nlgone_exit.vgtest to fix a problem reported
by Matthias Schwarzott <zzam@gentoo.org>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15592
2015-08-26 20:24:47 +00:00
Mark Wielaard
b393e93e7b Filter out gdb file transfer warnings in gdbserver_tests/filter_stderr.
GDB is correct that we don't support that at the moment.
See bug #351792 - vgdb doesn't support remote file transfers.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15591
2015-08-26 10:27:19 +00:00
Philippe Waroquiers
c65a4ee146 Fix a leak of the abbrev hash table when --read-var-info=yes is given
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15590
2015-08-25 21:39:44 +00:00
Mark Wielaard
cba6bd0b31 Add safe-pthread.h to helgrind/tests/Makefile.am noinst_HEADERS.
Otherwise the header file won't show up in the dist tar ball.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15589
2015-08-25 13:07:42 +00:00
Tom Hughes
c5a1912be8 Use sigjmp_buf
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15588
2015-08-24 19:26:56 +00:00
Tom Hughes
781dec8f80 Restore signal masks when recovering from xend related signals
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15587
2015-08-24 19:10:06 +00:00
Philippe Waroquiers
4998bd20e0 Use memset + assign to VgdbShared, to avoid memcheck warning that
uninit holes bytes are written to the shared file.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15586
2015-08-23 16:57:55 +00:00
Rhys Kidd
88e8611524 docs: env variable handling behaviour consistent between OS X and Linux, thus remove redundant comment and #ifdef. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15585
2015-08-23 14:37:47 +00:00
Rhys Kidd
d8a45cbef1 Preliminary support for OS X 10.11 (El Capitan) documentation. bz#348909.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15584
2015-08-23 08:27:45 +00:00
Ivo Raisr
b00530b6de Distinguish properly when to establish the client data segment.
Initial data segment is established (see initimg-solaris.c for rationale):
- directly during client program image initialization,
- or on demand when the executed program is the runtime linker itself,
  after it has loaded its target dynamic executable (see PRE(sys_mmapobj)),
  or when the first brk() syscall is made.

More preparatory work for ldsoexec support.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15583
2015-08-22 22:08:43 +00:00
Philippe Waroquiers
61e523958b Fix warning signed unsigned comparison in m_oset.c :
../../coregrind/m_oset.c:413:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15582
2015-08-21 22:34:53 +00:00
Philippe Waroquiers
9e871fd7ba Use VG_(arena_memalign) for thread array rather than VG_(malloc)-ed + align
Objective is to avoid a 'possibly lost' leak when self-hosting
(and re-uses the already existing align logic in m_mallocfree.c)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15581
2015-08-21 22:22:27 +00:00
Julian Seward
893c2a3f08 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15580
2015-08-21 14:49:47 +00:00
Julian Seward
9d215c1326 Bug 346185 - Fix typo saving altivec register v24.
Patch from Dave Lerner (david.lerner26@sbcglobal.net).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15579
2015-08-21 13:43:07 +00:00
Julian Seward
2d689f2ddc More copyright date changes for 2015 (fallout from r15577)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15578
2015-08-21 13:38:02 +00:00
Julian Seward
adc2dafee9 Update copyright dates, to include 2015. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577
2015-08-21 11:32:26 +00:00
Julian Seward
a87df80edf Remove non-ASCII characters from this file. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15576
2015-08-21 11:04:48 +00:00
Julian Seward
52608c6f89 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15575
2015-08-21 10:53:32 +00:00
Florian Krohm
dd8165387c When scanning the statement list for bogus literals we
can stop once the first such literal was found. No need
to scan further.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15574
2015-08-20 22:45:41 +00:00
Florian Krohm
f82fedcc39 Fix incorrect header guard. Reported by giacomopoz@gmail.com
Fixes BZ #351531


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15573
2015-08-20 21:41:28 +00:00
Ivo Raisr
542fa886dc Initial data (brk) segment is setup on demand, when a first brk() syscall
is made. It cannot be established during client image initialization because
that would conflict with a temporary stack which ld.so.1 (when executed directly)
uses for loading the target dynamic executable.
See PRE(sys_brk) in syswrap-solaris.c.

Preparatory work for ldsoexec support.
n-i-bz



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15572
2015-08-20 20:25:19 +00:00
Ivo Raisr
8372cfdb0f Follow-up fix for r15565.
Expected output of some helgrind tests slightly differed on Solaris.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15571
2015-08-20 05:50:49 +00:00
Mark Wielaard
9b322bb026 Also install sigsegv handler in safe-pthread tests wrapper.
In case we do recognize the xend, but detect it is invalid
(used outside a transaction) we generate a segsegv instead
of a sigill. Handle that in the same way in the test case.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15570
2015-08-19 13:26:28 +00:00
Rhys Kidd
b9389efb87 Follow-up fix for r15565: sa_restorer should not be used. n-i-bz.
It is obsolete and not specified by POSIX. See man sigaction on Linux.
No regressions reported.

The following error may be seen on platforms that don't implement this extension:

depbase=`echo tc12_rwl_trivial.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../include -I../../coregrind -I../../include -I../../VEX/pub -I../../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -DVGPV_amd64_darwin_vanilla=1 -DVGA_SEC_x86=1 -DVGP_SEC_amd64_darwin=1  -Winline -Wall -Wshadow -Wno-long-long -g -fno-stack-protector  -Wno-format-extra-args -Wno-literal-range -Wno-tautological-constant-out-of-range-compare -Wno-self-assign -Wno-string-plus-int -Wno-uninitialized -Wno-unused-value  -arch x86_64  -MT tc12_rwl_trivial.o -MD -MP -MF $depbase.Tpo -c -o tc12_rwl_trivial.o tc12_rwl_trivial.c &&\
    mv -f $depbase.Tpo $depbase.Po
In file included from tc12_rwl_trivial.c:8:
./safe-pthread.h:37:7: error: no member named 'sa_restorer' in 'struct sigaction'
   sa.sa_restorer = NULL;
   ~~ ^
1 error generated.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15569
2015-08-19 12:18:31 +00:00
Florian Krohm
6c715bf33e Fix comparison in function VG_(iseqsigset).
Patch by dcb314@hotmail.com
Fixes BZ #351474.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15568
2015-08-19 10:09:08 +00:00
Tom Hughes
7678f91cd1 Install the SIGILL handler everywhere so we get consistent
stacks and don't have to worry about __GLIBC_PREREQ not being
defined on all platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15567
2015-08-19 08:27:06 +00:00
Mark Wielaard
70848c7696 Handle (unwanted) line number info in filter_defcfaexpr.
This is just a testsuite cleanup. In the case defcfaexpr was compiled
with line number information (which might happen in some distro builds)
just throw it away because the expected output just wants to see the
function names.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15566
2015-08-18 14:34:49 +00:00
Tom Hughes
b22d60778f Attempt to work around issues with xend being executed unconditionally
when a pthread_rwlock is used in an invalid way.

Recent glibcs use transactional memory instructions to do lock ellision
but will sometimes, when locks are used in an invalid way, may calls to
xend on systems which don't support it, on the grounds that the program
is invalid anyway.

So we try and catch and ignore the resulting SIGILL in our tests that
deliberately work with invalid locks.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15565
2015-08-18 10:29:20 +00:00
Julian Seward
6d6732e9df Fix a second format string error observed whilst building on OSX 10.10.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15564
2015-08-18 07:54:22 +00:00
Julian Seward
7540350321 Fix a format string error observed whilst building on OSX 10.10.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15563
2015-08-17 21:19:19 +00:00
Ivo Raisr
707501d444 Runtime linker ld.so.1 can be now run under Valgrind on Solaris.
Fixes BZ#351386.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15562
2015-08-17 19:13:12 +00:00
Mark Wielaard
d66df29a90 Add bug338606 testfile to none/tests/scripts/Makefile.am EXTRA_DIST.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15561
2015-08-17 15:18:02 +00:00
Julian Seward
1c495d6a5e Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15560
2015-08-17 14:03:16 +00:00
Julian Seward
3e5636a4ca Add test cases for VCVT.{S,U}32.F32, S[n], S[n], #imm.
Pertains to #342783.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15559
2015-08-17 08:23:31 +00:00
Julian Seward
683436b8ea arm32: make sure we actually generate real 64-bit loads/stores for the
64 bit tests, rather than two 32 bit transactions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15558
2015-08-16 17:23:50 +00:00
Julian Seward
3953fe144c Enable building of ARMv8 crypto instruction tests, having finally
figured out what the relevant gcc flag is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15557
2015-08-16 12:18:26 +00:00
Julian Seward
bbb480bad2 Fix format string confusion that was somehow related to r15510.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15556
2015-08-16 11:54:38 +00:00
Julian Seward
0f002eb44d Add test cases for PRFM (register). Pertains to #345177.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15555
2015-08-16 11:46:16 +00:00
Ivo Raisr
e4ef13d89c Update script solaris/build_solaris_package to take into account
SVN version control software used by Valgrind.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15554
2015-08-15 19:51:35 +00:00
Rhys Kidd
b6efb6f0be Increase test coverage on OS X, by re-enabling the none/tests/amd64/avx2-1 regression test.
n-i-bz

(Unfortunately I don’t have right here the hw support, but build environment works)

$ perl tests/vg_regtest none/tests/amd64/avx2-1
avx2-1:          (skipping, prereq failed: test -x avx2-1 && ../../../tests/x86_amd64_features amd64-avx)

== 0 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==


On OS X 10.10

Before:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15553
2015-08-15 12:21:42 +00:00
Rhys Kidd
74d7f1cdfa Preliminary OS X memalign() shim work, although this specific regression test remains guarded due to clang build issues with _randArray.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15552
2015-08-15 11:40:27 +00:00
Rhys Kidd
774dbf0a73 Increase test coverage on OS X, by re-enabling the memcheck/tests/amd64/xsave-avx regression tests with a handy memalign() shim.
n-i-bz

(Unfortunately I don’t have right here the hw support, but build environment works)

$ perl tests/vg_regtest memcheck/tests/amd64/xsave-avx
xsave-avx:       (skipping, prereq failed: test -x xsave-avx && ../../../tests/x86_amd64_features amd64-avx)

== 0 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==


On OS X 10.10

Before:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15551
2015-08-15 11:16:35 +00:00
Rhys Kidd
be875fe3ac Increase test coverage on OS X, by re-enabling the none/tests/amd64/avx-1 regression tests with a handy memalign() shim.
n-i-bz

(Unfortunately I don’t have right here the hw support, but build environment works)

$ perl tests/vg_regtest none/tests/amd64/avx-1
avx-1:           (skipping, prereq failed: test -x avx-1 && ../../../tests/x86_amd64_features amd64-avx)

== 0 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==


On OS X 10.10

Before:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15550
2015-08-15 11:04:02 +00:00
Rhys Kidd
8a014b4f97 Increase test coverage on OS X, by re-enabling the none/tests/*/movbe regression tests with a handy memalign() shim.
n-i-bz

$ perl tests/vg_regtest none/tests/x86/movbe none/tests/amd64/movbe
movbe:           valgrind   -q ./movbe 
movbe:           valgrind   -q ./movbe 

== 2 tests, 0 stderr failures, 0 stdout failures, 0 stderrB failures, 0 stdoutB failures, 0 post failures ==


On OS X 10.10

Before:

== 592 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 594 tests, 215 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15549
2015-08-15 10:47:55 +00:00
Rhys Kidd
17aa7a30f6 Plumb through memalign16() rather than having four implementations of the same code. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15548
2015-08-15 08:55:14 +00:00