]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoUpdate bug status.
Julian Seward [Sun, 29 Sep 2013 09:59:50 +0000 (09:59 +0000)] 
Update bug status.

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

11 years agoensure nightly regression tests can (optionally) run perf tests
Philippe Waroquiers [Fri, 27 Sep 2013 18:10:29 +0000 (18:10 +0000)] 
ensure nightly regression tests can (optionally) run perf tests

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

11 years agoAdd a test program of sorts, for XBEGIN and XTEST.
Julian Seward [Fri, 27 Sep 2013 15:22:50 +0000 (15:22 +0000)] 
Add a test program of sorts, for XBEGIN and XTEST.

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

11 years agoAnnotate some bug reports with comments about priority.
Julian Seward [Thu, 26 Sep 2013 08:18:47 +0000 (08:18 +0000)] 
Annotate some bug reports with comments about priority.

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

11 years agomips32: Add two syscall wrappers:
Dejan Jevtic [Tue, 24 Sep 2013 14:21:50 +0000 (14:21 +0000)] 
mips32: Add two syscall wrappers:
4345 __NR_process_vm_readv
4346 __NR_process_vm_writev
Code style, no functional changes.

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

11 years agomips32: Change the input values for round test.
Dejan Jevtic [Tue, 24 Sep 2013 07:00:46 +0000 (07:00 +0000)] 
mips32: Change the input values for round test.
Change the input values so that the binary value
is representing exactly the same float value.

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

