]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoAvoid compiler warnings on s390x.
Florian Krohm [Wed, 17 Dec 2014 11:35:10 +0000 (11:35 +0000)] 
Avoid compiler warnings on s390x.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14817

11 years agoComment change. Function vg_panic does not exist.
Florian Krohm [Wed, 17 Dec 2014 11:01:40 +0000 (11:01 +0000)] 
Comment change. Function vg_panic does not exist.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14816

11 years agoFix 197259 Unsupported arch_prtctl PR_SET_GS option
Philippe Waroquiers [Wed, 17 Dec 2014 00:00:11 +0000 (00:00 +0000)] 
Fix 197259  Unsupported arch_prtctl PR_SET_GS option
(valgrind side).
In summary: we were counting somewhat on the luck for FS,
we now similarly count on luch for GS
See VEX commit log r3043 for more details.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14815

11 years agoFix 197259 Unsupported arch_prtctl PR_SET_GS option
Philippe Waroquiers [Tue, 16 Dec 2014 23:57:51 +0000 (23:57 +0000)] 
Fix 197259  Unsupported arch_prtctl PR_SET_GS option

On amd64, We handle GS similar to FS, i.e. consider it is constant.
Note that FS is not always 0 on linux. It looks rather to be constant
in all threads, and is zero in the main thread.
As values for FS and/or GS differs between platforms (linux or darwin),
FS_CONST and GS_CONST are used.

Note that we cannot easily test that the value of GS or FS is the
expected one, as the value might not be set at the begin of execution
but only set after prctl has been executed.

So, we just hope that effectively GS and FS are constant.
Some trials to set GS to other values that the expected
constant value on linux was causing a SEGV.
So, it looks like this is all effectively protected.

In summary: we were counting somewhat on the luck for FS,
we now similarly count on luch for GS

git-svn-id: svn://svn.valgrind.org/vex/trunk@3043

11 years agoSimplify the VG_(get_filename_linenum) interface by removing
Florian Krohm [Tue, 16 Dec 2014 20:55:58 +0000 (20:55 +0000)] 
Simplify the VG_(get_filename_linenum) interface by removing
the dirname_available parameter. It's redundant. The value
of the returned directory name can be tested instead.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14814

11 years agoAdd a clarifying comment.
Florian Krohm [Tue, 16 Dec 2014 12:04:03 +0000 (12:04 +0000)] 
Add a clarifying comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14813

11 years agoRemove duplicate command line option.
Florian Krohm [Tue, 16 Dec 2014 08:12:02 +0000 (08:12 +0000)] 
Remove duplicate command line option.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14812

11 years agoUpdate tracking the file removal in VEX r3042.
Florian Krohm [Mon, 15 Dec 2014 21:56:00 +0000 (21:56 +0000)] 
Update tracking the file removal in VEX r3042.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14811

11 years agoRemove quote.txt and newline.txt as they are no longer needed.
Florian Krohm [Mon, 15 Dec 2014 21:55:16 +0000 (21:55 +0000)] 
Remove quote.txt and newline.txt as they are no longer needed.
Once upon a time those files were used to construct a
header file vex_svnversion.h but that more hassle than it
was worth and eventually it got nuked.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3042

11 years agoTweak a format specifier. Remove a redundant assert.
Florian Krohm [Mon, 15 Dec 2014 21:07:37 +0000 (21:07 +0000)] 
Tweak a format specifier. Remove a redundant assert.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3041

11 years agoMore constification.
Florian Krohm [Mon, 15 Dec 2014 18:58:07 +0000 (18:58 +0000)] 
More constification.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3040

11 years agoRemove callgrind's percentify and commify functions as well as the
Florian Krohm [Sun, 14 Dec 2014 15:39:57 +0000 (15:39 +0000)] 
Remove callgrind's percentify and commify functions as well as the
assorted buffers that go with them.
Part of fixing BZ #337869.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14810

11 years agoEnhance the "Author" section of the manpage as suggested
Florian Krohm [Sat, 13 Dec 2014 18:55:35 +0000 (18:55 +0000)] 
Enhance the "Author" section of the manpage as suggested
in BZ #226609.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14809

