]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoremove old broken testcase for s390
Christian Borntraeger [Tue, 15 Oct 2013 19:10:11 +0000 (19:10 +0000)] 
remove old broken testcase for s390

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

11 years agoPower 8 support, phase 5
Carl Love [Tue, 15 Oct 2013 18:13:21 +0000 (18:13 +0000)] 
Power 8 support, phase 5

This commit adds the testcases for the following instructions:

  vpmsumb, vpmsumh, vpmsumw, vpmsumd, vpermxor, vcipher, vcipherlast,
  vncipher, vncipherlast, vsbox,
  vclzb, vclzw, vclzh, vclzd,
  vpopcntb, vpopcnth, vpopcntw, vpopcntd,
  vnand, vorc, veqv,
  vshasigmaw, vshasigmad,
  bcdadd, bcdsub

The VEX commit that added the support for the above instructions was
commit 2789.

The patch is for Bugzilla 325628

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

11 years agoA minimal test case for the parsing of XACQUIRE and XRELEASE prefixes.
Julian Seward [Tue, 15 Oct 2013 11:37:16 +0000 (11:37 +0000)] 
A minimal test case for the parsing of XACQUIRE and XRELEASE prefixes.

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

11 years agoDisallow client mmap calls with MAP_32BIT as a flag.
Julian Seward [Mon, 14 Oct 2013 14:50:57 +0000 (14:50 +0000)] 
Disallow client mmap calls with MAP_32BIT as a flag.
Fixes, or at least addresses, #324181.

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

11 years agoUpdate expected output following r13642, which fixes #323432
Julian Seward [Mon, 14 Oct 2013 14:09:35 +0000 (14:09 +0000)] 
Update expected output following r13642, which fixes #323432
  (When calling pthread_cond_destroy or pthread_mutex_destroy
   with initializers as argument Helgrind (incorrectly)
   reports errors.)
This introduces a new race report (but no new race) in
some conditions.  I think this is OK because the race only
occurs in the case where the program is buggy (racey) anyway.

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

11 years agoFix #323432: When calling pthread_cond_destroy or pthread_mutex_destroy
Julian Seward [Mon, 14 Oct 2013 13:51:25 +0000 (13:51 +0000)] 
Fix #323432: When calling pthread_cond_destroy or pthread_mutex_destroy
with initializers as argument Helgrind (incorrectly) reports errors.
(Peter Boström, valgrind@pbos.me)

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

11 years agoFor pthread_cond_destroy, don't report a false it's-still-waited-on
Julian Seward [Mon, 14 Oct 2013 12:13:52 +0000 (12:13 +0000)] 
For pthread_cond_destroy, don't report a false it's-still-waited-on
error if in fact the last wait finished with ETIMEDOUT.
Fixes #324149.  (Peter Boström, valgrind@pbos.me)

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

11 years agoFix "Assertion '!di->soname' failed" on weird files.
Julian Seward [Mon, 14 Oct 2013 12:02:15 +0000 (12:02 +0000)] 
Fix "Assertion '!di->soname' failed" on weird files.
Fixes #320661.  (Jiří Hruška, jirka@fud.cz)

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

11 years agoEnable sys_prlimit64 on arm-linux. Fixes #320131.
Julian Seward [Mon, 14 Oct 2013 11:51:43 +0000 (11:51 +0000)] 
Enable sys_prlimit64 on arm-linux.  Fixes #320131.

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

11 years agoFix compile failure with out-of-tree build of libmpiwrap.c.
Julian Seward [Mon, 14 Oct 2013 11:47:11 +0000 (11:47 +0000)] 
Fix compile failure with out-of-tree build of libmpiwrap.c.
Fixes #318050.  (Frederik Heber, foo@mastercontrolprogramm.de)

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

11 years agoPPC32/64: Allow 16 byte icache and dcache lines.
Julian Seward [Mon, 14 Oct 2013 11:41:46 +0000 (11:41 +0000)] 
PPC32/64: Allow 16 byte icache and dcache lines.
Partial fix for #308135.  (christophe.leroy@c-s.fr)

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

11 years agoA couple more leak supps for OSX10.7. Fixes #307557.
Julian Seward [Mon, 14 Oct 2013 11:29:47 +0000 (11:29 +0000)] 
A couple more leak supps for OSX10.7.  Fixes #307557.

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

