894 Commits

Author SHA1 Message Date
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
Florian Krohm
b790e08474 Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15495
2015-08-05 14:38:57 +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
7a474c9455 Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394
2015-07-05 21:53:33 +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
Florian Krohm
d655852d69 Remove dependency on bash. Fixes BZ #347978.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15291
2015-05-26 11:52:45 +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
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
d47181fd7d Add command line flag --max-threads=<integer> to increase the number of
threads that valgrind can handle. No recompile is needed. 
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14932
2015-02-13 19:08:26 +00:00
Julian Seward
9dbe973b16 Add some parentheses to keep gcc 5 (prerelease) from complaining.
No functional change.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14877
2015-01-20 00:12:18 +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
Florian Krohm
f1fde81e7d Fix a few VG_(message) invocations. The function does not add a
newline character under the covers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14796
2014-11-29 17:50:10 +00:00
Bart Van Assche
99a8d401fc drd: Add a consistency check
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14790
2014-11-26 12:47:19 +00:00
Florian Krohm
ac3b22e6af Merge revisions 14445 and 14446 from the BUF_REMOVAL branch to trunk.
Two things:
- remove the buffer argument from VG_(DebugInfo_sect_kind)
- allocate AddrInfo::SectKind::objname dynamically


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14719
2014-11-13 21:41:28 +00:00
Florian Krohm
9d16aabb17 Constify the tool interface.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14642
2014-10-20 19:02:38 +00:00
Florian Krohm
f5e2bdbddc Change the definition of VgHashTable to not have pointer type.
This is (a) consistent with how the other containers are defined
and, more importantly, (b) allows the constification of the hash table API.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14639
2014-10-18 10:58:05 +00:00
Florian Krohm
5929994d48 Merge revisions 14230, 14602, and 14604 from the BUF_REMOVAL branch to trunk.
The change eliminates the fixed size buffers in gen_suppression and
show_used_suppressions. This is achieved by changing the return type from
VG_TDICT_CALL(tool_get_extra_suppression_info and
VG_TDICT_CALL(tool_print_extra_suppression_use from Bool to SizeT.
A return value of 0 indicates that nothing (except the terminating '\0'
which is always inserted) was written to the buffer. This corresponds to the
previous False return value. A return value which is equal to the buffer
size (that was passed in as function argument) indicates that the buffer was
not large enough. The caller then resizes the buffer and retries.
Otherwise, the buffer was large enough.
Regtested with a resize value of 1.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14606
2014-10-07 14:28:52 +00:00
Florian Krohm
cd357d71b4 Merge six easy pieces from the BUF_REMOVAL branch:
r14271  Audit a few buffer sizes, increase one.
r14280  Audit buffer size.
r14296  Remove a few unneeded header files.
r14310  Replace fixed size buffers with a large enough buffers.
r14338  Remove a dead assignment in print_bbcs and make global variable
        print_fd a local variable.
r14359  Remove a benign macro redefinition in cachegrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14595
2014-09-30 22:15:05 +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
Florian Krohm
e383c673dd Ripple from constifying parameters of instrumentation functions and
callbacks from VexTranslateArgs. See VEX r2958.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14564
2014-09-24 12:06:55 +00:00
Bart Van Assche
5f0ec345eb DRD: Handle Imbe_CancelReservation properly (clrex on ARM)
This was reported by Florian and was detected by analyzing the
compiler output with -Wswitch-enum enabled.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14549
2014-09-18 07:11:24 +00:00
Bart Van Assche
4187fcf384 drd/Makefile.am: Add -Wswitch-enum
Hopefully one day this compiler flag can be enabled for the entire Valgrind
code base.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14548
2014-09-18 06:54:52 +00:00
Florian Krohm
c88dc7f039 Tidy up m_xarray.c.
VG_(newXA) and VG_(cloneXA) never return NULL. Remove pointless asserts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14539
2014-09-15 18:50:17 +00:00
Florian Krohm
a51a7bb1db Document the NULL-ness of the return values of HT_construct and HT_to_array.
Audit call sites.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14532
2014-09-13 22:31:13 +00:00
Florian Krohm
2aa67544d6 Tidy up m_oset.c
- Document that the allocation function must ot return NULL.
- As a conequence of the previous requirement the various Create and AllocNode
  functions cannot return NULL. Remove pointless asserts at call sites.
- Remove documentation of undefined function  CreateWithCmp.
- Names of library functions (such as 'free') are reserved as a are names
  beginning with underscores. Don't use those.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14531
2014-09-13 22:04:33 +00:00
Florian Krohm
33f32780a5 VG_(malloc/calloc/strdup) never return NULL (and never will).
So it's pointless to test or assert their return values.
Remove code doing so.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14528
2014-09-12 22:24:51 +00:00
Florian Krohm
bfb5d3fc36 Remove some unneded checks as identified by IBM's BEAM checker.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14518
2014-09-11 22:15:39 +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
Bart Van Assche
2a8993440e drd/docs/drd-manual.xml: Remove a redundant phrase.
This was reported by Dilyan Palauzov


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14477
2014-09-06 06:23:15 +00:00
Julian Seward
26f0bb05e7 Be more careful to separate build flags for the preload shared objects
as opposed to the valgrind code proper.  In particular, make sure that
-mpreferred-stack-boundary=2 does not get used for the preload shared
objects, since that can cause the stack to become misaligned and leads
to segfaults.  Modified version of a patch from Matthias Schwarzott
(zzam@gentoo.org).  Fixes #324050.

Also, fix the configure check in configure.ac for
-mpreferred-stack-boundary=2 so that it checks whether this is
allowable for 32-bit code generation even on 64-bit (x86) hosts.  This
check was wrong before now and led to 32-bit builds on 64-bit hosts
generating poorer code for speed critical helper functions (eg
helperc_LOADV32le) than on 32-bit builds on 32-bit hosts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14471
2014-09-05 20:00:22 +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
4662f1d8cc drd: Move VG_(getenv)("DRD_VERIFY_CONFLICT_SET")
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14249
2014-08-09 12:58:17 +00:00
Bart Van Assche
71c31d1f09 drd/Testing.txt: Document how to run all regression tests with conflict set verification enabled
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14248
2014-08-09 12:47:17 +00:00
Bart Van Assche
8701c89a36 drd: Clear conflict set after fork (#338115)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14244
2014-08-08 16:27:30 +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
Bart Van Assche
6822f42ee1 drd: Add command-line option --verify-conflict-set
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14242
2014-08-08 16:17:58 +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
6b68ff1bdf Remove two unneded include files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14196
2014-07-26 17:26:22 +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