11 years agoIn an attempt to fix the accounting for dynamic memory allocation
Florian Krohm [Fri, 20 Sep 2013 21:34:40 +0000 (21:34 +0000)] 
In an attempt to fix the accounting for dynamic memory allocation
it turned out that coregrind freely allocates memory on the tool
arena (which it should not, conceptually) and tools rely on coregrind
doing so (by VG_(free)'ing memory allocated by coregrind).
Entangling this mess is risky and provides little benefit except
architectural cleanliness.
Thinking more about it... It isn't really all that interesting how
much memory is allocated by tool code in and by itself.  What is
interesting is the total memory impact a tool has, e.g. as compared
to running "none".
So in this patch the number of memory arenas is consolidated by
subsuming VG_AR_TOOL/ERRORS/EXECCTXT into VG_AR_CORE.
VG_(malloc) and friends have been modified to operate on VG_AR_CORE.

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

11 years agoAdd test-cases for Power ISA 2.06 insns: divdo/divdo. and divduo/divduo.
Carl Love [Fri, 20 Sep 2013 17:32:06 +0000 (17:32 +0000)] 
Add test-cases for Power ISA 2.06 insns: divdo/divdo. and divduo/divduo.

The patch was supplied by Anmol P. Paralkar.

Valgrind Bugzilla 325110

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

11 years agoAdd the install directory that gets created by the nightly script.
Florian Krohm [Fri, 20 Sep 2013 12:12:52 +0000 (12:12 +0000)] 
Add the install directory that gets created by the nightly script.

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

11 years agoMore bug triage.
Julian Seward [Thu, 19 Sep 2013 23:04:03 +0000 (23:04 +0000)] 
More bug triage.

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

11 years agoFix two issues found by check_headers_and_includes.
Florian Krohm [Thu, 19 Sep 2013 14:55:27 +0000 (14:55 +0000)] 
Fix two issues found by check_headers_and_includes.

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

11 years agoAdd a script 'check_headers_and_includes' to check that #include directives
Florian Krohm [Thu, 19 Sep 2013 14:55:09 +0000 (14:55 +0000)] 
Add a script 'check_headers_and_includes' to check that #include directives
are not against the grain.
Wrap this script together with 'check_makefile_consistency' into
'post_regtest_checks' and invoke that from the toplevel Makefile. So we can
easily add new checkers in the future.

Add a new make target 'post-regtest-checks' to just run those checks
and nothing else.

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

11 years agomips32/64: add extra test cases in vbit-test for mips32/64.
Dejan Jevtic [Thu, 19 Sep 2013 13:36:12 +0000 (13:36 +0000)] 
mips32/64: add extra test cases in vbit-test for mips32/64.

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

11 years agoDouble the size of the (already huge) translation cache on all
Julian Seward [Thu, 19 Sep 2013 10:15:22 +0000 (10:15 +0000)] 
Double the size of the (already huge) translation cache on all
non-phone/tablet targets.  The previous apparently-huge sizing is
evidently not huge enough for recent apps, eg, recent Firefox requires
circa 350k translations to get started and almost fills an 8-sector
cache merely starting up and then idling.

On Android targets, fall back to 6 sectors; space is critical.

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

11 years agoIncrease VG_N_SEGMENTS and VG_N_SEGNAMES by a factor of 6 on all
Julian Seward [Thu, 19 Sep 2013 10:04:59 +0000 (10:04 +0000)] 
Increase VG_N_SEGMENTS and VG_N_SEGNAMES by a factor of 6 on all
non-{phone/tablet} platforms.  Possibly fixes #164485.

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

11 years agoComment-only change.
Julian Seward [Thu, 19 Sep 2013 09:27:05 +0000 (09:27 +0000)] 
Comment-only change.

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

11 years agoRecent libxul.so on ARM has more than 5000 CIEs. Increase N_CIEs,
Julian Seward [Thu, 19 Sep 2013 09:14:56 +0000 (09:14 +0000)] 
Recent libxul.so on ARM has more than 5000 CIEs.  Increase N_CIEs,
therefore.

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

11 years agoMove some now-closed bugs into NEWS.
Julian Seward [Thu, 19 Sep 2013 08:55:36 +0000 (08:55 +0000)] 
Move some now-closed bugs into NEWS.

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

11 years agoOops, commit 13562 said the patch was done by Amodra. It should have
Carl Love [Wed, 18 Sep 2013 17:45:54 +0000 (17:45 +0000)] 
Oops, commit 13562 said the patch was done by Amodra.  It should have
said the patch was from Paralkar Anmol.

This is the fix for Bugzilla 324765.

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

11 years agoThe patch fixes the assembly of the Power dcbtst and dcbt instructions.
Carl Love [Wed, 18 Sep 2013 16:06:46 +0000 (16:06 +0000)] 
The patch fixes the assembly of the Power dcbtst and dcbt instructions.

The assembly of these instructions is not alwasy being done correctly as
described in the following email reply.

  Re: Assembling Power instructions: dcbtst/dcbt.

      From: Peter Bergner <bergner at vnet dot ibm dot com>
      To: Paralkar Anmol-B07584 <B07584 at freescale dot com>
Cc: "amodra at bigpond dot net dot au" <amodra at bigpond dot net dot au>, "binutils at sourceware dot org" <binutils at sourceware dot org>
      Date: Fri, 13 Sep 2013 15:22:35 -0500
      Subject: Re: Assembling Power instructions: dcbtst/dcbt.
      Authentication-results: sourceware.org; auth=none
      References: <DC6D7B34688246489A6578981A5ADEB9302A07 at 039-SN2MPN1-012 dot 039d dot mgd dot msft dot net>

  On Fri, 2013-09-13 at 18:32 +0000, Paralkar Anmol-B07584 wrote:
  > Hello,
  >
  >  Per Power ISA Version 2.07 (May 3, 2013) "4.3.2 Data Cache Instructions",
  >  the assembly language syntax for the dcbtst instruction (pp. 771) is:
  >
  >  dcbtst RA,RB,TH [Category: Server]
  >  dcbtst TH,RA,RB [Category: Embedded]
  >
  >  and it's layout in the object code is:
  >
  >   +------+------+------+------+------------+---+
  >   |  31  |  TH  |  RA  |   RB |  246(0xF6) | / |
  >   |0     |6     |11    |16    |21          |31 |
  >   +------+------+------+------+------------+---+
  >
  >  (Analogously: dcbt pp. 770)
  >
  >  However, GAS (as of version 2.23.52.20130912) decides on the syntax to use based on
  >  processor/architecture dialect (not Power ISA Category), using the Server syntax in
  >  the case of POWER4 and the Embedded syntax for generic PPC or VLE.

  That was a bug fixed here:

      https://sourceware.org/ml/binutils/2012-11/msg00352.html

  >  Consequently (e.g.),
  >
  >  dcbtst 17, 14, 6
  >
  >  in the assembly file gets "misassembled" under -many for a user-space program on Linux:

  When you only specify -many (and not one of -mpower4, -mpower5, etc.),
  the assembler/disassembler will choose a default -m<CPU> value for
  you.  That has changed over time, but is generally one of the newer
  server cpus.  For example, for binutils trunk, the default is now
  -mpower8 and for your 2.23.x binutils, it is -mpower7.
  That should force the assembler and disassembler to assemble
  the instruction using the server operand order you want, but the bug
  above (which is in 2.23) basically resets it to an old cpu, so it
  chooses to use the embedded/old cpu setting.

The patch from Amodra fixes the issue by manually generating the correct
hex value for the instruction rather then leaving it to the assembler to
generate the hex value from the symbolic assembly instruction name.

This is the fix for Bugzilla 324765.

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

11 years agoFix memory leak when reallocating a thread name.
Florian Krohm [Wed, 18 Sep 2013 14:00:10 +0000 (14:00 +0000)] 
Fix memory leak when reallocating a thread name.

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

11 years agomips32/mips64: tests for FCSR.
Dejan Jevtic [Wed, 18 Sep 2013 10:08:23 +0000 (10:08 +0000)] 
mips32/mips64: tests for FCSR.

Change the existing tests to print the value of the FCSR
register after the mips fpu instruction is executed.
Add tests that are testing the value of FCSR register.

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

11 years agoTweak filter_xml_frames. Suppress frames containing neither a
Florian Krohm [Wed, 18 Sep 2013 09:15:23 +0000 (09:15 +0000)] 
Tweak filter_xml_frames. Suppress frames containing neither a
function name nor any source code reference.

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

11 years agomips64: add tests for MIPS64 Octeon Instructions
Petar Jovanovic [Wed, 18 Sep 2013 02:19:45 +0000 (02:19 +0000)] 
mips64: add tests for MIPS64 Octeon Instructions

Follow up to VEX r2765.

Patch by Zahid Anwar.

Bugzilla issue 322150

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

11 years agoFollowup to r13553 which caused some build failures.
Florian Krohm [Tue, 17 Sep 2013 20:15:36 +0000 (20:15 +0000)] 
Followup to r13553 which caused some build failures.
(1) Detect availability of pthread_setname_np. Ignore testcases
    memcheck/tests/threadname[_xml] if not available.
(2) Enable _GNU_SOURCE to avold compiler warnings.
(3) In threadname_xml filter out stackframes referring to system
    libraries. Added tests/filter_xml_frames to do that.
(4) Adjust .exp files as needed
(5) Do not ship stdout.exp for memcheck/tests/threadname[_xml].

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

11 years agoVG_(memset) cannot handle NULL pointers and needs to be guarded.
Florian Krohm [Mon, 16 Sep 2013 21:46:31 +0000 (21:46 +0000)] 
VG_(memset) cannot handle NULL pointers and needs to be guarded.

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

11 years agoInclude pub_core/tool_clreq.h instead of valgrind.h where apropriate.
Florian Krohm [Mon, 16 Sep 2013 20:56:35 +0000 (20:56 +0000)] 
Include pub_core/tool_clreq.h instead of valgrind.h where apropriate.

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

11 years agomips: clean-up in hardware detection
Petar Jovanovic [Mon, 16 Sep 2013 18:16:13 +0000 (18:16 +0000)] 
mips: clean-up in hardware detection

Follow up to VEX r2764.
Add detection of Cavium in /proc/cpuinfo, and test for DSP ASEs only for
platforms with Company ID == MIPS.

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

11 years agoIntercept prctl(PR_SET_NAME, name) and store the thread name so it
Florian Krohm [Mon, 16 Sep 2013 17:08:50 +0000 (17:08 +0000)] 
Intercept prctl(PR_SET_NAME, name) and store the thread name so it
can be used in error messages. That should be helpful when debugging
multithreaded applications.
Patch by Matthias Schwarzott <zzam@gentoo.org> with some minor
modifications. Fixes BZ 322254.

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

11 years agomips32: typo error fix.
Dejan Jevtic [Mon, 16 Sep 2013 10:48:25 +0000 (10:48 +0000)] 
mips32: typo error fix.

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

11 years agomips32/mips64: rename mips32_features to mips_features
Petar Jovanovic [Sun, 15 Sep 2013 22:49:01 +0000 (22:49 +0000)] 
mips32/mips64: rename mips32_features to mips_features

As this file is now detecting mips64/Cavium boards, we are renaming it to
reflect that. The functional change is that mips_features now can detect
Cavium board and allow Cavium-specific tests to be run.

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

11 years agomips: flush the cache in perf/bigcode.c
Petar Jovanovic [Sun, 15 Sep 2013 22:16:38 +0000 (22:16 +0000)] 
mips: flush the cache in perf/bigcode.c

MIPS needs to flush the cache after memcpy in perf/bigcode.c.
Otherwise, the executed code will likely be wrong.

This fixes issues with bigcode test on some MIPS platforms.

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

11 years agoFix coregrind header files such that they can be included without
Florian Krohm [Sun, 15 Sep 2013 13:54:34 +0000 (13:54 +0000)] 
Fix coregrind header files such that they can be included without
having to worry what other header files may have to be included
beforehand.

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

11 years agoFix inclusion of header files in coregrind. No pub_tool_*.h should be
Florian Krohm [Sun, 15 Sep 2013 10:42:26 +0000 (10:42 +0000)] 
Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.

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

11 years agoFix include guard.
Florian Krohm [Sun, 15 Sep 2013 09:56:18 +0000 (09:56 +0000)] 
Fix include guard.

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

11 years agoMove a function and its prototype VG_(malloc_effective_client_redzone_size)
Florian Krohm [Sun, 15 Sep 2013 09:18:03 +0000 (09:18 +0000)] 
Move a function and its prototype VG_(malloc_effective_client_redzone_size)
to a conceptually better place.

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

11 years agoclarify that vg-in-place cannot be used as an outer in outer/inner setup
Philippe Waroquiers [Thu, 12 Sep 2013 21:12:24 +0000 (21:12 +0000)] 
clarify that vg-in-place cannot be used as an outer in outer/inner setup
If you use a vg-in-place outer, then you obtain errors such as:
valgrind: mmap(0x38000000, 3293184) failed in UME with error 22 (Invalid argument).
valgrind: this can be caused by executables with very large text, data or bss segments.

What must be used is the "make install"-ed valgrind

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

11 years agoThe Power ISA 2.07 document includes a correction to the description for the
Carl Love [Thu, 12 Sep 2013 17:38:13 +0000 (17:38 +0000)] 
The Power ISA 2.07 document includes a correction to the description for the
behavior of the xscvspdp instruction, indicating that if the source argument
is a SNaN, it is first changed to a QNaN before being converted from
single-precision to double-precision. This updated information about the
xscvspdp instruction exposed a bug in the VEX implementation for that
instruction and also a bug in the testing for all instructions having
special behavior for single-precision SNaN arguments.

The VEX code fix for this issue is r2760.

This patch fixes the test cases for the ISA 2.07.

Testing bug: In several ppc[64] test cases, an array of special
double-precision floating point values is set up, and then all elements of
that array are copied via assignment to a single-precision array ('float'
type). Assignment from a double to a float works fine for all cases, except for
SNaN values. In the case of a SNaN, the source is changed to a QNaN and then
converted to single-precision. So the end result was that our array of floats
did not have an actual SNaN value, and, therefore, any instructions that had
special behavior for a single-precision SNaN input argument was never being
properly tested. This patch makes some functional changes in the following
testcases:

  none/tests/ppc[32|64]/test_isa_2_06_part2.c
  none/tests/ppc[32|64]/test_isa_2_06_part3.c
  none/tests/ppc[32|64]/test_isa_2_07_part2.c

These changes impacted the associated *.stdout.exp files, so the patch also
updates those files. Additionally, there were several errors in testcase
source comments that misidentified QNaN and SNaN bit patterns which this patch
corrects.

See bugzilla 324816.

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

11 years agoUpdate bug status.
Julian Seward [Thu, 12 Sep 2013 16:02:37 +0000 (16:02 +0000)] 
Update bug status.

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

11 years agoUpdate list of ignored files.
Florian Krohm [Wed, 11 Sep 2013 19:12:02 +0000 (19:12 +0000)] 
Update list of ignored files.

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

11 years agoClarify wording.
Florian Krohm [Wed, 11 Sep 2013 18:43:26 +0000 (18:43 +0000)] 
Clarify wording.

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

11 years agomips64: add extra test cases in vbit-test for mips64.
Dejan Jevtic [Wed, 11 Sep 2013 15:35:33 +0000 (15:35 +0000)] 
mips64: add extra test cases in vbit-test for mips64.

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

11 years agoBugzilla 323437, this is phase 2 in a series of patches adding support for IBM
Carl Love [Tue, 10 Sep 2013 19:01:00 +0000 (19:01 +0000)] 
Bugzilla 323437, this is phase 2 in a series of patches adding support for IBM
Power ISA 2.07. The first bugzilla in the series was: 322294: Add initial
support for IBM Power ISA 2.07

Phase 2 VEX commit 2756 added support for the following new instructions to
VEX/priv/guest_ppc_toIR.c:
 - lq, stq, lqarx, stqcx.
 - mfvsrwz, mtvsrwz
 - fmrgew, fmrgow

This commit adds the corresponding test cases for these instructions.

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

11 years agoFix a bug introduced in the previous revision.
Florian Krohm [Tue, 10 Sep 2013 14:00:45 +0000 (14:00 +0000)] 
Fix a bug introduced in the previous revision.

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

11 years agoThe existing overflow detection in VEX/priv/guest_ppc_toIR.c/set_XER_OV_64()
Carl Love [Fri, 6 Sep 2013 22:29:55 +0000 (22:29 +0000)] 
The existing overflow detection in VEX/priv/guest_ppc_toIR.c/set_XER_OV_64()
under the case PPCG_FLAG_OP_MULLW: does not apply to the mulldo as we need to
detect overflow when performing a Multiply Low Doubleword (not Multiply Low
Word). Hence, we added a new enumeration value PPCG_FLAG_OP_MULLD in
VEX/priv/guest_ppc_defs.h and a corresponding new case under which the
computation for detecting overflow for mulldo/mulldo. is added in
set_XER_OV_64(). The tests have been added to: none/tests/ppc32/jm-insns.c

Vex commit 2754 for the source code fix

This commit adds the test cases.

Bugzilla 324594, submitted by Anmol P. Paralkar

Patch reviewed and tested by Carl Love

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

11 years agoUpdate list of ignored files.
Florian Krohm [Fri, 6 Sep 2013 15:03:36 +0000 (15:03 +0000)] 
Update list of ignored files.

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

11 years agoOops, forgot to add the new files before the commit for r13534.
Carl Love [Thu, 5 Sep 2013 21:22:37 +0000 (21:22 +0000)] 
Oops, forgot to add the new files before the commit for r13534.

Bugzilla 324518

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

11 years agoThe current VEX code is not properly handling a non-zero TH field in the
Carl Love [Thu, 5 Sep 2013 19:50:41 +0000 (19:50 +0000)] 
The current VEX code is not properly handling a non-zero TH field in the
dcbt instruction, which is valid for several forms of data cache block
touch instructions.  The VEX commit 2761 fixed the missing support in
VEX/priv/guest_ppc_toIR.c.  This commit adds tests for the the non-zero
fields to the test cases for 32 and 64-bit modes.

Bugzilla 324518

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

11 years agoThe flag for compiling test none/tests/ppc32/test_isa_2_07_part2.c was
Carl Love [Thu, 5 Sep 2013 17:59:03 +0000 (17:59 +0000)] 
The flag for compiling test none/tests/ppc32/test_isa_2_07_part2.c was
incorrectly set to FLAG_M64 instead of FLAG_M32.  Fixed the flag.  The
issue was reported in Bugzilla 324546.

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

11 years agoFix 324514 gdbserver monitor cmd output behaviour consistency + allow user
Philippe Waroquiers [Wed, 4 Sep 2013 21:42:43 +0000 (21:42 +0000)] 
Fix 324514  gdbserver monitor cmd output behaviour consistency + allow user
            to put a "marker" msg in process log output

* v.info n_errs_found accepts optional msg, added in the output of
   the monitor command.

* use VG_(printf) rather than VG_(gdb_printf) when output of command
  should be redirected according to v.set gdb_output|log_output|mixed_output

* also avoid calling gdb_printf in output sink processing
  to output zero bytes, as gdb_printf expects to have a null terminated
  string, which is not ensured when 0 bytes have to be output.

* some minor reformatting (replace char* xxx by char *xxx).

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

11 years agoAdd a bunch of suppressions for 64-bit OSX 10.8 processes. This is a
Julian Seward [Wed, 4 Sep 2013 07:32:48 +0000 (07:32 +0000)] 
Add a bunch of suppressions for 64-bit OSX 10.8 processes.  This is a
huge kludge in that the right fix is to write proper syscall wrappers
for the new threading syscalls in 10.8, but that hasn't happened yet.

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

11 years agoPRE(workq_ops): handle KI_WQOPS_QUEUE_REQTHREADS without complaining.
Julian Seward [Wed, 4 Sep 2013 07:31:10 +0000 (07:31 +0000)] 
PRE(workq_ops): handle KI_WQOPS_QUEUE_REQTHREADS without complaining.

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

11 years agocheck_uuid_matches: fix infinite loop following rewrite of this
Julian Seward [Wed, 4 Sep 2013 06:17:44 +0000 (06:17 +0000)] 
check_uuid_matches: fix infinite loop following rewrite of this
function during big overhaul of the debuginfo reader earlier this
year.

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

11 years agoReuse (shared) cachegrind source files in callgrind directly.
Mark Wielaard [Tue, 3 Sep 2013 15:22:14 +0000 (15:22 +0000)] 
Reuse (shared) cachegrind source files in callgrind directly.

The callgrind Makefile.am had a common sources list that included
../cachegrind/cg_arch.c. This doesn't play well with automake and
subdir-objects. Especially make distclean was broken because some
.deps files were removed multiple times.

Just include the shared source file directly into the callgrind
source file that needs it (cg_arch.c in sim.c).

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

11 years agoRename cg-arch.c to cg_arch.c so as to be consistent with other
Julian Seward [Tue, 3 Sep 2013 08:39:28 +0000 (08:39 +0000)] 
Rename cg-arch.c to cg_arch.c so as to be consistent with other
filenames, including cg_arch.h :)  No functional change.

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

