2071 Commits

Author SHA1 Message Date
Florian Krohm
b637aed262 Fix clobber.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15525
2015-08-12 13:24:33 +00:00
Julian Seward
859a4a3f3c Add test cases for AVX XSAVE and XRSTOR instructions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15524
2015-08-12 11:35:27 +00:00
Julian Seward
85484303b1 Handle new ILGop_IdentV128 introduced by vex r3169.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15522
2015-08-12 11:16:23 +00:00
Florian Krohm
c39a983920 For those testcases that crash one way or another
remove any core files after running the test.
Patch by Matthias Schwarzott <zzam@gentoo.org>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15520
2015-08-11 20:58:15 +00:00
Florian Krohm
70bfaf9c9f When profiling memory events in memcheck, event counts larget
than INT_MAX have been observed in practice. Make counters
64 bit entities.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15516
2015-08-09 20:55:39 +00:00
Florian Krohm
130cf6ffca The number of elements in a RangeMap cannot be negative.
Let the return type of VG_(sizeRangeMap) reflect that.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15492
2015-08-05 13:23:11 +00:00
Florian Krohm
99514d1d7f The number of elements in an OSet cannot be negative.
Let the return type of VG_(OSetGen_Size) reflect that.
Also fix a few casts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15491
2015-08-05 12:09:55 +00:00
Florian Krohm
079b42ca1d Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15486
2015-08-04 21:26:10 +00:00
Philippe Waroquiers
33089164fa * Memcheck:
- A new monitor command 'xb <addr> <len>' shows the validity bits
    of <len> bytes at <addr>. Below the validity bits, the byte
    values are shown using a layout similar to the GDB command
    'x /<len>xb <addr>'. The monitor command 'xb' is easier to use
    (in particular on little endian computers) when you need to associate
    byte data value with their corresponding validity bits.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15483
2015-08-04 19:11:03 +00:00
Florian Krohm
f83292417a Rewrite memcheck's event counter machinery.
- unique event counters
- simplify PROF_EVENT
- do not allocate more event counters than needed
- compile cleanly


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15482
2015-08-04 15:58:41 +00:00
Florian Krohm
7c333d2287 GCC 5.1 issues warnings about static variables declared within non-static
inline functions. There is no command line flag so suppress that particular
warnings. So let's suppress all warnings for this testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15473
2015-08-02 20:05:41 +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
Florian Krohm
6e1a7a11a0 Silence a few warnings issued by GCC 5.1 claiming that 'res' is
uninitialised. Perhaps an incorrect clobber or a compiler bug? 
Anyhow, initialising the variable will do the trick.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15471
2015-08-02 19:35:49 +00:00
Florian Krohm
56e0f1ed28 As pointed out by GCC 5.1 macro arguments ought to be paranthesized
when referenced. Previously CHECK(a && b) would expand to !a && b
which clearly was not the intention.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15470
2015-08-02 19:31:14 +00:00
Ivo Raisr
37faa477be Use handwritten memcheck assembly helpers on x86/Solaris in addition to {arm,x86}-linux.
Fixes BZ #350813.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15464
2015-07-31 16:12:44 +00:00
Florian Krohm
f5ca26042c In VALGRIND_PRINTF write out the thread name to xml.
Patch by Matthias Schwarzott <zzam@gentoo.org>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15460
2015-07-30 21:49:49 +00:00
Rhys Kidd
12d2c103ad Fix memcheck/tests/darwin/aio on OS X.
n-i-bz

On OS X 10.10

Before:

== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 593 tests, 213 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15454
2015-07-26 05:52:21 +00:00
Rhys Kidd
0a59ab78ef Clean up some bit rot within memcheck/tests/darwin/scalar. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15453
2015-07-26 04:26:06 +00:00
Bart Van Assche
d138ed7448 regression tests: Remove superfluous backticks
Backticks are not needed around a shell statement that does not produce
any output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15439
2015-07-23 02:47:42 +00:00
Rhys Kidd
12948fdbb8 Unbreak the OS X/clang build from r15419. This handrolled assembly on x86 will need more work to build with Apple's clang variant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15436
2015-07-23 00:08:30 +00:00
Philippe Waroquiers
e97d5ed3eb Unbreak the build on several setups :
It looks like the standard says that
   #define __STDC_FORMAT_MACROS
is needed in c++ in order to have PRIxPTR defined.

