1031 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Carl Love
0a9b6b47d8 Add support for the lbarx, lharx, stbcx and sthcs instructions.
One of the expect files was missing.  Also found that there 
was a bug in the stq, stqcx, lq and lqarx instructions for LE.
The VEX commit for the instruction fix was 3138.

This commit updates the expect files for the corrected instructions
and adds the missing expect files.

The bugzilla for the orginal issue of the missing instructions
is 346324.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15120
2015-04-20 23:38:33 +00:00
Carl Love
ec0778f110 Forgot to add the new files in memcheck/tests/ppc32 and memcheck/tests/ppc32.
They should have been part of the previous commit 15106.

--------------------------------------------------------------------

Add support for the lbarx, lharx, stbcx and sthcs instructions.

The instructions are part of the ISA 2.06 but were not implemented
in all versions of hardware.  The four instructions are all supported
in ISA 2.07.  The instructions were put under the ISA 2.07 category
of supported instructions in this patch.

The VEX commit for this fix is r3137.

The bugzilla for this issue is 346324.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15107
2015-04-18 00:01:58 +00:00
Carl Love
eb5aced360 Add support for the lbarx, lharx, stbcx and sthcs instructions.
The instructions are part of the ISA 2.06 but were not implemented
in all versions of hardware.  The four instructions are all supported
in ISA 2.07.  The instructions were put under the ISA 2.07 category
of supported instructions in this patch.

The VEX commit for this fix is r3137.