11 years agomips32/mips64: Add tests for lwl and lwr for mips32 and mips64.
Dejan Jevtic [Mon, 2 Sep 2013 15:35:12 +0000 (15:35 +0000)] 
mips32/mips64: Add tests for lwl and lwr for mips32 and mips64.

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

11 years agoMacOS only: fix somee compiler complaints about casting from pointers
Julian Seward [Mon, 2 Sep 2013 13:36:25 +0000 (13:36 +0000)] 
MacOS only: fix somee compiler complaints about casting from pointers
and integers of a different size.

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

11 years agoFixes and kludges (mostly the latter) needed to run graphical
Julian Seward [Mon, 2 Sep 2013 13:07:16 +0000 (13:07 +0000)] 
Fixes and kludges (mostly the latter) needed to run graphical
apps on   OSX 10.8:

* port_create_vanilla: deal with the fact that ports get looked
  up before they get registered in the allocated_ports list.  I
  think this is  a side effect of ..

* .. various syscalls: add stub (no-op) wrappers

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

11 years agoMake wqthread_hijack work with the OSX 10.8 kernel.
Julian Seward [Mon, 2 Sep 2013 13:02:58 +0000 (13:02 +0000)] 
Make wqthread_hijack work with the OSX 10.8 kernel.

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

11 years agoadd_mapping_callback on Darwin: also produce a ChangedSeg record in
Julian Seward [Mon, 2 Sep 2013 13:02:02 +0000 (13:02 +0000)] 
add_mapping_callback on Darwin: also produce a ChangedSeg record in
the case where V's record of the permissions for a range differs from
that of the kernel's.  The lack of this caused synthetic segfaults
("can't translate here") from m_translate on OSX 10.8 for pretty much
any graphical .

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