11 years agoAdd definedness checking when dereferencing ptr during heuristic reachedness
Philippe Waroquiers [Sun, 13 Oct 2013 18:38:30 +0000 (18:38 +0000)] 
Add definedness checking when dereferencing ptr during heuristic reachedness

Patch ensures that no heuristic reachedness is obtained with undefined data.

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

11 years agomips64: Prevent testing swc1 and swxc1 with the uninitialized memory values on
Dejan Jevtic [Fri, 11 Oct 2013 06:05:24 +0000 (06:05 +0000)] 
mips64: Prevent testing swc1 and swxc1 with the uninitialized memory values on
big endian platrofms.

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

11 years agoAdding the link for none/tests/ppc32/test_touch_tm.c that got missed on
Carl Love [Thu, 10 Oct 2013 15:30:02 +0000 (15:30 +0000)] 
Adding the link for none/tests/ppc32/test_touch_tm.c that got missed on
commit 13630.

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

11 years agomips64: Change the input values for FPU tests.
Dejan Jevtic [Thu, 10 Oct 2013 09:10:35 +0000 (09:10 +0000)] 
mips64: Change the input values for FPU tests.

Change the input values so that the binary values
is representing exactly the same float values.

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

11 years agoFix use of uninit heuristic set for monitor command
Philippe Waroquiers [Wed, 9 Oct 2013 20:12:39 +0000 (20:12 +0000)] 
Fix use of uninit heuristic set for monitor command
* initialise leak_check heuristic parameter in the leak_check monitor command
* show the default value (none heuristic) in the monitor help command
  (none value chosen as default as this gives a backward compatible
   behaviour).
* document the heuristic leak check parameter in memcheck manual
  monitor command section

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

11 years agoPower PC, add the two privileged Transactional Memory instructions.
Carl Love [Wed, 9 Oct 2013 17:56:34 +0000 (17:56 +0000)] 
Power PC, add the two privileged Transactional Memory instructions.

The initial Transactional Memory instruction patch did not include the two
privileged (OS) instructions treclaim and trechkpt. VEX commit 2784 added
the support for these two instructions.

This patch adds a touch test to make sure all of the POWER Transactional
memory instrutions are recognized by Valgrind.  All of the the Transactional
Memory instructions, with the exception of tbegin, are treated as NOPs in the
first implementation.  The tbegin instruction causes the transaction to fail
thus no additional Transactional Memory instructions on the successful
transaction path would be executed in a real program.  This test just makes
sure each instruction is actually recognized by Valgrind.

The patch if for Bugzilla 325751.

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

11 years agomips32: Don't test Iops that aren't supported in VEX.
Dejan Jevtic [Wed, 9 Oct 2013 08:33:18 +0000 (08:33 +0000)] 
mips32: Don't test Iops that aren't supported in VEX.

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

11 years agoAdd a specific configury check to test compilability of the
Florian Krohm [Tue, 8 Oct 2013 13:04:00 +0000 (13:04 +0000)] 
Add a specific configury check to test compilability of the
<thread> C++ header file by the selected compiler.
Suggested by Bart Van Assche.

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

11 years agoTweak to avoid a trailing space.
Florian Krohm [Tue, 8 Oct 2013 06:02:01 +0000 (06:02 +0000)] 
Tweak to avoid a trailing space.

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

11 years agoFilter out the dynamic linker from back traces.
Florian Krohm [Mon, 7 Oct 2013 20:57:51 +0000 (20:57 +0000)] 
Filter out the dynamic linker from back traces.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).

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

11 years agoRemove unused variable (and associated compiler warning).
Florian Krohm [Mon, 7 Oct 2013 20:25:17 +0000 (20:25 +0000)] 
Remove unused variable (and associated compiler warning).

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

11 years agomips64: add extra Iop cases in VEX and fix compiler
Dejan Jevtic [Mon, 7 Oct 2013 10:27:31 +0000 (10:27 +0000)] 
mips64: add extra Iop cases in VEX and fix compiler
warning.

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

11 years agoFix leak scan SEGV catcher when ptr starts in unreadable page (readable for aspacemgr)
Philippe Waroquiers [Sun, 6 Oct 2013 21:23:04 +0000 (21:23 +0000)] 
Fix leak scan SEGV catcher when ptr starts in unreadable page (readable for aspacemgr)