11 years agoFix BZ #116002.
Florian Krohm [Sat, 13 Dec 2014 18:35:00 +0000 (18:35 +0000)] 
Fix BZ #116002.
Left justification of strings in myvprintf_str was mixed up.
Now fixed and %s formats changed accordingly.
In function myvprintf_int64: the local buffer was not large
enough to hold ULONG_MAX in binary notation. Numbers were
truncated at 39 digits.
Testcases added.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14808

11 years agoreach_thread_register cannot be compiled on Mac OS as Mac OS
Philippe Waroquiers [Sat, 13 Dec 2014 16:36:12 +0000 (16:36 +0000)] 
reach_thread_register cannot be compiled on Mac OS as Mac OS
had no pthread barrier.
(the Makefile.am protects this with a if HAVE_PTHREAD_BARRIER)
But the test should then be protected with a prereq that the
executable exists.
(analysis and fix suggestion by rhyskidd, part of fixing 341613)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14807

11 years agoAdd limited support for printing floating point numbers to
Florian Krohm [Fri, 12 Dec 2014 19:32:10 +0000 (19:32 +0000)] 
Add limited support for printing floating point numbers to
VG_(debugLog_vprintf).
Remove function VG_(percentify) and fix up its call sites (part of
fixing BZ #337869.
Allow the width in a format specification to be '*', i.e. the width is
given as an additional function argument.

The limitations for printing floating point numbers are:
(1) %f is the only supported format. Width and precision can be
    specified.
(2) Funny numbers (NaN and such) are not supported.
(3) Floating point numbers need to be benign in the sense that their
    integral part fits into an ULong.
This is good enough for our purposes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806

11 years agoUpdate detection of tool-chain support for MPX insns
Florian Krohm [Fri, 12 Dec 2014 17:44:36 +0000 (17:44 +0000)] 
Update detection of tool-chain support for MPX insns
to better work for older assemblers.
Pertains to BZ #339542.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14805

11 years agoRemove some debugging code that was accidentally checked in
Florian Krohm [Wed, 10 Dec 2014 22:11:33 +0000 (22:11 +0000)] 
Remove some debugging code that was accidentally checked in
in r3038

git-svn-id: svn://svn.valgrind.org/vex/trunk@3039

11 years agoToday this is what happens when we encounter hwcaps we cannot handle:
Florian Krohm [Wed, 10 Dec 2014 16:10:24 +0000 (16:10 +0000)] 
Today this is what happens when we encounter hwcaps we cannot handle:

vex: priv/main_main.c:329 (LibVEX_Translate): Assertion
`are_valid_hwcaps(VexArchAMD64, vta->archinfo_host.hwcaps)' failed.

Running with -d offers this much enlightenment:

--7732:1:main     ... arch = AMD64, hwcaps = INVALID

Not a good base for a bug report...

With this change, the user experience will be smoewhat better, e.g.:

VEX: Support for AVX2 requires AVX capabilities
     Found: amd64-cx16-rdtscp-sse3-avx2
Cannot continue. Good-bye

Specifically, the patch decouples showing hwcaps and deciding their validity.
show_hwcaps_<ARCH> reports the hwcaps it finds. It never returns NULL.
check_hwcaps checks the hwcaps for feasibility and does not return in case
VEX cannot deal with them.
The function are_valid_hwcaps no longer exists.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3038

11 years agoNew function vfatal which should be used for user messages
Florian Krohm [Wed, 10 Dec 2014 16:08:09 +0000 (16:08 +0000)] 
New function vfatal which should be used for user messages
to indicate a situation that can legitimately occur but that
we cannot handle today. The function does not return.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3037

11 years agoUpdate expected output for none/tests/darwin/access_extended.
Julian Seward [Tue, 9 Dec 2014 22:25:47 +0000 (22:25 +0000)] 
Update expected output for none/tests/darwin/access_extended.
Fixes #341615.  (Rhys Kidd, rhyskidd@gmail.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14804

11 years agoFix incorrect implementation of AESKEYGENASSIST in the case where
Julian Seward [Tue, 9 Dec 2014 21:01:28 +0000 (21:01 +0000)] 
Fix incorrect implementation of AESKEYGENASSIST in the case where
the two registers are the same.  Fixes #341698.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3036

11 years agoUpdate x86 decoder as per advise from Julian.
Florian Krohm [Tue, 9 Dec 2014 20:09:42 +0000 (20:09 +0000)] 
Update x86 decoder as per advise from Julian.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3035

11 years agoDetect presence of sse3 instructions on x86.
Florian Krohm [Tue, 9 Dec 2014 20:08:46 +0000 (20:08 +0000)] 
Detect presence of sse3 instructions on x86.
Set VEX_HWCAPS_X86_SSE3 accordingly.
This came about by grepping the source for VEX_HWCAPS_X86_SSE3
and observing that the flag was tested for (in VEX) but not set.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14803

11 years agoAnnounce, that the long displacement facility is noq required for s390x.
Florian Krohm [Mon, 8 Dec 2014 14:03:00 +0000 (14:03 +0000)] 
Announce, that the long displacement facility is noq required for s390x.
Update minimum machine model. See also VEX r3034.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14802

11 years agoThe long displacement facility is now required. There were a
Florian Krohm [Mon, 8 Dec 2014 14:01:33 +0000 (14:01 +0000)] 
The long displacement facility is now required. There were a
few spots in the code where this was assumed implicitly.
Ugly fixes were possible, but requiring this facility is not
unreasonable as it has been around sind 2003. So let's just
do this.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3034

11 years agoExport s390_host_hwcaps in LibVEX_Translate, so we can use it in
Florian Krohm [Mon, 8 Dec 2014 12:42:26 +0000 (12:42 +0000)] 
Export s390_host_hwcaps in LibVEX_Translate, so we can use it in
are_valid_hwcaps.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3033

11 years agoRemove fixed size arrays in the dwarf-3 parser.
Florian Krohm [Sun, 7 Dec 2014 18:58:59 +0000 (18:58 +0000)] 
Remove fixed size arrays in the dwarf-3 parser.
Use proper initialisation functions for the type and variable parser.
Add functions to release the dynamically allocated functions.
No longer maintain content of popped-off stack entries as that is
essentially freed memory and complicates matters unnecessarily.
Part of fixing BZ #337869.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14801

11 years agoEliminate fixed size buffer 'the_CIEs' and allocate it dynamically.
Florian Krohm [Sat, 6 Dec 2014 21:58:50 +0000 (21:58 +0000)] 
Eliminate fixed size buffer 'the_CIEs' and allocate it dynamically.
Part of fixing BZ #337869.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14800

11 years agoAdd a few more asserts. Fix a function prototype.
Florian Krohm [Sat, 6 Dec 2014 20:24:08 +0000 (20:24 +0000)] 
Add a few more asserts. Fix a function prototype.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3032

11 years agoDFP insns should cause an emulation failure if the host cannot
Florian Krohm [Sat, 6 Dec 2014 16:34:48 +0000 (16:34 +0000)] 
DFP insns should cause an emulation failure if the host cannot
execute them. Previously, they caused a failing assertion
which was incorrect.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3031

11 years agoEncountering a PFPO insn in a client program while running on a host
Florian Krohm [Fri, 5 Dec 2014 18:55:39 +0000 (18:55 +0000)] 
Encountering a PFPO insn in a client program while running on a host
that does not have that insn now causes an emulation error.
Previously, it caused a failing assertion which was incorrect.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3030

11 years agoUpdate test result following VEX r3029.
Florian Krohm [Fri, 5 Dec 2014 18:29:38 +0000 (18:29 +0000)] 
Update test result following VEX r3029.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14799

11 years agoFix some verbiage.
Florian Krohm [Fri, 5 Dec 2014 18:28:29 +0000 (18:28 +0000)] 
Fix some verbiage.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3029

11 years agoAdd -Wformat -Wformat-security to the list of compile flags.
Florian Krohm [Wed, 3 Dec 2014 22:53:00 +0000 (22:53 +0000)] 
Add -Wformat -Wformat-security to the list of compile flags.
This was not as straight forward as expected. Specifically, adding the
new flag to CFLAGS in configure.ac did not work and was causing
compiler warnings. For instance, compiling memcheck/tests/execve2.c will
generate a -Wnonnull warning even though the testcase is explicitly
compiled with -Wno-nonnull. The reason is that (a) -Wformat is implied by
-Wnonnull and (b) the list of compiler flags gets assembled in the wrong
order. The culprit appears to be that we modify CFLAGS in configure.ac and
that really is not the right place. Conceptually, configure should determine
tool-chain capabilities and not assemble compiler flags. That should be done
in Makefiles. This patch entangles all this.

So, whatever was added to CFLAGS in configure.ac has now been moved to
Makefile.all.am and Makefile.tool-tests.am. Those are:
-Wno-long-long
-Wwrite-strings
-Wcast-qual
-fno-stack-protector
Note, that this change allows us to simplify Makefile.tool-tests.am which
in the past was disabling some of those flags (e.g. by adding -Wno-cast-qual
again).
In case of the clang compiler, extra command line options are needed. I've
moved those into a separate 'if COMPILER_IS_CLANG' section and not merge
them into baseline flags.

Related to BZ 334727.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14798

11 years agoAdd script. Comes in handy when messing with the build system
Florian Krohm [Wed, 3 Dec 2014 22:48:29 +0000 (22:48 +0000)] 
Add script. Comes in handy when messing with the build system
to make sure no compiler flags get lost (as they did at some
point in the past).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14797

11 years agoFix a few VG_(message) invocations. The function does not add a
Florian Krohm [Sat, 29 Nov 2014 17:50:10 +0000 (17:50 +0000)] 
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

11 years agoFix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
Florian Krohm [Sat, 29 Nov 2014 14:41:32 +0000 (14:41 +0000)] 
Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.
r14794 is related as well.
Also: remove -Wno-format-zero-length from compile options.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795

11 years agoFix up the error processing in VG_(expand_file_name). E.g. giving
Florian Krohm [Sat, 29 Nov 2014 13:31:18 +0000 (13:31 +0000)] 
Fix up the error processing in VG_(expand_file_name). E.g. giving
--log-file=  on the command line results in the following error:

valgrind: --log-file: filename is emptyBad option: --log-file=
...

Relatedly, fix the 1st argument to VG_(expand_file_name) in coredump-elf.c.
This should not contain additional verbiage as it is assumed to be an option
name which us used to construct an error message containing
option_name=file_name

As an aside, this logic in coredump-elf.c seems odd:
If VG_(clo_log_fname_expanded) is not NULL, then it has already been
expanded in main_process_cmd_line_options. Expanding it again would only
make a difference, if the original logfile name contained an environment
variable whose value contained %q{whatever} thereby referring to a yet
another environment variable. That seems strange.
But I'm not touching it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14794

11 years agoAdd an early-clobber constraint. Otherwise, it will segfault when compiled
Florian Krohm [Fri, 28 Nov 2014 12:42:39 +0000 (12:42 +0000)] 
Add an early-clobber constraint. Otherwise, it will segfault when compiled
with gcc 4.9.2

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14793

11 years agomips64: add test cases for Cavium BBIT032 and BBIT132
Petar Jovanovic [Wed, 26 Nov 2014 23:50:31 +0000 (23:50 +0000)] 
mips64: add test cases for Cavium BBIT032 and BBIT132

This is a follow up to VEX r3028. This change adds two test cases
for Cavium instructions BBIT032 and BBIT132.

Issue tracked in BZ #339288.

Patch by Maran Pakkirisamy.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14792

11 years agomips64: add support for Cavium BBIT032 and BBIT132
Petar Jovanovic [Wed, 26 Nov 2014 23:47:08 +0000 (23:47 +0000)] 
mips64: add support for Cavium BBIT032 and BBIT132

This patch adds support for two Cavium specific instructions:
- BBIT032 (Branch on Bit Clear Plus 32), and
- BBIT132 (Branch on Bit Set Plus 32).

Missing support reported in BZ #339288.

Patch by Maran Pakkirisamy.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3028

11 years agoBug 341238. Recognize GCC5/DWARFv5 DW_LANG constants Go, C11, C++11, C++14.
Mark Wielaard [Wed, 26 Nov 2014 15:43:14 +0000 (15:43 +0000)] 
Bug 341238. Recognize GCC5/DWARFv5 DW_LANG constants Go, C11, C++11, C++14.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14791

11 years agodrd: Add a consistency check
Bart Van Assche [Wed, 26 Nov 2014 12:47:19 +0000 (12:47 +0000)] 
drd: Add a consistency check

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14790

11 years agoAdd a file tracking the 3.10.x merge status.
Julian Seward [Tue, 25 Nov 2014 23:19:24 +0000 (23:19 +0000)] 
Add a file tracking the 3.10.x merge status.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14789

11 years agoUpdate.
Julian Seward [Tue, 25 Nov 2014 23:18:54 +0000 (23:18 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14788

11 years agoImplement FRINTI d_d, s_s.
Julian Seward [Tue, 25 Nov 2014 17:42:52 +0000 (17:42 +0000)] 
Implement FRINTI d_d, s_s.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3026

11 years agoAdd test cases for RORV x_x_x, w_w_w.
Julian Seward [Tue, 25 Nov 2014 17:27:50 +0000 (17:27 +0000)] 
Add test cases for RORV x_x_x, w_w_w.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14784

11 years agoImplement RORV x_x_x, w_w_w
Julian Seward [Tue, 25 Nov 2014 17:27:32 +0000 (17:27 +0000)] 
Implement RORV x_x_x, w_w_w

git-svn-id: svn://svn.valgrind.org/vex/trunk@3025

11 years agoAdd test cases for CLS x_x, w_w.
Julian Seward [Tue, 25 Nov 2014 15:51:31 +0000 (15:51 +0000)] 
Add test cases for CLS x_x, w_w.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14783

11 years agoImplement CLS x_x, w_w
Julian Seward [Tue, 25 Nov 2014 15:51:07 +0000 (15:51 +0000)] 
Implement CLS x_x, w_w

git-svn-id: svn://svn.valgrind.org/vex/trunk@3024

11 years agoarm64: implement "BRK #imm16".
Julian Seward [Tue, 25 Nov 2014 12:17:53 +0000 (12:17 +0000)] 
arm64: implement "BRK #imm16".

git-svn-id: svn://svn.valgrind.org/vex/trunk@3023

11 years agoBack out r14781, which was unintended.
Julian Seward [Tue, 25 Nov 2014 11:43:54 +0000 (11:43 +0000)] 
Back out r14781, which was unintended.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14782

11 years agoarm64: implement "BRK #imm16".
Julian Seward [Tue, 25 Nov 2014 11:37:14 +0000 (11:37 +0000)] 
arm64: implement "BRK #imm16".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14781

11 years agoChange the testcase to not depend on the type of 'this' in the output.
Florian Krohm [Mon, 24 Nov 2014 22:30:49 +0000 (22:30 +0000)] 
Change the testcase to not depend on the type of 'this' in the output.
GCC 4.9.2 and GCC 4.8.x have different opinions about that variable's type.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14780

11 years agoChange pub_tool_addrinfo.h AddrInfo and VG_(describe_addr) so as to describe
Philippe Waroquiers [Mon, 24 Nov 2014 17:46:41 +0000 (17:46 +0000)] 
Change pub_tool_addrinfo.h AddrInfo and VG_(describe_addr) so as to describe
anonymous or file mmap-ed segments and shared memory segments.

* pub_tool_addrinfo.h:
    new AddrTag Addr_SegmentKind  // Client segment (mapped memory)
    new struct SegmentKind in AddrInfo

* m_addrinfo.c:
   If address is still undescribed, try to describe by findinf a client segment.

* update various tests

* mc_errors.c:
  add a call to VG_(clear_addrinfo) in MC_(pp_describe_addr)
  as the memory allocated in the local AddrInfo has to be cleared once
  info is printed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14779

11 years agoAs the BEAM checker correctly points out, the conditions on lines 430 and 485
Florian Krohm [Mon, 24 Nov 2014 17:30:01 +0000 (17:30 +0000)] 
As the BEAM checker correctly points out, the conditions on lines 430 and 485
are always false. I'm keeping them as assertions for documentation purposes.
The proof is left as exercise to the reader.
Hint: use conditions on lines 307 and 311 and the fact that old_len and
old_arg are both unsigned entities.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14778

11 years agoEnable sys_flock on arm64-linux.
Julian Seward [Mon, 24 Nov 2014 16:19:48 +0000 (16:19 +0000)] 
Enable sys_flock on arm64-linux.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14777

11 years agoAnnounce fix for BZ #269360.
Florian Krohm [Sat, 22 Nov 2014 20:15:11 +0000 (20:15 +0000)] 
Announce fix for BZ #269360.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14744

11 years agoAdd function s390_isel_amode_b12_b20 to compile an expression into an
Florian Krohm [Sat, 22 Nov 2014 20:10:21 +0000 (20:10 +0000)] 
Add function s390_isel_amode_b12_b20 to compile an expression into an
amode that is either S390_AMODE_B12 or S390_AMODE_B20. This is needed
for compare-and-swap insns. As we're currently not generating amodes
using an index register, there was never a problem.
This change future-proofs the code.
Also add a few more asserts for amodes in the s390_insns supporting
translation chaining.
Fixes BZ #269360.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3000

11 years agoUpdate.
Julian Seward [Sat, 22 Nov 2014 11:57:18 +0000 (11:57 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14743

11 years agoRemove dead code.
Florian Krohm [Fri, 21 Nov 2014 21:40:45 +0000 (21:40 +0000)] 
Remove dead code.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2999

11 years agoThis change was triggered by BZ #247974 which suggested to include
Florian Krohm [Thu, 20 Nov 2014 15:08:56 +0000 (15:08 +0000)] 
This change was triggered by BZ #247974 which suggested to include
VEX/test_main.* in the tarball. We don't want to do that because those
files are really just scaffolding for developers to play with and not
meant for general consumption (and are also bitrotting ATM). Therefore,
this patch moves them to the "useful" subdirectory and adds a crude
Makefile there to build the executable.
Makefile-gcc updated accordingly.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2998

11 years agoarm64: enable FCVT{A,N}S X,S.
Julian Seward [Thu, 20 Nov 2014 11:30:41 +0000 (11:30 +0000)] 
arm64: enable FCVT{A,N}S X,S.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2997

11 years agoisBogusAtom: handle missing case Ico_F32.
Julian Seward [Thu, 20 Nov 2014 10:15:17 +0000 (10:15 +0000)] 
isBogusAtom: handle missing case Ico_F32.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14740

11 years agoImplement {S,U}CVTF (scalar, fixedpt).
Julian Seward [Thu, 20 Nov 2014 10:14:06 +0000 (10:14 +0000)] 
Implement {S,U}CVTF (scalar, fixedpt).

git-svn-id: svn://svn.valgrind.org/vex/trunk@2996

11 years agoUpdate mysteriously out-of-date fp_and_simd.stdout.exp.
Julian Seward [Thu, 20 Nov 2014 10:11:42 +0000 (10:11 +0000)] 
Update mysteriously out-of-date fp_and_simd.stdout.exp.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14739

11 years agoAdd test cases for {S,U}CVTF fixedpt-to-fp.
Julian Seward [Thu, 20 Nov 2014 10:11:00 +0000 (10:11 +0000)] 
Add test cases for {S,U}CVTF fixedpt-to-fp.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14738

11 years agoFix typos in a comment
Philippe Waroquiers [Wed, 19 Nov 2014 22:21:12 +0000 (22:21 +0000)] 
Fix typos in a comment

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14737

11 years agoAdd test cases for VFPv4 VFNMA, VFNMS added in vex r2995.
Julian Seward [Wed, 19 Nov 2014 16:09:08 +0000 (16:09 +0000)] 
Add test cases for VFPv4 VFNMA, VFNMS added in vex r2995.
Pertains to #340807.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14736

11 years agoImplement VFPv4 VFNMA, VFNMS d_d and s_s variants (not that
Julian Seward [Wed, 19 Nov 2014 16:07:28 +0000 (16:07 +0000)] 
Implement VFPv4 VFNMA, VFNMS d_d and s_s variants (not that
there are any other variants).  Fixes #340807.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2995

11 years agoAdd a lot more intercepts. Very crude. I am sure this is merely
Julian Seward [Wed, 19 Nov 2014 09:15:56 +0000 (09:15 +0000)] 
Add a lot more intercepts.  Very crude.  I am sure this is merely
hiding a whole bunch of problems in the Darwin syscall wrappers.  In
particular it suppresses all invalid address errors arising from
AppleIntelHD4000GraphicsGLDriver.dylib, as it appears that maps
hardware into user space and aspacemgr doesn't know anything about it.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14735

11 years agoOSX 10.10: intercept memchr in libsystem_platform.dylib.
Julian Seward [Wed, 19 Nov 2014 09:14:07 +0000 (09:14 +0000)] 
OSX 10.10: intercept memchr in libsystem_platform.dylib.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14734

11 years agoFix up the wrapper for getdirentries64 a bit so as to avoid false positives
Julian Seward [Wed, 19 Nov 2014 09:13:12 +0000 (09:13 +0000)] 
Fix up the wrapper for getdirentries64 a bit so as to avoid false positives
from it.  Unfortunately I can't tell why this was happening.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14733

11 years agoUse unsigned long int instead of unsigned long long int on LP64
Florian Krohm [Wed, 19 Nov 2014 07:41:19 +0000 (07:41 +0000)] 
Use unsigned long int instead of unsigned long long int on LP64
platforms. This avoids warnings when compiling with -pedantic.
Fixes BZ #211926.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14732

11 years agoAnnounce fix of BZ #155125. As of r14685 I think.
Florian Krohm [Tue, 18 Nov 2014 10:03:14 +0000 (10:03 +0000)] 
Announce fix of BZ #155125. As of r14685 I think.
Add testcase.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14731

11 years agoFix stupid bug introduced in r2993, which causes many simple scalar
Julian Seward [Mon, 17 Nov 2014 14:16:56 +0000 (14:16 +0000)] 
Fix stupid bug introduced in r2993, which causes many simple scalar
floating point instructions to ignore their operands and return zero.  Sigh.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2994

11 years agoEnable test cases for r2993, viz:
Julian Seward [Mon, 17 Nov 2014 11:22:51 +0000 (11:22 +0000)] 
Enable test cases for r2993, viz:
FADDP s_2s, d_2d
FADDP 2d_2d_2d, 4s_4s_4s, 2s_2s_2s
FMAX d_d, s_s
FMIN d_d, s_s
FMAXNM d_d, s_s (not really correct)
FMINNM d_d, s_s (not really correct)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14730

11 years agoImplement arm64 insns:
Julian Seward [Mon, 17 Nov 2014 11:21:21 +0000 (11:21 +0000)] 
Implement arm64 insns:
ADDP s_2s, d_2d
FADDP 2d_2d_2d, 4s_4s_4s, 2s_2s_2s
FMAX d_d, s_s
FMIN d_d, s_s
FMAXNM d_d, s_s (not really correct)
FMINNM d_d, s_s (not really correct)
FCVT{A,N}S W,D

git-svn-id: svn://svn.valgrind.org/vex/trunk@2993

11 years agoComment only changes.
Florian Krohm [Sun, 16 Nov 2014 09:56:42 +0000 (09:56 +0000)] 
Comment only changes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14729

11 years agoImplement "fcvtpu w, s". n-i-bz.
Julian Seward [Sat, 15 Nov 2014 22:24:18 +0000 (22:24 +0000)] 
Implement "fcvtpu w, s".  n-i-bz.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2992

11 years agoAdd test cases for all remaining AArch64 ARMv8 SIMD and FP instructions.
Julian Seward [Sat, 15 Nov 2014 22:15:47 +0000 (22:15 +0000)] 
Add test cases for all remaining AArch64 ARMv8 SIMD and FP instructions.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14728

11 years agoImplement fcsel d_d, s_s. Fixes #340856.
Julian Seward [Sat, 15 Nov 2014 16:07:14 +0000 (16:07 +0000)] 
Implement fcsel d_d, s_s.  Fixes #340856.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2991

11 years agoAdd even more suppressions for Yosemite.
Julian Seward [Sat, 15 Nov 2014 10:30:23 +0000 (10:30 +0000)] 
Add even more suppressions for Yosemite.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14726

11 years ago* add a logging mechanism to show repeated messages at exponentially
Julian Seward [Sat, 15 Nov 2014 10:29:57 +0000 (10:29 +0000)] 
* add a logging mechanism to show repeated messages at exponentially
  declining rates, so as to reduce the amount of junk spewed out by
  the various support functions for the MacOS syscall wrappers.

* add a couple more cases to the resync filter for Yosemite.  This
  is working pretty well now.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14725

11 years agoPass buffer size to VG_(elapsed_wallclock_time) so the function
Florian Krohm [Fri, 14 Nov 2014 22:34:40 +0000 (22:34 +0000)] 
Pass buffer size to  VG_(elapsed_wallclock_time) so the function
can check it's large enough.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14724

11 years agoMinor non-functional cleanups.
Florian Krohm [Fri, 14 Nov 2014 19:25:08 +0000 (19:25 +0000)] 
Minor non-functional cleanups.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14723

11 years agom_compiler.c was added to noinst_HEADERS but should of course
Florian Krohm [Fri, 14 Nov 2014 14:47:12 +0000 (14:47 +0000)] 
m_compiler.c was added to noinst_HEADERS but should of course
be added to COREGRIND_SOURCES_COMMON. Now fixed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14722

11 years agoImplement missing heap-intercept function "dh_malloc_usable_size".
Julian Seward [Fri, 14 Nov 2014 10:13:49 +0000 (10:13 +0000)] 
Implement missing heap-intercept function "dh_malloc_usable_size".

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14721

11 years agoAudit two buffer sizes.
Florian Krohm [Thu, 13 Nov 2014 22:45:58 +0000 (22:45 +0000)] 
Audit two buffer sizes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14720

11 years agoMerge revisions 14445 and 14446 from the BUF_REMOVAL branch to trunk.
Florian Krohm [Thu, 13 Nov 2014 21:41:28 +0000 (21:41 +0000)] 
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

11 years ago* add syscall wrappers for some new OSX 10.10 specific calls
Julian Seward [Thu, 13 Nov 2014 16:30:09 +0000 (16:30 +0000)] 
* add syscall wrappers for some new OSX 10.10 specific calls
  necp_match_policy
    sysctlbyname
      getattrlistbulk (kludged)

* add initial entries for the resync-filter on OSX 10.10.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14718

11 years agoUpdate suppressions for OSX 10.10.
Julian Seward [Thu, 13 Nov 2014 16:28:24 +0000 (16:28 +0000)] 
Update suppressions for OSX 10.10.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14717

11 years agoAdd detection of old ppc32 magic instructions from bug 278808.
Mark Wielaard [Thu, 13 Nov 2014 14:29:03 +0000 (14:29 +0000)] 
Add detection of old ppc32 magic instructions from bug 278808.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2990

11 years agoBug 340922 arm64: unhandled getgroups/setgroups syscalls.
Mark Wielaard [Thu, 13 Nov 2014 13:03:25 +0000 (13:03 +0000)] 
Bug 340922 arm64: unhandled getgroups/setgroups syscalls.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14716

11 years agoFollow up 14714: use a real malloc cost centre instead of an empty string
Philippe Waroquiers [Wed, 12 Nov 2014 21:10:37 +0000 (21:10 +0000)] 
Follow up 14714: use a real malloc cost centre instead of an empty string

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14715

11 years agoImplement Option --error-markers=<begin>,<end>
Philippe Waroquiers [Wed, 12 Nov 2014 19:43:29 +0000 (19:43 +0000)] 
Implement Option --error-markers=<begin>,<end>

* This option can be used to mark the begin/end of errors in textual
output mode, to facilitate searching/extracting errors in output files
mixing valgrind errors with program output.

* Use the new option in various existing regtests to test the various
  possible usage.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14714

11 years agoMerge r14340,14346-14348,14352,14354-14355 from the BUF_REMOVAL branch to
Florian Krohm [Tue, 11 Nov 2014 20:46:34 +0000 (20:46 +0000)] 
Merge r14340,14346-14348,14352,14354-14355 from the BUF_REMOVAL branch to
trunk.
Convert callgrind to use VG_(fprintf).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14713

11 years agoAdd a nasty temporary kludge to CPUID that allows 64-bit MacOSX 10.10
Julian Seward [Tue, 11 Nov 2014 12:49:21 +0000 (12:49 +0000)] 
Add a nasty temporary kludge to CPUID that allows 64-bit MacOSX 10.10
(Yosemite) to run, until such time as XSAVE and XRSTOR are implemented.
Detailed in the comments.  All other targets should be unaffected.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2989

11 years agoInterceot _platform_strncmp also on OSX 10.10.
Julian Seward [Tue, 11 Nov 2014 12:46:58 +0000 (12:46 +0000)] 
Interceot _platform_strncmp also on OSX 10.10.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14712