11 years agoRename configure.in to configure.ac to make more recent auto*s happy,
Julian Seward [Mon, 2 Sep 2013 12:44:52 +0000 (12:44 +0000)] 
Rename configure.in to configure.ac to make more recent auto*s happy,
and also add the automake option "subdir-objects".  As advisde by
Tromey and Mjw.

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

11 years agos390: Fix Makefile.am. Essentially, revert r13317 which does not seem to
Florian Krohm [Sat, 31 Aug 2013 16:02:15 +0000 (16:02 +0000)] 
s390: Fix Makefile.am. Essentially, revert r13317 which does not seem to
be necessary. The additional DIST_INSN_TESTS variable was causing problems
in check_makefile_consistecy which reported false errors. I suspect this
is because my awk is mawk and not gawk.
Also add dfp_utils.h which was missing in the tarball from 'make dist'.

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

11 years agoFix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count
Philippe Waroquiers [Fri, 30 Aug 2013 15:48:16 +0000 (15:48 +0000)] 
Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count

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

11 years agoAdd missing headers and such so that 'make dist' works again.
Florian Krohm [Thu, 29 Aug 2013 17:59:27 +0000 (17:59 +0000)] 
Add missing headers and such so that 'make dist' works again.

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

11 years agomips64: Add some test cases for mips64 in vbit-test.
Dejan Jevtic [Wed, 28 Aug 2013 10:03:45 +0000 (10:03 +0000)] 
mips64: Add some test cases for mips64 in vbit-test.

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

