Commit Graph

1099 Commits

Author SHA1 Message Date
Florian Krohm
128fe0d9c4 Fix BZ #338606. Basically, the bug was that it was believed that
the interpreter following the #! has to be an absolute path name.
Not so; relative path works just fine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15429
2015-07-21 21:37:23 +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
059aa611c1 Patch 7 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

A handful of cosmetic changes to the ppc32 and ppc64 makefiles.
Cleans up some whitespace issues, spaces/tabs/etc,
Rearranges some of the contents so they are logically group, and
more consistent between the 32- and 64- bit versions of the same.

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15425
2015-07-20 22:22:42 +00:00
Carl Love
aa85e04a41 Patch 4 and 5 of 7, improve PPC HW capabiltiy checking.
The patch was submitted by Will Schmidt  (will_schmidt@vnet.ibm.com).

Patches 4 and 5 need to be applied together.  Add convenience function
for processing hwcap entries. Add logic to check for HTM support in compiler.

Bugzilla 34979


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15423
2015-07-20 21:25:32 +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
Florian Krohm
68e854afe3 Fix syntax error;
Certain GCC versions do not accept empty clobber lists.
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com). Part of 
fixing BZ #342841.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15409
2015-07-10 17:21:12 +00:00
Christian Borntraeger
b1b0ea7eae Fix from Andreas Arnez for bug 342841 s390x unrecognized instruction fiebra
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15406
2015-07-09 19:21:42 +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
Florian Krohm
90e41758ff Fix two testcase builds so they work when linked against a VEX
that was compiled with -fsanitize=undefined


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15348
2015-06-21 17:54:27 +00:00
Philippe Waroquiers
8c8cd6c9fc 324181 mmap does not handle MAP_32BIT (handle it now, rather than fail it)
324181 was previously closed with a solution to always make
MAP_32BIT fail. This is technically correct/according to the doc,
but is not very usable.
This patch ensures that MAP_32BIT mmap is succesful, as long as
aspacemgr gives a range in the first 2GB
(so, compared to a native run, MAP_32BIT will fail much more quickly
as aspacemgr does not reserve the address space below 2GB on a 64 bits).

Far to be perfect, but this is better than nothing.

Added a regression test that test succesful mmap 32 bits till
the 2GB limit is reached.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15341
2015-06-17 19:57:09 +00:00
Petar Jovanovic
9f3495d2a1 mips64: modify load_indexed_instructions test
A little style improvement for load_indexed_instructions test including
addition of new instruction to be tested - lhx (supported as of VEX r3152).

Related issue - BZ #345987.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15340
2015-06-16 23:49:30 +00:00
Rhys Kidd
54eabad535 Fix r15302 for early gcc compilers on OS X. Cannot declare variable in for loop pre C99. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15310
2015-06-05 09:57:03 +00:00
Rhys Kidd
e6b0c3b899 Add regression test for bz#228343.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15302
2015-06-02 09:21:28 +00:00
Rhys Kidd
9351332329 Signal handler ucontext_t not filled out correctly on OS X
bz#341419

Before:

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

After:

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


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15296
2015-05-28 12:49:00 +00:00
Rhys Kidd
2180224424 Fix regression test added in r15282.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15287
2015-05-25 13:53:55 +00:00
Rhys Kidd
09b00c49c4 Add (presently) failing test case for bz#234814.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15282
2015-05-23 10:20:06 +00:00
Rhys Kidd
bde4ed23f8 Unguard none/tests/x86/cse_fail on OS X, as the test completes. n-i-bz.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15281
2015-05-23 04:18:57 +00:00
Rhys Kidd
86b8c2f235 Re-enable functioning none/tests/amd64/bug137714-amd64 on OS X
n-i-bz

Before:

