11682 Commits

Author SHA1 Message Date
Rhys Kidd
f61b92edba valgrind --leak-check=full memleak errors from system libraries on OS X 10.8
bz#347379
== bz#217236

Before:

== 591 tests, 237 stderr failures, 23 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@15190
2015-05-07 13:17:50 +00:00
Philippe Waroquiers
7878c9cd59 Compute total size with unsigned long long
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15189
2015-05-06 21:24:23 +00:00
Carl Love
3131343865 Patch 8 in a series of cleanup patches from Will Schmidt
Add a helper script to determine if the platform is ppc64le.
This is specifically used to help exclude the 32-bit tests from being
run on a ppc64LE (ABIV2)  platform.  The 32-bit targets, specifically ppc32/*
is not built on LE.
   
This patch fixes Vagrind bugzilla 347322.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15188
2015-05-06 21:11:35 +00:00
Philippe Waroquiers
4adab743dd Fix also the rm vgcore of a disabled test (also spotted by Matthias Schwarzott)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15187
2015-05-06 20:50:17 +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
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
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
Carl Love
8933335653 Patch 1 in a series of cleanup patches from Will Schmidt
Update ifdefs around the bogus-LR-value-handling code to allow ppc64le to
behave as ppc64 (BE) does.

This fixes the overlap test case, where the stack unwinding code was
otherwise coming up with bad instruction pointers.
    
This patch fixes Vagrind bugzilla 347322.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15183
2015-05-06 19:18:28 +00:00
Florian Krohm
fa0d7aa5c6 Simplify. The condition on line 1223 is always true.
Here's why:

The condition

 if (VG_(brk_limit) > VG_(brk_base))   line 1223

is reachable iff 

  newbrk < VG_(brk_base)  on line 1201  is false  AND
  newbrk < VG_(brk_limit) on line 1205  is true

Rewrite as

  newbrk >= VG_(brk_base)    is true  AND
  newbrk <  VG_(brk_limit)   is true

Rewrite as

  newbrk >= VG_(brk_base)        is true  AND
  newbrk <= VG_(brk_limit) - 1   is true

Combine

  VG_(brk_base) <= newbrk <= VG_(brk_limit) - 1

Therefore

  VG_(brk_base) <= VG_(brk_limit) - 1

Or

  VG_(brk_base) < VG_(brk_limit)

Which is the same as

  VG_(brk_limit) > VG_(brk_base)

qed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15181
2015-05-05 06:14:10 +00:00
Philippe Waroquiers
d31115a1d4 One more msg to use 'mmap-ed ANONYMOUS' wording
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15180
2015-05-04 20:00:49 +00:00
Rhys Kidd
5c8938f1ca Fix suppression for pthread_rwlock_init on OS X 10.8
bz#347151

Before:

== 593 tests, 238 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 593 tests, 237 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15179
2015-05-04 12:46:44 +00:00
Julian Seward
fda6609964 Add a new howto for running mips64-linux on QEMU.
Rename the aarch64-linux howto accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15178
2015-05-04 08:40:11 +00:00
Philippe Waroquiers
109b2f9417 * Out of memory message was using 'bytes have already been allocated.'
while this nr is in fact the total anonymously mmap-ed.
  Change the message so as to reflect the shown number.
* Show also the total anonymous mmaped in non OOM memory statistics



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15177
2015-05-03 21:48:13 +00:00
Philippe Waroquiers
9655203ffb Reduce nr of lines produced by laog gc --stats=yes
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15176
2015-05-03 10:56:16 +00:00
Rhys Kidd
7f0c6f5ef6 Properly guard exp-bbv/tests/x86/ on OS X. Partial fix for BZ#344416 (at least reduces required hacks).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15175
2015-05-02 04:23:46 +00:00
Philippe Waroquiers
22988c423a This patch reduces the memory needed for a VtsTE by 25% (one word)
on 32 bits platforms. No memory reduction on 64 bits platforms,
due to alignment.
The patch also shows the vts stats when showing the helgrind stats.

The perf/memrw.c perf test gets also some new additional features
allowing e.g. to control the size of the read or written blocks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15174
2015-05-01 17:12:00 +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
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
Rhys Kidd
9fe1f89425 Fix aspacem segment mismatch: seen with none/tests/bigcode
bz#345824

Tested on OS X 10.9 and OS X 10.10.

Before:

== 595 tests, 237 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 595 tests, 236 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15171
2015-05-01 06:29:51 +00:00
Rhys Kidd
719dc599ed Fix regression test compile issue on OS X platform, introduced in r15113. n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15170
2015-04-30 23:39:10 +00:00
Florian Krohm
b6251821a1 Remove a few embarassing comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15169
2015-04-30 20:44:17 +00:00
Philippe Waroquiers
9f9c5c6947 Rename write variable to avoid a warning:
memrw.c:37: warning: declaration of ‘write’ shadows a global declaration
/usr/include/unistd.h:333: warning: shadowed declaration is here



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15167
2015-04-30 20:30:12 +00:00
Florian Krohm
307f73e22b Fix the namespace of the functions dealing with segment names.
As those are private to the address space manager they should
be ML_ not VG_ prefixed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15165
2015-04-30 17:34:04 +00:00
Julian Seward
47f7612998 DW_CFA_def_cfa_expression: don't push the CFA on the stack before
evaluation starts.  For DW_CFA_val_expression and DW_CFA_expression
doing so is correct, but not for DW_CFA_def_cfa_expression.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15160
2015-04-30 11:45:13 +00:00
Julian Seward
e6e2211dc8 Add a HOWTO on how to build and install aarch64-linux on QEMU,
primarily for testing convenience.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15159
2015-04-30 11:06:00 +00:00
Julian Seward
a9b9383bcc Fix intermittent build error on aarch64-linux caused by inadequate
alignment for some data symbols.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15157
2015-04-29 20:48:48 +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
1322e9be35 Use error exit code when bailing out.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15153
2015-04-28 18:46:33 +00:00
Julian Seward
065bdba7c8 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15151
2015-04-28 11:49:05 +00:00
Florian Krohm
2f9ede0c45 Back out most of r15145 which reports bug fixes for various altivec insns.
Either those bugs have been fixed looong time ago, or the reporter ran 
on a host without altivec capabilities, or those insns were actually
e500 insns which are not supported at all at this point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15150
2015-04-27 21:10:36 +00:00
Florian Krohm
748d43b662 Fix fallout from r15138: build error on Darwin due to renamed function.
Fixes BZ #346801.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15149
2015-04-27 17:28:15 +00:00
Florian Krohm
a0bc5cba58 Remove magic constant. Use LibVEX_GUEST_STATE_ALIGN instead.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15148
2015-04-27 14:28:28 +00:00
Florian Krohm
7681c4e4e0 Follow up on VEX r3144 and remove VexGuestTILEGXStateAlignment.
Also fix the alignment check which should be mod 16 not mod 8.
Well, actually, it should be mod LibVEX_GUEST_STATE_ALIGN but
that is another patch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15147
2015-04-27 14:26:26 +00:00
Florian Krohm
11309294c4 Fix an outdated comment as pointed out in BZ #211256.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15146
2015-04-27 14:04:52 +00:00
Florian Krohm
e9611ffd8b Update. Mostly ppc insns that appear to have been fixed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15145
2015-04-26 19:23:56 +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
Philippe Waroquiers
f6ab65fc2a Replace adler32 by sdbm_hash in m_deduppoolalloc.c
adler32 is not very good as a hash function.
sdbm_hash gives more different keys that adler32,
and in a large majority of the cases, shorter chains.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15142
2015-04-25 14:53:35 +00:00
Philippe Waroquiers
0543df0e12 Give statistics about RCEC helgrind hash table chains.
Improve statistic in coregrind hash table


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15141
2015-04-25 14:00:24 +00:00
Florian Krohm
7dc618ae86 Check for any client stack segment. Rule out valgrind segments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15140
2015-04-24 10:05:23 +00:00
Philippe Waroquiers
90febbe39b Add some internal documentation for 'svn ignore' maintenance;
reference it from README_DEVELOPERS_processes


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15139
2015-04-23 21:28:12 +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
Florian Krohm
8d9675b48a Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15137
2015-04-23 13:17:20 +00:00
Carl Love
163762d1aa There is an ABI change in how the PPC64 gcc compiler handles 128 bit arguments
are aligned with GCC 5.0.  The compiler generates a "note" about this starting
with GCC 4.9.  To avoid generating the "note", the passing of the arguments
were changed to a pointer to make it pass by reference rather then pass by 
value.

bugzilla 346487.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15136
2015-04-22 21:17:48 +00:00
Carl Love
46a560d100 Update NEWS file with bix for bugzilla 346474.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15135
2015-04-22 16:28:22 +00:00
Carl Love
79808be79c Add support for the TEXASRU register. This register contains information on
transactional memory instruction summary information.  This register contains
the upper 32-bits of the transaction information.  Note, the valgrind
implementation of transactional memory instructions is limited.  Currently, the
contents of the TEXASRU register will always return 0.  The lower 64-bits of
the trasnaction information in the TEXASR register will contain the failure
information as setup by Valgrind.

The vex commit 3143 contains the changes needed to support the TEXASRU
register on PPC64.

The support requires changing the value of MAX_REG_WRITE_SIZE in
memcheck/mc_main.c from 1696 to 1712.  The change is made in this
valgrind commit.

This patch addresses Bugzilla 346474

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15134
2015-04-22 16:17:06 +00:00
Mark Wielaard
04f8bc3793 Enable rt_sigpending syscall on ppc64 linux.
Patch from Thomas Huth <thuth@redhat.com>

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15133
2015-04-22 15:29:03 +00:00
Florian Krohm
2d01f78684 Rename VG_(am_is_bogus_client_stack_pointer) to
VG_(am_addr_is_in_extensible_client_stack).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15132
2015-04-22 14:16:11 +00:00
Florian Krohm
3e50adbd1c Fix a silly bug.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15131
2015-04-22 13:50:13 +00:00
Bart Van Assche
4bd1c66504 NEWS: Add entry for bug #346416 / trunk r15123
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15130
2015-04-22 08:07:35 +00:00