11 years agoWhen XML mode is selected messages from VALGRIND_PRINTF and friends
Florian Krohm [Tue, 27 Aug 2013 15:17:53 +0000 (15:17 +0000)] 
When XML mode is selected messages from VALGRIND_PRINTF and friends
should go to the XML stream not stderr.  Fixes BZ 322807.

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

11 years agoSupport mmxext (integer sse) subset on i386 (athlon). Bug #323713
Mark Wielaard [Tue, 27 Aug 2013 10:23:23 +0000 (10:23 +0000)] 
Support mmxext (integer sse) subset on i386 (athlon). Bug #323713

Some processors like the AMD Athlon "Classic" support mmxext,
a sse1 subset. This subset is not properly detected by VEX.
The subset uses the same encoding as the sse1 instructions.

The subset is described at:
  http://support.amd.com/us/Embedded_TechDocs/22466.pdf
  https://en.wikipedia.org/wiki/3DNow!#3DNow.21_extensions

Detects mmxext subset from cpuid information (and enables it
when full sse1 is found). Also fixes the prereq of
none/tests/x86/insn_mmxext.vgtest so that it also runs when
full sse1 (and not just the mmxext subset) is found.
It already passed on such configurations. With the VEX patch
(r2745) it also passes with just the mmxext subset.

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