The fault catcher installed during leak scan to catter e.g. for
possible desynchronisation between real protection and aspacemgr
was not activated when the scanned ptr was directly pointing in
a desynchronised page.
This was (initially only) visible on ppc32 (gcc110) as the page size of
gcc110 is big (64 K).

=> modified the leak-segv-jmp test so as to produce the problem also
on systems with smaller pages.

The fix consists in calling the setjmp before the scan loop,
and skip the bad address which has been recorded by the fault
catcher.
Also, deemed better to just skip one single Addr rather than a full page
(e.g. to skip less data in case some addresses are unreadable e.g.
on strange hardware).

Performance of the leak scan has been measured, seems slightly
faster on x86,amd64 and ppc32. Slightly slower on ppc64.

Also if verbose argument is given, outputs the nr of bytes skipped
due to fault.

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

11 years agopub_tool_oset.h and m_oset.c cleanup
Philippe Waroquiers [Sun, 6 Oct 2013 16:35:35 +0000 (16:35 +0000)] 
pub_tool_oset.h and m_oset.c cleanup

* Remove dead code in m_oset.c VG_(OSetGen_ResetIterAt)
  The code at the end of VG_(OSetGen_ResetIterAt) was unreachable
  (detected by BEAM checker).
  Looking at SVN, the initial commit of VG_(OSetGen_ResetIterAt)
  already contained this deadcode.

* pub_tool_oset.h was wrongly indicating that signed words could
  be used for fast cmp oset.

* modified memcheck/tests/unit_oset.c to test VG_(OSetGen_ResetIterAt)

* modified memcheck/tests/unit_oset.c to not use signed words
  (it was previously using signed words, but only with positive values)

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

11 years agoUpdate list of ignored files.
Florian Krohm [Fri, 4 Oct 2013 21:17:41 +0000 (21:17 +0000)] 
Update list of ignored files.

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

11 years agoDisable drd/tests/std_thread.cpp for clang.
Florian Krohm [Fri, 4 Oct 2013 21:13:16 +0000 (21:13 +0000)] 
Disable drd/tests/std_thread.cpp for clang.
clang 3.3 produces an error message for /usr/include/c++/4.6/chrono
which happens to get included somewhere inside <thread>.
This happens with C++ headers from:
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3.

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

11 years agoAdjust CFLAGS and CXXFLAGS for compilation with clang. The current
Florian Krohm [Fri, 4 Oct 2013 21:12:17 +0000 (21:12 +0000)] 
Adjust CFLAGS and CXXFLAGS for compilation with clang. The current
setting suppresses almost all warnings originating in source code
constructs. It does ot yet suppress warnings from unrecognised command
line flags as they may be the reason for regression test failures
which have not yet been investigated.

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

11 years agoAdd missing prereq.
Florian Krohm [Fri, 4 Oct 2013 20:45:25 +0000 (20:45 +0000)] 
Add missing prereq.

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

11 years agoFollowup to r13615. Conditional testcases need a prereq line in the
Florian Krohm [Fri, 4 Oct 2013 15:03:55 +0000 (15:03 +0000)] 
Followup to r13615. Conditional testcases need a prereq line in the
.vgtest file. This has sucked before and I keep forgetting about it.

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

11 years agoFollowup to r13614. Forgot to update the .exp file. Now fixed.
Florian Krohm [Fri, 4 Oct 2013 12:00:51 +0000 (12:00 +0000)] 
Followup to r13614. Forgot to update the .exp file. Now fixed.

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

11 years agoAdd a few feature tests to configure.ac because clang does not
Florian Krohm [Fri, 4 Oct 2013 11:35:50 +0000 (11:35 +0000)] 
Add a few feature tests to configure.ac because clang does not
understand the following:
- nested functions
- -gstabs option
- loopnel instruction
- addr32 in asm statements
- 'p' constraint in asm statements

Adapt Makefiles accordingly.

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

11 years agoRemove 4 tests of the pextrw instruction.
Florian Krohm [Fri, 4 Oct 2013 11:29:26 +0000 (11:29 +0000)] 
Remove 4 tests of the pextrw instruction.
Those tests were rejected by clang and according to the
analysis below by Tom Hughes do not add anything new.

Analysis:

I'm not 100% sure that clang is right though - the Intel manual
clearly describes that argument as "reg" rather than "r32" which
is why I will have included the 64 bit version in the test. It also says:

  "The upper bits of r32 or r64 is zeroed."

and:

  "If the destination operand is a general-purpose register, the
   default operand size is 64-bits in 64-bit mode."