== 588 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

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


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15280
2015-05-22 16:16:19 +00:00
Rhys Kidd
5c8f850a39 Properly guard none/tests/amd64/*.vgtest on OS X for tests not compiled
n-i-bz

Before:

== 595 tests, 228 stderr failures, 23 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==

After:

== 595 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15279
2015-05-22 15:21:31 +00:00
Mark Wielaard
ff965e1049 Add procfs-non-linux.stderr.exp variants to EXTRA_DIST.
For bz#344936 procfs-non-linux.stderr.exp was renamed and split into
procfs-non-linux.stderr.exp-with-readlinkat and
procfs-non-linux.stderr.exp-without-readlinkat add both to EXTRA_DIST.
Fixes make post-regtest-checks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15271
2015-05-22 09:20:03 +00:00
Florian Krohm
31536d92a1 Remove an incorrect assertion. Need to consider SkShmC segments as well.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15269
2015-05-21 22:41:39 +00:00
Rhys Kidd
cd8086c31a Follow-up bz#344936: Distinguish readlinkat tests for OS X platforms that do or do not support the readlinkat syscall.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15265
2015-05-21 12:56:23 +00:00
Florian Krohm
6f0aedc6af Fix rounding when printing floating point numbers.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15264
2015-05-20 15:14:00 +00:00
Rhys Kidd
2a3a28aecf Fix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
bz#344936

Before:

== 595 tests, 229 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==

After:

== 595 tests, 228 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15260
2015-05-20 13:31:02 +00:00
Florian Krohm
463aa75635 In functions VG_(am_relocate_nooverlap_client) and VG_(am_extend_map_client)
need to allow SkShmC segments, too.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15221
2015-05-12 21:52:08 +00:00
Florian Krohm
ab0a9ba34a Get prototype from system header.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15220
2015-05-12 21:44:48 +00:00
Florian Krohm
c000459632 Fix bug in do_mremap. Also need to allow SkShmC segments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15219
2015-05-12 21:19:25 +00:00
Rhys Kidd
2f3976feb9 Add (presently) failing test case for bz#254164.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15205
2015-05-10 13:34:22 +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
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
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
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
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
0541991ed0 Update the expected output file none/tests/ppc64/jm_int_isa_2_07.stdout.exp
for PPC64 big endian.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15124
2015-04-21 20:06:13 +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
Philippe Waroquiers
3a0bea5c87 For ppc64, use the endianess of the running program, rather
than an harcoded endness.
(this is because ppc64 supports 2 endness, decided at runtime)

For mips, use BE if running on a non mips system, otherwise
use the endness of the running program
(this is because mips supports 2 endness, but decided at compile time).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15113
2015-04-19 15:43:53 +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
Philippe Waroquiers
1c4ae2b0a5 Following fix done in tilegx host in vex: r3130, reenable tilegx as host
in libvexmultiarch_test



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15099
2015-04-15 20:30:52 +00:00
Zhi-Gang Liu
7134b4ef2d Add 'allexec.c' in "none/tests/tilegx"
The symbolic link 'allexec.c' -> ../allecec.c

By: Zhi-Gang Liu
zhg.liu@gmail.com



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15093
2015-04-15 00:56:40 +00:00
Zhi-Gang Liu
039acff030 Remove allecec.c from none/tests/tilegx
Will add a symbolic link for that file next.

Zhi-Gang Liu



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15092
2015-04-15 00:48:34 +00:00
Florian Krohm
fce9b1644b Followup to r14974. That revision oversimplified a condition, part
of which was presumed to be redundant but wasn't. This caused code
to hang due to an infinite signal-delivery loop. Observed and
tracked down by Austin English.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15091
2015-04-14 19:59:21 +00:00
Philippe Waroquiers
e39dd9d073 Add 2 tests none/tests/libvex_test and libvexmultiarch_test
The objective of libvex_test is to verify that the VEX lib
can be used in 'single arch mode' (host == guest).

The objective of libvexmultiarch_test is to verify that the VEX lib
can be used in 'multi arch mode' (freely choose host and guest).
(but not many combinations are working: if wordsize or endianess
differs, then libVEX quickly asserts somewhere).

libvex_test.c is somewhat bizarre, as it uses the architecture
for which we have compiled as the guest, and use a 'foreign' arch
as the host.
That allows to avoid having to define in the test a bunch
of arch specific asm instructions : the test just decode a part
of its own code, and translate it to other archs.

By default, only the combination host == guest is run.
Arguments must be given to run other combinations.
See libvex_test.c for a description on how to specify which combinations
to run.

LibVEX host != guest does not (yet?) work when endianess or word size differs
between host and guest.

Also, currently, TILEGX host is not working properly (unless guest is also
TILEGX), as the evcheck instructions generated differs according to
the offset of the host_EvC_{FAILADDR,COUNTER}.

So, using TILEGX as host is only done when guest is also TILEGX.

Note that it is possible to specify a specific host arch to use.
For example, to force TILEGX to be used, do:
./none/tests/libvexmultiarch_test 1034
(where 1034 is the decimal value corresponding to the enum VexArchTILEGX.
This currently aborts with:
...
------------------------ Assembly ------------------------

EvCheck   (evCheck) ld r11, 8(r50); addli r11, r11, -1; st r11, 8(r50); bgez r11, nofail; jalr *(r50); nofail:

vex: priv/host_tilegx_defs.c:2353 (emit_TILEGXInstr): Assertion `evCheckSzB_TILEGX() == (UChar*)p - (UChar*)p0' failed.
//// failure exit called by libVEX
Whe TILEGX is fixed, we can remove the specific condition that avoids using
TILEGX as host.


Small changes have been done on VEX to allow more combinations
to work:
* host_mips_defs.c : when not compiled on mips,
  a lot of mips specific code is not compiled at all, because
  one of _MIPSEL or _MIPSEB must be defined to have either the
  little endian code or big endian code.
  emit32 function must however work to use mips as host.
  So, for this function, if _MIPSEL is not defined, then
  the big endian code is compiled in by default.
  (the mips endianess should probably be handled like the ppc
   endianess, for which the endianness to use is decided at runtime).

* host_arm64_isel.c : addition of a 'do not emit anything' for
   ABI HINT (avoid an assert e.g. for amd64 guest, arm64 host)

* libvex_guest_amd64.h : when I was still hoping mixing amd64 and x86,
  a first assert was firing up due to size/alignment
  of VexGuestAMD64State when compiled in 32 bits.
  => addition of pad elements to ensure the size and alignment
  of VexGuestAMD64State stays the same when compiled in 32 and
  64 bits (the 64 bits layout is unchanged).


The new tests have been run on x86/amd64/ppc64/s390x.
It is very well possible that the tests will fail on untested archs
(ppc32 or mips* or arm* or tilegx)
(e.g. because the hardcoded hwcaps in libvex_test.c are not ok).
It should be relatively trivial to fix these hwcaps problems.
Some other problems might be less easy to understand and fix 
(e.g. similar to the TILEGX evcheck or mips emit32 problem).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15084
2015-04-11 14:32:25 +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
Philippe Waroquiers
3a7b533846 Add missing stdout.exp file
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15079
2015-04-09 20:07:11 +00:00
Florian Krohm
551540fc1f Consolidate shell script testcases without interpreter.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15076
2015-04-08 12:20:04 +00:00
Julian Seward
5c4ce96cac arm64: remove redundant comment on test cases for FSQRT 2d_2d, 4s_4s, 2s_2s
(should have been included in r15071).  No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15072
2015-04-06 19:41:12 +00:00
Julian Seward
bcbe199f52 arm64: enable test cases for
FSQRT 2d_2d, 4s_4s, 2s_2s


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15071
2015-04-06 19:35:08 +00:00