At least on gcc110 g++ 4.7.2, leak_cpp_interior.cpp
was not compiling.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15435
2015-07-22 21:37:06 +00:00
Julian Seward
0cc293514c Fix incorrect implementation of LOADV64le that was added in r15418.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15427
2015-07-21 15:38:43 +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
8c1cc04641 Patch 2 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

Update all vgtest files to reference the new capability check helper.
This includes a few adjustments to ensure the test is checking for
the specific capability. I.e. isa_2_07 is a requirement for htm, but
does not indicate htm support is actually present.

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15421
2015-07-20 19:36:53 +00:00
Julian Seward
73e3ad2a5b Bug 349879 - [PATCH] memcheck: add handwritten assembly for helperc_LOADV
Patch from Matthias Schwarzott (zzam@gentoo.org)

Also, add better sectioning with comment lines, as this part of the code
was getting hard to follow.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15419
2015-07-20 13:11:03 +00:00
Julian Seward
3174c10841 VG_(helperc_LOADV64le): add handwritten assembly helper for ARM32
VG_(helperc_LOADV32le): VG_(helperc_LOADV16le): VG_(helperc_LOADV8):
use ".L" style assembly labels so they don't appears as new symbols
during disassembly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15418
2015-07-20 09:59:25 +00:00
Rhys Kidd
f8b4dc3b58 Block the running of a known hanging regression test on OS X. Partial fix for bz#344416, and related to BZ#350359.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15416
2015-07-19 01:07:26 +00:00
Rhys Kidd
042441c57f Fix Valgrind does not support pthread_sigmask() on OS X
bz#201216

On OS X 10.10

Before:

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

After:

== 592 tests, 219 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15410
2015-07-12 06:54:56 +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
Rhys Kidd
50310539d6 Fix Memcheck: the 'impossible' happened: unexpected size for Addr (OSX/wine)
bz#347988
== 345929

On OS X 10.10

Before:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15391
2015-07-01 23:04:58 +00:00
Carl Love
c4fb707788 Backing out patch 1 and 2 from Bugzilla 349790.
The new script (tests/check_ppc64_auxv_cap) in the first patch was
written for the bash shell.  I was told by fkrohm that there was an
issue with bash sometime ago and the decision was to use sh instead.
sh maps to bash on a lot of systems but on some it maps to dash.  The
script is not compatible with dash.  

In retesting the second patch with a fresh svn pull, I found that I
forgot to do the svn add for the new script file.  Which causes the
regression test to fail with the second patch applied.  

So, I have decided it will be best to just back out patch 1 and 2 for now.
I will fix the script and do this again.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15390
2015-07-01 21:29:12 +00:00
Carl Love
633ec0c887 Patch 2 of 6
Update all vgtest files to reference the new capability check helper.
This includes a few adjustments to ensure the test is checking for
the proper capability. (i.e. htm versus isa_2_07).

Patch 1 valgrind commit id 15388.

The bugzilla for this commit is 349790

Patch submitted by 	 Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15389
2015-07-01 19:44:13 +00:00
Philippe Waroquiers
d6438d2c05 Fix 348949 Bogus "ERROR: --ignore-ranges: suspiciously large range"
Patch from Mark Harris 



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15333
2015-06-11 19:57:42 +00:00
Julian Seward
91ca5a0233 arm32-linux only: add handwritten assembly helpers for
MC_(helperc_LOADV32le), MC_(helperc_LOADV16le) and
MC_(helperc_LOADV8).  This improves performance by around 5% to 7% in
the best case, for run-of-the-mill integer code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15317
2015-06-05 13:33:46 +00:00
Mark Wielaard
10816c8683 Run memcheck/tests/demangle with -q.
The interesting part is the demangled backtrace in the error message.
Suppress the memory allocation/blocks summary which can differ slightly
depending on the underlying arch/libs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15308
2015-06-03 09:52:00 +00:00
Rhys Kidd
793b9629dc Fix unhandled syscall: unix:410 (sigsuspend_nocancel) on OS X. bz#319274.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15249
2015-05-17 14:02:34 +00:00
Rhys Kidd
57d82d1527 Fix Warning: noted but unhandled ioctl 0x2000747b on Mac OS X. bz#208217.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15246
2015-05-17 07:31:20 +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
Rhys Kidd
0c10aa2460 Fix unhandled syscall: unix:132 (mkfifo) on OS X. bz#212291.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15242
2015-05-16 14:48:08 +00:00
Rhys Kidd
47679c86e7 Add (presently) failing test case for bz#212291.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15241
2015-05-16 14:18:36 +00:00
Carl Love
1a62d8a465 Patch 6 in a revised series of cleanup patches from Will Schmidt
Fix multipleinheritance heuristic for ppc64LE (leak_cpp_interior test).
    Adjust the PPC64 #ifdiffery to indicate that ppc64BE uses a thunk table,
    but ppc64LE (in particular, the ELF ABIV2) does not.  In this case, thunk
    table == function descriptors.
    
    Signed-off-by: Will Schmidt <will_schmidt@vnet.ibm.com>
    --
    
    This patch replaces the previously posted "[6/7] add leak_cpp_interior
    test .exp results ....."