which basically means that REX.W is implied for this op and there is
no way to encode a 32 bit version when running in 64 bit mode.

So in principle you could encode it as:

  44 0f c5 ce 00          pextrw $0x0,%mm6,%r9d

or:

  4c 0f c5 ce 00          pextrw $0x0,%mm6,%r9

but in fact gcc assembles both versions to the first form.

Equally you could argue that as REX.W is implied both versions
should disassemble as %r9.

So I think clang is being overly picky, and if it was only going to
accept one version I would argue it should be %r9 not %r9d!

In practical terms dropping the second set of tests doesn't lose us anything though.

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

11 years agodrd: Update copyright notice
Bart Van Assche [Fri, 4 Oct 2013 05:55:30 +0000 (05:55 +0000)] 
drd: Update copyright notice

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

11 years agoFix compilation problem of memcheck/tests/leak-segv-jmp on ppc32
Philippe Waroquiers [Thu, 3 Oct 2013 22:36:54 +0000 (22:36 +0000)] 
Fix compilation problem of memcheck/tests/leak-segv-jmp on ppc32
With the change, the test compiles on ppc32.
However, the test fails miserably with
 Segmentation fault
while the whole purpose of the test was to see the leak search
would *not* segfault.

More investigations needed, but still committing as is to let
the tests compile and run.

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

11 years ago Phase 4 support for IBM Power ISA 2.07
Carl Love [Thu, 3 Oct 2013 21:43:10 +0000 (21:43 +0000)] 
 Phase 4 support for IBM Power ISA 2.07

This patch adds testcases for the following instructions added
in phase 4.  The instructions are for doing various arithmetic,
logic, and load/store VSX operations:

  xscvsxdsp xscvuxdsp xsaddsp xssubsp xsdivsp xsmaddasp xsmaddmsp
  xsmsubasp xsmsubmsp xsnmaddasp xsnmaddmsp xsnmsubasp xsnmsubmsp
  xsmulsp xssqrtsp xsresp xsrsqrtesp xsrsp xxlorc xxlnand xxleqv
  lxsiwzx lxsiwax lxsspx stxsiwx stxsspx

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
VEX commit for the instruction support r2781
Bugzilla 325477

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

11 years agoChange some inline assembler so it is no longer rejected by clang
Florian Krohm [Thu, 3 Oct 2013 20:54:52 +0000 (20:54 +0000)] 
Change some inline assembler so it is no longer rejected by clang
as suggested by John Reiser and Greg Parker.
It seems that GCC has a more relaxed attitude about what it accepts
as valid input.

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

11 years agoFix assert for who_points_at monitor cmd for an interiorly pointed block
Philippe Waroquiers [Wed, 2 Oct 2013 20:59:05 +0000 (20:59 +0000)] 
Fix assert for who_points_at monitor cmd for an interiorly pointed block

* fix the assert
* some better comments
* update test to verify who_points_at behaviour with an interiorly pointed block

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

11 years agoThe test case for the Transaction Memory instructions failes with older
Carl Love [Wed, 2 Oct 2013 17:48:48 +0000 (17:48 +0000)] 
The test case for the Transaction Memory instructions failes with older
compilers as the -mhtm flag is not known.  The patch fixes the makefile
issue and addes #defines to the testcase code.

The testcase was added in valgrind commit 13607.

The bugzilla for adding the TM instruction support is 323803

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

11 years agoIBM POWER PC, Add the Transactional Memory test case
Carl Love [Wed, 2 Oct 2013 16:28:57 +0000 (16:28 +0000)] 
IBM POWER PC, Add the Transactional Memory test case

The test case for the transaction memory instructions executes the
failure path when run under valgrind.  This is since the initial
Transaction Memory implemnetation is to simply fail the TBEGIN instruction
forcing the execution flow to take the failure path.  When the
test case is executed on the real hardware, the success path will
be taken.  Only the TBEGIN instruction actually does anything.  All other
transactional memory instructions are NOPs since only failure path is executed
and it assumed to not have any transactional memory instructions on it.

Signed-off-by: Carl Love <cel@us.ibm.com>
VEX commit revision 2780
Bugzilla 323803

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

11 years agodrd/tests/annotate_smart_pointer: Avoid non-POD variable length arrays
Bart Van Assche [Wed, 2 Oct 2013 16:22:23 +0000 (16:22 +0000)] 
drd/tests/annotate_smart_pointer: Avoid non-POD variable length arrays

