475 Commits

Author SHA1 Message Date
Petar Jovanovic
4b49c4ee66 make bar_bad tests more deterministic
Canceling the thread slp2 before the case 5 makes behaviour of this test
more deterministic.
Also, as Philippe W. pointed out, adding --fair-sched=try seems to avoid
variable and sometimes very long run time for these tests.

Related BZ #358213


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16154
2016-11-23 17:38:29 +00:00
Philippe Waroquiers
aa630a3169 Locally define vgPlain_scrcmp in 2 unit tests
Humph, this should have been part of :
   16122 Add VG_(strIsMemberXA) in pub_tool_xarray.h
which means that between 16122 and this revision, these 2 unit tests
will (very probably) not compile.
That will make bissect not easy :(


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16126
2016-11-11 14:26:54 +00:00
Mark Wielaard
ee8cfbc434 Add libc_test to workaround pth_cond_destroy_busy test hangs.
This is a workaround for bug #371396. It adds a new test program
that can be used skip tests given a specific libc implementation
and optionally a specific minimum version. Currently only glibc
is recognized. This is used for the drd and helgrind tests
pth_cond_destroy_busy to be skipped on glibc 2.24.90+.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@16097
2016-10-21 00:02:10 +00:00
Ivo Raisr
4e6b94f570 Fix expected error output of drd/tests/bar_bad* on Solaris.
On Solaris, we still do get error reports about destroying
a barrier which was never initialized even after SVN r15962.
We also get an error report about destroying barrier bar3
which is still waited upon by a thread.
n-i-bz


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15979
2016-09-23 17:23:47 +00:00
Mark Wielaard
5f37e4dcde Workaround bar_bad testcase hanging with newer glibc in helgrind/drd tests.
This is a workaround for bug #358213 helgrind/drd pthread_barrier tests
hangs with new glibc pthread barrier implementation. This makes sure that
the tests don't hang anymore. It does this by creating new threads that
sleep and kill the other threads after some time. But this introduces
some non-determinism that might cause the tests to occassionally fail
(both against old and new glibc implementations).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15962
2016-09-19 14:16:35 +00:00
Mark Wielaard
f2369cbf31 drd/tests/std_thread[2].cpp rename execute_native_thread_routine.
Both tests define a execute_native_thread_routine function that we
took from libstdc++. Unfortunately because of a bug this function
is not local in some versions of libstdc++ and so our similar named
function will clash when trying to link.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70476#c2

Simply rename our version to work around this.

Since we don't build this part of the test code for gcc >= 6, this
issue only happens if the buggy libstdc++ thread code is used together
with gcc 5. This is the case with for example devtoolset-4-gcc-5.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15842
2016-04-02 22:07:59 +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
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
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
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
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
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
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
Philippe Waroquiers
00ef870633 When process dies due to a signal, show the signal and the stacktrace
at default verbosity


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15251
2015-05-17 18:31:55 +00:00
Carl Love
48814f20f1 Patch 3 in a series of cleanup patches from Will Schmidt
Update the pth_create_chain vgtest prereq to handle the ppc64le architecture
in the same way as ppc64 (BE).
   
This patch fixes Vagrind bugzilla 347322.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15185
2015-05-06 20:16:04 +00:00
Rhys Kidd
d92ece08a3 Properly guard drd/tests/thread_name with HAVE_PTHREAD_BARRIER. Partial fix for BZ#344416 (at least reduces required hacks).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15172
2015-05-01 10:19:22 +00:00
Florian Krohm
d4828f7d30 Fix a compiler warning about an incompatible format.
Shows up on 32-bit builds only.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14848
2015-01-04 22:47:32 +00:00
Bart Van Assche
0b849cee4d drd/tests/std_thread2.supp: Add a suppression pattern
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14585
2014-09-28 18:28:18 +00:00
Bart Van Assche
72ce61d241 drd/tests: Follow-up for r14478 - make regression test output independent of --read-inline-info
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14491
2014-09-08 08:04:40 +00:00
Bart Van Assche
e8d6ec699f drd: Make regression test output independent of --read-inline-info
There are plans to enable --read-inline-info=yes for all Valgrind
tools. Hence make the DRD regression test output independent of how
--read-inline-info has been set.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14478
2014-09-06 12:19:23 +00:00
Florian Krohm
ed872a7014 Fix most clang warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14467
2014-09-05 18:30:05 +00:00
Florian Krohm
e65638e8f1 Add std_thread2.supp to the tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14442
2014-09-03 16:59:43 +00:00
Bart Van Assche
ed8d0edf04 drd/tests/pth_create_chain: Reduce stack usage
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14394
2014-08-30 06:48:01 +00:00
Bart Van Assche
2abde2195e drd/tests/tls_threads: Add
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14314
2014-08-20 06:48:22 +00:00
Florian Krohm
ea9d4bbbeb Make suppression more flexible.
Needed for s390 running Fedora 20.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14276
2014-08-14 14:12:38 +00:00
Bart Van Assche
c907d5f5a1 drd/tests/free_is_write: Reduce stack usage
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14254
2014-08-10 08:14:55 +00:00
Bart Van Assche
6a597e577e drd/tests/threaded-fork-vcs: Add
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14243
2014-08-08 16:20:13 +00:00
Carl Love
914f75de32 This commit is for Bugzilla 334384. The Bugzilla contains patch 1 of 3
to add PPC64 LE support.  The other two patches can be found in Bugzillas
334834 and 334836.  The commit does not have a VEX commit associated with it.

POWER PC, add initial Little Endian support

The IBM POWER processor now supports both Big Endian and Little Endian.
This patch renames the #defines with the name ppc64 to ppc64be for the BE
specific code.  This patch adds the Little Endian #define ppc64le to the

Additionally, a few functions are renamed to remove BE from the name if the
function is used by BE and LE. Functions that are BE specific have BE put
in the name.

The goals of this patch is to make sure #defines, function names and
variables consistently use PPC64/ppc64 if it refers to BE and LE,
PPC64BE/ppc64be if it is specific to BE, PPC64LE/ppc64le if it is LE
specific.  The patch does not break the code for PPC64 Big Endian.

The test files memcheck/tests/atomic_incs.c, tests/power_insn_available.c
and tests/power_insn_available.c are also updated to the new #define
definition for PPC64 BE.

Signed-off-by: Carl Love <carll@us.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14238
2014-08-07 23:17:29 +00:00
Florian Krohm
282aac6b09 Adapt testcase so it can be compiled with GCC 3.4.6 against glibc 2.3.4
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14193
2014-07-26 11:10:30 +00:00
Bart Van Assche
a7401620ad drd/tests/std_thread*: Add a workaround for an Ubuntu 14.04 gcc bug
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14156
2014-07-12 09:30:14 +00:00
Bart Van Assche
9214c37d49 Rename --defaultsupp into --default-suppressions as requested by Julian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14090
2014-06-24 05:08:21 +00:00
Bart Van Assche
7f0e2c91ae drd/tests/std_thread2: Re-enable
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14081
2014-06-22 10:13:47 +00:00
Bart Van Assche
73c2760051 drd/tests/std_thread2: Disable this test temporarily such that the suppression patterns can be restored
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14030
2014-06-14 16:39:28 +00:00
Bart Van Assche
1f61c5c959 drd/tests/std_thread2: Make this test independent of the libstdc++ version
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14022
2014-06-11 06:39:03 +00:00
Bart Van Assche
af82b029c2 drd/tests/std_thread2: Filter out libstdc++ header file line numbers
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14019
2014-06-10 07:46:50 +00:00
Bart Van Assche
b7a7c3c66c drd/tests/std_thread2: Add
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14014
2014-06-09 09:01:46 +00:00
Bart Van Assche
703310223e drd/tests/local_static: Disable because g++ does not yet allow proper interception of initialization of local static variables
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14013
2014-06-09 09:00:42 +00:00
Bart Van Assche
3dac2e0ca4 drd/tests/local_static: Fix a typo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14011
2014-06-09 07:38:32 +00:00
Bart Van Assche
77897d6ecb drd/tests/local_static: Add
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14009
2014-06-09 06:54:30 +00:00
Bart Van Assche
110f1ebd71 drd/tests/std_thread: Remove two superfluous macro definitions
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14003
2014-06-07 13:13:45 +00:00
Bart Van Assche
457786af9b drd/tests/std_thread: Minimize diffs with original
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14002
2014-06-07 07:48:04 +00:00
Bart Van Assche
fc5921fa59 drd/tests/std_thread: Enable this test program
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14001
2014-06-07 07:31:56 +00:00
Bart Van Assche
f879a52027 drd: Add semaphore annotations (#333072)
This is a slightly modified version of a patch from Ivo Raisr <ivosh@ivosh.net>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13984
2014-05-18 19:32:26 +00:00
Bart Van Assche
7c67e90c47 drd/tests/atomic_var: Revert r13876.
r13876 was a workaround for false ordering introduced by platform-specific
(Solaris) code. The conclusion of an off-list discussion was that this has
to be solved in the drd tool itself and not by modifying test programs. Hence
this revert.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13980
2014-05-17 10:44:00 +00:00
Philippe Waroquiers
e122b8d637 Fix a small typo in drd EXTRADIST Makefile.am file list for mips32
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13887
2014-03-29 00:37:51 +00:00
Dejan Jevtic
6107689cd8 mips32: When we are accessing elements via double pointer MIPS compiler can
generate two consecutive 32bit loads instead of one 64bit load. Because of that
in error log we have two conflict loads of size 4 instead of one conflict load
of size 8.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13883
2014-03-20 10:23:43 +00:00
Bart Van Assche
4ce8144dee drd/tests/atomic_var: Avoid that platform-specific code can trigger a false negative
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13876
2014-03-18 08:45:51 +00:00
Bart Van Assche
43aef21f1a drd/tests/thread_namedrd/tests/thread_name: Ensure mutex address uniqueness (see also #331847)
From: Ivo Raisr <ivosh@ivosh.net>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13854
2014-03-07 14:38:14 +00:00
Bart Van Assche
a18953034d drd/tests/sem_open: Change the semaphore name (#331839)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13853
2014-03-07 07:45:43 +00:00