This patch fixes Vagrind bugzilla 347686


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15238
2015-05-15 16:50:06 +00:00
Carl Love
603a6072ba Patch 4 in a revised series of cleanup patches from Will Schmidt
Add a suppression to handle a "Jump to the invalid address..." message
that gets generated on power.  This is a variation of the existing
suppressions.

While here, I also updated the "prog:" line in the vgtest file to reference
the supp_unknown executable, versus the badjump executable.  They share the
same source code, so I think this is effectively cosmetic.
 
This patch fixes Vagrind bugzilla 347686


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15233
2015-05-14 21:52:59 +00:00
Rhys Kidd
a32cff8baf bz#347233 - Fix memcheck/tests/strchr on OS X 10.10 (Haswell)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15229
2015-05-14 13:03:08 +00:00
Rhys Kidd
f57ad21fa9 Use fxsave64 and fxrstor64 mnemonics instead of old-school rex64 prefix
bz#339636

Before:

== 591 tests, 232 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 232 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15198
2015-05-09 23:32:13 +00:00
Philippe Waroquiers
215b263765 Fix incorrect cleanup lines in 2 tests (spotted by Matthias Schwarzott)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15186
2015-05-06 20:16:34 +00:00
Carl Love
5b55e14b95 Patch 2 in a series of cleanup patches from Will Schmidt
Adjust the badjump2 test for ppc64le/ABIV2. Under the ABIV2 there
is no function descriptor, so the fn[] setup does not apply.
This fixes the badjump2 test failure as seen on ppc64le.
   
This patch fixes Vagrind bugzilla 347322.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15184
2015-05-06 19:44:14 +00:00
Philippe Waroquiers
4256a17920 This patch adds a function that allows to directly properly size an xarray
when the size is known in advance.

3 places identified where this function can be used trivially.

The result is a reduction of 'realloc' operations in core
arena, and a small reduction in ttaux arena
(it is the nr of operations that decreases, the memory usage itself
stays the same (ignoring some 'rounding' effects).

E.g. for perf/bigcode 0, we change from
  core 1085742/ 216745904 totalloc-blocks/bytes,     1085733 searches
  ttaux 5348/   6732560 totalloc-blocks/bytes,        5326 searches
to
  core 712666/ 190998592 totalloc-blocks/bytes,      712657 searches
  ttaux 5319/   6731808 totalloc-blocks/bytes,        5296 searches

For bz2, we switch from
  core 50285/  32383664 totalloc-blocks/bytes,       50256 searches
  ttaux 670/    245160 totalloc-blocks/bytes,         669 searches
to
  core 32564/  29971984 totalloc-blocks/bytes,       32535 searches
  ttaux 605/    243280 totalloc-blocks/bytes,         604 searches

Performance wise, on amd64, this improves memcheck performance
on perf tests by 0.0, 0.1 or 0.2 seconds depending on the test.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15173
2015-05-01 16:46:38 +00:00
Florian Krohm
97b35b97f6 Issue an error message if then brk segment overflows.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15155
2015-04-29 12:59:16 +00:00
Florian Krohm
b1d6b96f07 Fix BZ #342683. Based on patch by Ivo Raisr.
What this does is to make sure that the initial client data segment
is marked as unaddressable. This is consistent with the behaviour of
brk when the data segment is shrunk. The "freed" memory is marked
as unaddressable.
Special tweaks were needed for s390 which was returning early from
the funtion to avoid sloppy register definedness initialisation.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15144
2015-04-25 18:23:21 +00:00
Florian Krohm
e0927ca1ea Fix the writev / readv wrappers. Do not read the array pointed to
by the 2nd argument, if the element count is negative.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15143
2015-04-25 18:14:17 +00:00