The bugzilla for this issue is 346324.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15106
2015-04-17 23:43:36 +00:00
Zhi-Gang Liu
2e186aae13 To address memcheck/tests/leak-segv-jmp test failure for TILEGX
By: Zhi-Gang Liu       zhg.liu@gmail.com


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15097
2015-04-15 03:26:38 +00:00
Philippe Waroquiers
8707b88cbb Update expected result for leak-segv-jmp, following TileGX addition of
a few lines in leak-segv-jmp.c


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15081
2015-04-10 19:08:17 +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
Julian Seward
2eca28d9d3 Memcheck: add support for recently added IROps:
Iop_F64toF16 
Iop_F32toF16 
Iop_F16toF64 
Iop_F16toF32 



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15070
2015-04-06 14:52:28 +00:00
Julian Seward
149f6c980d Un-break the build following vex r3110. Thanks to PetarJ for the fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15052
2015-03-30 19:14:35 +00:00
Florian Krohm
f39011b8b6 Add STATIC_ASSERT and use it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15047
2015-03-28 18:36:01 +00:00
Philippe Waroquiers
275c1897dc Extensible main thread stack is tricky :(.
Revision 14976 causes a regression : stacktrace produced when the
stack has not yet been extended to cover SP will only contain one
element, as the stack limits are considered to be the limits of
the resvn segment.

This patch fixes that, by taking Resvn/SmUpper segment into
account to properly compute the limits.
It also contains a new regtest that fails with the trunk
(only one function in the stacktrace)
and succeeds with this patch (the 2 expected functions).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15046
2015-03-28 12:52:23 +00:00
Rhys Kidd
d442b97795 Further fixes for bz#345394 specifically for OS X 10.10
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15038
2015-03-26 10:14:25 +00:00
Florian Krohm
e7674cfdbb Add VG_(am_is_bogus_client_stack_pointer)(Addr).
The function is used in VG_(client_syscall) to avoid extending the stack
when it is clear that the current value of the stack pointer does not
point into a segment that looks like a stack segment.
See the comments in the code there.
As a side effect of this we can now revert r15018 which increased
the stack size of the alternate stack in memcheck/tests/sigaltstack.c.
The reason is that the belief at the time: "alternate stack is too small"
was not correct. What instead happened was that VG_(client_syscall) called
VG_(extend_stack) without need (the syscall was tgkill) and the new stack
pointer happened to be in a file segment. 
In other words: the current stack pointer was still within the alternate
stack, i.e. the alternate stack was (barely) large enough.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15034
2015-03-23 17:13:04 +00:00
Tom Hughes
88e1a7587c Include the platform name in the unhandled system call message
We often get bug reports for an unhandled system call which don't
make it clear what platform is in use, which makes it impossible
to know which system call it is.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15033
2015-03-22 11:01:58 +00:00
Rhys Kidd
4669a61228 Fix memcheck/tests/strchr on OS X
bz#345394
- Support the required index and _platform_strchr alias

Before:

== 589 tests, 239 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 589 tests, 238 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15030
2015-03-21 14:25:02 +00:00
Florian Krohm
8a9117b3d7 Increase the size of the alternate stack. It was too small.
This was found by accident and there is no known way to detect
an overflow of an alternate stack in the general case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15018
2015-03-16 22:03:42 +00:00
Philippe Waroquiers
83fefa7f05 Fix the following errors detected by makefile check
memcheck/tests/Makefile.am:1: error: wrap8.stderr.exp-ppc64 is missing in EXTRA_DIST
memcheck/tests/Makefile.am:1: error: wrap8.stdout.exp-ppc64 is missing in EXTRA_DIST
memcheck/tests/Makefile.am:1: error: wrap8.stdout.exp2 is in EXTRA_DIST but doesn't exist
memcheck/tests/Makefile.am:1: error: wrap8.stderr.exp2 is in EXTRA_DIST but doesn't exist



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15015
2015-03-15 12:22:43 +00:00
Florian Krohm
d2b07b7178 Organise the expected output files for the wrap8 testcase.
There is special behaviout on ppc64 only. Let the filenames
reflect that. At the same time update the ppc specific
output to what it is. The important thing here is that the
stack overflow is detected. Everything else is effectively a
don't care. Should line numbers and such differ in the future
that should be filtered out.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15012
2015-03-14 10:15:23 +00:00
Florian Krohm
74cbfc6f04 Update the ppc64 specific results to what they are.
The difference of the expected results as compared to other
platforms is

- Location 0x........ is 2 bytes inside local var "budget"
- declared at varinfo6.c:3115, in frame #2 of thread 1
+ Address 0x........ is on thread 1's stack
+ in frame #2, created by BZ2_blockSort (varinfo6.c:3107)

Should the stderr output of this testcase in the future 
match the generic output (varinfo6.stderr.exp) then this is
another incarnation of 
https://bugs.kde.org/show_bug.cgi?id=345121


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15011
2015-03-14 09:44:04 +00:00
Florian Krohm
ac9506ad26 Disable testcase because the ptrace system call is not
supported on ppc64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15010
2015-03-14 09:30:36 +00:00
Philippe Waroquiers
826502e89a Implement command line option --valgrind-stacksize=<number>
This allows to decrease memory usage when using many threads,
if no big stacksize is needed by Valgrind.
If needed (e.g. for demangling big c++ symbols), the V stacksize
can be increased.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15004
2015-03-12 20:43:46 +00:00
Florian Krohm
6dce653240 Add support for building with -fsanitize=undefined.
- add configure option --enable-ubsan 
- add __ubsan helpers (by Julian)

This requires gcc 4.9.2 or later. Not all platforms are supported, though.
With this change and VEX r3099 regression tests pass on amd64
with a valgrind compiled with -fsanitize=undefined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14995
2015-03-10 16:13:59 +00:00
Rhys Kidd
a6edce5f4a Fix unhandled syscall: unix:348 (__pthread_chdir) and unhandled syscall: unix:349 (__pthread_fchdir) on OS X
bz#344512
- Support these two undocumented syscalls.
- New regression test case added.

Before:

== 588 tests, 239 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 589 tests, 239 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14987
2015-03-07 08:36:20 +00:00
Rhys Kidd
cfa6844024 Tweak test case for bz#344560 from r14985, now includes line numbers
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14986
2015-03-07 06:11:08 +00:00