Non-POD variable length arrays are supported by g++ but not by clang.
Hence convert the variable length array in this test program into a vector.

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

11 years agoSilence clang warnings for the none and exp-sgcheck tools.
Florian Krohm [Wed, 2 Oct 2013 15:37:03 +0000 (15:37 +0000)] 
Silence clang warnings for the none and exp-sgcheck tools.

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

11 years agoThe configury bits for checking the annotatoin of smart pointers
Florian Krohm [Wed, 2 Oct 2013 15:14:59 +0000 (15:14 +0000)] 
The configury bits for checking the annotatoin of smart pointers
were mixing up CFLAGS and CXXFLAGS. Now fixed.

Also, when modifying CFLAGS also modify CXXFLAGS unless there is a
good reason not to do so. This only affects compilation of testcases.

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

11 years agoAdd tests/check_isa-2_07_cap to dist_noinst_SCRIPTS.
Mark Wielaard [Wed, 2 Oct 2013 13:41:57 +0000 (13:41 +0000)] 
Add tests/check_isa-2_07_cap to dist_noinst_SCRIPTS.

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

11 years agoAdd opcodes.h to EXTRA_DIST for none/tests/ppc[32|64].
Mark Wielaard [Wed, 2 Oct 2013 13:17:56 +0000 (13:17 +0000)] 
Add opcodes.h to EXTRA_DIST for none/tests/ppc[32|64].

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

11 years agoAdd post_regtest_checks check_headers_and_includes to dist_noinst_SCRIPTS.
Mark Wielaard [Wed, 2 Oct 2013 11:39:41 +0000 (11:39 +0000)] 
Add post_regtest_checks check_headers_and_includes to dist_noinst_SCRIPTS.

Also allow a .git directory in check_headers_and_includes to help
people using a git mirror of valgrind/VEX svn.

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

11 years agoEliminate a few GCC 4.8.1 warnings.
Florian Krohm [Wed, 2 Oct 2013 06:56:47 +0000 (06:56 +0000)] 
Eliminate a few GCC 4.8.1 warnings.

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

11 years agoSilence clang warnings about uninitialised and unused values in
Florian Krohm [Tue, 1 Oct 2013 22:38:43 +0000 (22:38 +0000)] 
Silence clang warnings about uninitialised and unused values in
memcheck testcases.

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

11 years agoFix exception specification for operator delete as spotted by clang 3.3
Florian Krohm [Tue, 1 Oct 2013 22:18:14 +0000 (22:18 +0000)] 
Fix exception specification for operator delete as spotted by clang 3.3

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

11 years agoRemove a duplicate const qualifier complained about by clang 3.3
Florian Krohm [Tue, 1 Oct 2013 20:10:21 +0000 (20:10 +0000)] 
Remove a duplicate const qualifier complained about by clang 3.3

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

11 years agoFix printf format. The 'L' modifier cannot be used with
Florian Krohm [Tue, 1 Oct 2013 18:39:55 +0000 (18:39 +0000)] 
Fix printf format. The 'L' modifier cannot be used with
the 'x' format specifier. Use 'll' instead.

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

11 years agodrd: Change VALGRIND_DO_CLIENT_REQUEST_EXPR() into VALGRIND_DO_CLIENT_REQUEST_STMT...
Bart Van Assche [Tue, 1 Oct 2013 16:55:58 +0000 (16:55 +0000)] 
drd: Change VALGRIND_DO_CLIENT_REQUEST_EXPR() into VALGRIND_DO_CLIENT_REQUEST_STMT() where appropriate

This should silence a few clang warnings. This was reported by Florian.

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

11 years agoAdd tests for the phase 3 ISA 2.07 code patch
Carl Love [Tue, 1 Oct 2013 15:50:09 +0000 (15:50 +0000)] 
Add tests for the phase 3 ISA 2.07 code patch

This patch adds testcases to an existing testcase
source file to test the new instructions which were
added to VEX support in the phase 3 ISA 2.07 code patch.
The patch also makes a small change to memcheck's
vbit tester code to allow successful execution.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>
Bugzilla 324894.   Corresponding VEX commit 2779

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

11 years agomips32: Fix the align problem with mmap.
Dejan Jevtic [Tue, 1 Oct 2013 10:34:54 +0000 (10:34 +0000)] 
mips32: Fix the align problem with mmap.