11 years agoTest cases for 128-bit --partial-loads-ok=no|yes on x86 need a prereq on sse.
Mark Wielaard [Tue, 27 Aug 2013 10:16:21 +0000 (10:16 +0000)] 
Test cases for 128-bit --partial-loads-ok=no|yes on x86 need a prereq on sse.

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

11 years agovalgrind.h: Add MinGW64 support
Bart Van Assche [Sun, 25 Aug 2013 06:10:24 +0000 (06:10 +0000)] 
valgrind.h: Add MinGW64 support

From: Makoto Kato <m_kato@ga2.so-net.ne.jp>

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

11 years agoUpdate Subversion ignore lists
Bart Van Assche [Sat, 24 Aug 2013 18:00:27 +0000 (18:00 +0000)] 
Update Subversion ignore lists

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

11 years agodrd: Fix bug #323905
Bart Van Assche [Sat, 24 Aug 2013 17:53:00 +0000 (17:53 +0000)] 
drd: Fix bug #323905

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

11 years agocoregrind/m_debuginfo: Add VG_(DebugInfo_get_bss_avma)() and VG_(DebugInfo_get_bss_si...
Bart Van Assche [Sat, 24 Aug 2013 17:52:26 +0000 (17:52 +0000)] 
coregrind/m_debuginfo: Add VG_(DebugInfo_get_bss_avma)() and VG_(DebugInfo_get_bss_size)()

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

11 years agodrd: Add command-line option --trace-sectsuppr
Bart Van Assche [Sat, 24 Aug 2013 17:51:18 +0000 (17:51 +0000)] 
drd: Add command-line option --trace-sectsuppr

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

11 years agodrd/tests/concurrent_close: Add
Bart Van Assche [Sat, 24 Aug 2013 17:50:38 +0000 (17:50 +0000)] 
drd/tests/concurrent_close: Add

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

11 years agomips32: Fix a problem with gdb invoker.
Dejan Jevtic [Thu, 22 Aug 2013 06:04:08 +0000 (06:04 +0000)] 
mips32: Fix a problem with gdb invoker.

This patch fixes the endian issue with gdb invoker on mips32
big endian. Now we are using pointer to long long and
we don't need to sign extend registers. On mips32 o32 abi
we need to make extra stack space when we are calling
function.

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

11 years agoThe file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link
Carl Love [Wed, 21 Aug 2013 19:47:19 +0000 (19:47 +0000)] 
The file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link
to file tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO.  That was a
commit error as the output for ppc32 and ppc64 are different.  Replaced
the link with the correct real file of expected results.  See bugzilla
81535.

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

11 years agoThe file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link
Carl Love [Wed, 21 Aug 2013 19:46:50 +0000 (19:46 +0000)] 
The file tests/ppc32/power_ISA2_05.stdout.exp_Without_FPPO was a link
to file tests/ppc64/power_ISA2_05.stdout.exp_Without_FPPO.  That was a
commit error as the output for ppc32 and ppc64 are different.  Remove
the file and commit to remove the link.

See bugzilla 81535.

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

11 years agoAccept glibc 2.18 as valid.
Mark Wielaard [Wed, 21 Aug 2013 14:47:52 +0000 (14:47 +0000)] 
Accept glibc 2.18 as valid.

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

11 years agoMinor tidying of the generalised V128/V256 shadow helper returns
Julian Seward [Sun, 18 Aug 2013 10:20:22 +0000 (10:20 +0000)] 
Minor tidying of the generalised V128/V256 shadow helper returns
that landed in r13500.  No functional change.

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

11 years agoMake sure that sh-mem-vec256 is only built on platforms that can
Julian Seward [Sun, 18 Aug 2013 10:00:59 +0000 (10:00 +0000)] 
Make sure that sh-mem-vec256 is only built on platforms that can
assemble the relevant instructions.

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

11 years agoAdd test cases for 256-bit --partial-loads-ok=no|yes, by generalising the
Julian Seward [Fri, 16 Aug 2013 08:34:10 +0000 (08:34 +0000)] 
Add test cases for 256-bit --partial-loads-ok=no|yes, by generalising the
128-bit versions.  (Patrick J. LoPresti, lopresti@gmail.com).  Bug 294285.

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

11 years agoAdd support for direct V256 shadow helper returns -- memcheck side.
Julian Seward [Fri, 16 Aug 2013 08:31:29 +0000 (08:31 +0000)] 
Add support for direct V256 shadow helper returns -- memcheck side.
(Patrick J. LoPresti, lopresti@gmail.com).  Bug 294285.

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

11 years agoAvoid a compiler warning.
Julian Seward [Thu, 15 Aug 2013 21:18:21 +0000 (21:18 +0000)] 
Avoid a compiler warning.

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

11 years agoFollowup to VEX r2742 which eliminates IRExprP__VECRET and IRExprP__BBPTR
Florian Krohm [Thu, 15 Aug 2013 20:55:42 +0000 (20:55 +0000)] 
Followup to VEX r2742 which eliminates IRExprP__VECRET and IRExprP__BBPTR
and adds Iex_VECRET and Iex_BBPTR.

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

11 years agomips32: Delete unnecessary exp files.
Dejan Jevtic [Thu, 15 Aug 2013 13:48:28 +0000 (13:48 +0000)] 
mips32: Delete unnecessary exp files.

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

11 years agomips32/mips64: Fix compiler warnings.
Dejan Jevtic [Thu, 15 Aug 2013 13:37:29 +0000 (13:37 +0000)] 
mips32/mips64: Fix compiler warnings.

Fix some compiler warnings when compiling Valgrind for mips32/mips64.
Clean up exp files for mips32 BE and LE.

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

11 years agokludge to bypass inner valgrind mmap failing due to not observed outer mmap
Philippe Waroquiers [Mon, 12 Aug 2013 22:17:47 +0000 (22:17 +0000)] 
kludge to bypass inner valgrind mmap failing due to not observed outer mmap

Some tests are failing in an "outer/inner" setup with an "out of memory"
situation reported by the inner (e.g. memcheck/tests/err_disable4.vgtest).

Looks like this is because the inner valgrind aspacemgr believes
a segment is free and can be used, but segment is in fact used by the outer.
This can happen as the inner cannot observe the outer mmap, and so
inner aspacemgr can be out of sync with the kernel and the outer.

This kludge bypasses the problem: if the fixed mmap fails in the inner,
the inner retries without the fixed.
This is a kludge as the proper solution would be to have a correct
state of aspacemgr in the inner. This however implies a more in-depth surgery
in the outer/inner setup (to have e.g. the outer informing the inner of
its own mmap or alternatively having the inner asking the outer about the
mmap advisory).

Kludge is preferred (at least now) as this kludge is activated only
for the inner (and for darwin, but that was already like that).

Of course, this kludge does not the state of the inner aspacemgr
matching the outer and kernel state.
So, other problems might be detected e.g. if inner aspacemgr does a check
comparing its status with kernel status.

The patch also ensures the inner reports the memory status of the
outer (using a client request) when an out of memory situation is detected.
This helps understanding what goes wrong.

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

12 years agoInitial ISA 2.07 support for POWER8-tuned libc
Carl Love [Mon, 12 Aug 2013 18:04:22 +0000 (18:04 +0000)] 
Initial ISA 2.07 support for POWER8-tuned libc

The IBM Power ISA 2.07 has been published on power.org, and IBM's new POWER8
processor is under development to implement that ISA. This patch provides
initial runtime and testsuite support for running Valgrind on POWER8 systems
running a soon-to-be released Linux distribution. This Linux distro will
include a POWER8-tuned libc that uses a subset of the new instructions from
ISA 2.07.  Since virtually all applications link with libc, it would be
impossible to run an application under Valgrind on this distro without adding
support for these new instructions to Valgrind, so that's the intent of this
patch. Note that applications built on this distro will *not* employ new POWER8
instructions by default. There are roughly 150 new instructions in the Power
ISA 2.07, including hardware transaction management (HTM). Support for these
new instructions (modulo the subset included in this bug) will be added to
Valgrind in a phased approach, similar to what we did for Power ISA 2.06.

Bugzilla 322294, VEX commit 2740

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

12 years agoAdd test cases for 128-bit shadow loads with
Julian Seward [Mon, 12 Aug 2013 16:10:38 +0000 (16:10 +0000)] 
Add test cases for 128-bit shadow loads with
--partial-loads-ok={yes,no} for x86 targets.  Bug #294285.

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

12 years ago* rename the memcheck/tests/amd64/sh-mem-vec128*stderr.exp* files
Julian Seward [Mon, 12 Aug 2013 11:47:52 +0000 (11:47 +0000)] 
* rename the memcheck/tests/amd64/sh-mem-vec128*stderr.exp* files
  so as to specify an endianness
* add two missing symlinks

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

12 years agoAdd test cases for 128-bit shadow loads with --partial-loads-ok={yes,no}
Julian Seward [Mon, 12 Aug 2013 10:42:49 +0000 (10:42 +0000)] 
Add test cases for 128-bit shadow loads with --partial-loads-ok={yes,no}
in such a way that they can be shared across targets that support 128 bit
loads, as required.  amd64 only right now.  Adds memcheck/tests/common
to hold this stuff.  Bug #294285.

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

12 years agoThe following instructions were introduced in the Power ISA 2.05
Carl Love [Fri, 9 Aug 2013 21:55:45 +0000 (21:55 +0000)] 
The following instructions were introduced in the Power ISA 2.05
(i.e., POWER6) - lfdp - stfdp - lfdpx - stfdpx These instructions were promptly
deprecated (phased out) in ISA 2.06 (i.e., POWER7). Recent updates in binutils
no longer supports these instructions unless the assembler is invoked with
'-mpower6'. When 'make check' is run on valgrind when using such a newer
binutils and running on a ppc64 system newer than POWER6, you get the
following build error:
y
pc64_linux=1 -DVGPV_ppc64_linux_vanilla=1 -DVGA_SEC_ppc32=1 -DVGP_SEC_ppc64_linux=1 -Winline -Wall -Wshadow -g -Winline -Wall -Wshadow -g -I../../../include -m64 -Wno-long-long -Wwrite-strings -fno-stack-protector -Wno-write-strings -MT power_ISA2_05-power_ISA2_05.o -MD -MP -MF .deps/power_ISA2_05-power_ISA2_05.Tpo -c -o power_ISA2_05-power_ISA2_05.o `test -f 'power_ISA2_05.c' || echo './'`power_ISA2_05.c
/tmp/cciGIkGG.s:Assembler messages:
/tmp/cciGIkGG.s:387: Error: operand out of domain (31 is not a multiple of 4)
/tmp/cciGIkGG.s:387: Error: syntax error; found `,', expected `('
/tmp/cciGIkGG.s:387: Error: junk at end of line: `,9'
/tmp/cciGIkGG.s:478: Error: operand out of domain (31 is not a multiple of 4)
/tmp/cciGIkGG.s:478: Error: syntax error; found `,', expected `('
/tmp/cciGIkGG.s:478: Error: junk at end of line: `,9'
make[2]: *** [power_ISA2_05-power_ISA2_05.o] Error 1
make[2]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64' make: *** [check-recursive] Error 1

This patch fixes the problem by adding a configure check to determine if these
phased out instructions are supported by the binutils, and the result of that
configure check is used to decide whether or not to compile in the source for
testing these instructions.

Bugzilla 323116

committed by Carl Love, carll@us.ibm.com

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

12 years agoA comprehensive test case for 128 bit shadow vector loads in the case
Julian Seward [Thu, 8 Aug 2013 10:56:08 +0000 (10:56 +0000)] 
A comprehensive test case for 128 bit shadow vector loads in the case
of partial addressibility, for --shadow-loads-ok=yes and =no.  Not
portable and not hooked up to the test/build system yet.

Pertains to #294285.

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

12 years agoFix # 294285: --partial-loads-ok does not work for 16-byte SSE loads
Julian Seward [Thu, 8 Aug 2013 10:41:46 +0000 (10:41 +0000)] 
Fix # 294285: --partial-loads-ok does not work for 16-byte SSE loads
(core fixes for the memcheck handling of 128 bit loads)
(Patrick J. LoPresti, lopresti@gmail.com)

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

12 years agoFix fallout from r13486: "virtual" is a C++ reserved word and so this
Julian Seward [Thu, 8 Aug 2013 09:05:37 +0000 (09:05 +0000)] 
Fix fallout from r13486: "virtual" is a C++ reserved word and so this
header causes breakage in the C++ tests in the tree.  Rename it.

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

12 years agoAdd support for a bunch of DRM Ioctls. Fixes #207815.
Julian Seward [Thu, 8 Aug 2013 08:09:29 +0000 (08:09 +0000)] 
Add support for a bunch of DRM Ioctls.  Fixes #207815.
(Robert Bragg, bob@o-hand.com)

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

12 years agofix --vgdb-prefix no / character interpreted differently by V gdbsrv and vgdb
Philippe Waroquiers [Tue, 6 Aug 2013 20:45:20 +0000 (20:45 +0000)] 
fix --vgdb-prefix no / character interpreted differently by V gdbsrv and vgdb
When --vgdb-prefix contains no / character,
the Valgrind gdbsrv is interpreting the prefix value as the filename
prefix in the current directory, while vgdb interprets this as
a directory to be opened in the current directory.

Cbange vgdb.c so that it uses the same interpretation as V gdbsrv

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

12 years agoAnnounce fix for BZ 319494.
Florian Krohm [Sat, 3 Aug 2013 20:57:49 +0000 (20:57 +0000)] 
Announce fix for BZ 319494.

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

12 years agoAnnounce fix for BZ 322851 (VEX r2736).
Florian Krohm [Sat, 3 Aug 2013 20:40:05 +0000 (20:40 +0000)] 
Announce fix for BZ 322851 (VEX r2736).

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

12 years agoUpdate configure machinery to detect PTRACE_GETREGS
Philippe Waroquiers [Sat, 3 Aug 2013 20:34:58 +0000 (20:34 +0000)] 
Update configure machinery to detect PTRACE_GETREGS
Using #ifdef PTRACE_GETREGS gives difficulties as in some
platforms (e.g. mips) PTRACE_GETREGS is not defined as a
preprocessor symbols unless linux/ptrace.h is included.
However, including linux/ptrace.h causes compilation error on some
other platforms

=> better detect that PTRACE_GETREGS can be used using the
configure machinery.

This should make vgdb PTRACE_GETREGS working again on
various platforms (x86/amd64/mips/...) as PTRACE_GETREGS
was disabled on all of these following r13471

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