Valgrind is doing mmap always with MAP_FIXED. On mips32 we need to check arg4.
If the arg4 is MAP_SHARED we need to align the address to SHMLBA.
If the program tries to do mmap with VKI_FIXED Valgrind doesn't need to align
the address to SHMLBA.

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

11 years agoFix typo
Florian Krohm [Tue, 1 Oct 2013 07:01:08 +0000 (07:01 +0000)] 
Fix typo

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

11 years agoUse global vars to point at possibly leaked
Philippe Waroquiers [Mon, 30 Sep 2013 21:17:09 +0000 (21:17 +0000)] 
Use global vars to point at possibly leaked
Depending on the compiler or optimisation level, the blocks that
are supposed to be possibly leaked are still reachable.
=> change the pointers to be global variables,
and do the allocation in a function, not in main.

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

11 years agoUpdate list of ignored files.
Florian Krohm [Mon, 30 Sep 2013 19:01:54 +0000 (19:01 +0000)] 
Update list of ignored files.

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

11 years agoRobustise the find_client function. Also fix a memory leak spotted by
Florian Krohm [Mon, 30 Sep 2013 18:36:31 +0000 (18:36 +0000)] 
Robustise the find_client function. Also fix a memory leak spotted by
IBM's BEAM checker.

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

11 years agoUpdated.
Florian Krohm [Mon, 30 Sep 2013 16:41:56 +0000 (16:41 +0000)] 
Updated.

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

11 years agoCheck whether binutils supports TSX instructions.
Florian Krohm [Mon, 30 Sep 2013 16:32:53 +0000 (16:32 +0000)] 
Check whether binutils supports TSX instructions.
Guard none/tests/amd64/tm1 accordingly.

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

11 years agoEnable sys_fanotify_init and sys_fanotify_mark on arm-linux.
Julian Seward [Sun, 29 Sep 2013 20:01:22 +0000 (20:01 +0000)] 
Enable sys_fanotify_init and sys_fanotify_mark on arm-linux.
Fixes #324421.  (Heinrich Schuchardt, xypron.glpk@gmx.de)

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

11 years agoUpdate bug status.
Julian Seward [Sun, 29 Sep 2013 19:54:39 +0000 (19:54 +0000)] 
Update bug status.

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

11 years agoAdd test cases for SMMLS, SMLALD, SMLSLD (ARM and Thumb). Pertains to
Julian Seward [Sun, 29 Sep 2013 19:49:43 +0000 (19:49 +0000)] 
Add test cases for SMMLS, SMLALD, SMLSLD (ARM and Thumb).  Pertains to
323036, 323175, 323177.  (vasily.golubev@gmail.com)

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

11 years agoAdd test cases for LDRHT (Thumb), LDRSHT (Thumb), [LDR,ST]{S}[B,H]T (ARM).
Julian Seward [Sun, 29 Sep 2013 18:25:29 +0000 (18:25 +0000)] 
Add test cases for LDRHT (Thumb), LDRSHT (Thumb), [LDR,ST]{S}[B,H]T (ARM).
Pertains to 321891, 323035, 324047.  (vasily.golubev@gmail.com)

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

11 years agoadd heuristics decreasing false possible "possible leaks" in c++ code.
Philippe Waroquiers [Sun, 29 Sep 2013 13:47:32 +0000 (13:47 +0000)] 
add heuristics decreasing false possible "possible leaks" in c++ code.

The option --leak-check-heuristics=heur1,heur2,... can activate
various heuristics to decrease the number of false positive
"possible leaks" for C++ code. The available heuristics are
detecting valid interior pointers to std::stdstring, to new[] allocated
arrays with elements having destructors and to interior pointers pointing
to an inner part of a C++ object using multiple inheritance.

This fixes 280271 Valgrind reports possible memory leaks on still-reachable
std::string

This has been tested on x86/amd64/ppc32/ppc64.

First performance measurements seems to show a neglectible impact on
the leak search.

More feedback welcome both on performance and functional aspects
(false positive 'possibly leaked' rate decrease and/or
false negative 'possibly leaked' rate increase).

Note that the heuristic is not checking that the memory has been
allocated with "new" or "new[]", as it is expected that in some cases,
specific alloc fn are used for c++ objects instead of the standard new/new[].
If needed, we might add an option to check the alloc functions
to be new/new[].

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

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