Commit Graph

789 Commits

Author SHA1 Message Date
Florian Krohm
9e5f501978 Some older kernels on s390 do not provide AT_PLATFORM.
Add a prerequisite condition to make sure it's there.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13023
2012-10-05 23:29:38 +00:00
Tom Hughes
b387dedac0 Allow a null pointer as the second argument to capget.
Patch from Mark Wielaard to fix BZ#307101.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13021
2012-10-04 21:38:27 +00:00
Tom Hughes
c560f18eb7 Filter out memcpy symbol versions from test results.
Patch from Mark Wielaard to fix BZ#307290.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13020
2012-10-04 20:41:12 +00:00
Tom Hughes
f74befe896 Implement a fake /proc/self/auxv file for linux systems.
Patch from Mark Wielaard to fix BZ#253519.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13019
2012-10-04 20:27:38 +00:00
Philippe Waroquiers
76e93ca812 Unbreak build on Mac_OS where __NR_mprotect is not defined.
The test is not executed on Darwin but should compile.
(based on fix suggestion by Rich Coe)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13014
2012-09-24 21:37:02 +00:00
Florian Krohm
a46b1219e1 Add missing header files. Building from tarball works again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12990
2012-09-17 18:54:44 +00:00
Philippe Waroquiers
0a51e37219 Add a test which checks the leak search recovery mechanism
The leak search must recover if unreadable pages are scanned.
This test creates such unreadable pages by doing non SIMD mprotect
syscall (not seen by the aspacemgr).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12972
2012-09-14 21:10:15 +00:00
Florian Krohm
f9979eceb1 Adjust the vbit tester to deal with shift operations that require
an immediate constant as the shift amount. This is needed for
powerpc Iop_ShlD64 etc. What it basically means that we do not
iterate over the bits in the 2nd operand because there are no
V-bits to set. An immediate constant is always completely defined.
Fixes bugzilla #305948.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12969
2012-09-13 19:41:12 +00:00
Julian Seward
f0ef4bf583 Enable testing of primops on ARM platforms. (Florian Krohm)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12957
2012-09-03 21:59:28 +00:00
Florian Krohm
1229190124 s390: Valgrind-side changes to fixing bugzilla #274695:
Testcase, vbit tester update, memcheck support for the new IROps,
NEWS announcement and opcode list update.
Patch by Christian Borntraeger (borntraeger@de.ibm.com).
Vbit tester tweaks by myself.
Fixes bugzilla #274695.
See also companion patch VEX r2496.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12921
2012-09-01 00:15:45 +00:00
Florian Krohm
20c2f83060 Fix build on Darwin. Patch by Rich Coe (rcoe@wi.rr.com).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12917
2012-08-30 15:12:59 +00:00
Florian Krohm
ecfd85ebe2 Enable V-bit testing on x86.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12916
2012-08-29 22:40:50 +00:00
Florian Krohm
89b8922886 Enable V-bit testing on ppc32.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12914
2012-08-29 17:45:13 +00:00
Florian Krohm
113df09b13 Fix printf formats for uint64_t values.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12913
2012-08-29 15:21:15 +00:00
Florian Krohm
a4d1060ccf vbit tester: Disable Iop_CmpLT64S and Iop_CmpLE64S for ppc because
they cause assertion failures.
Do not test Iop_CmpORDxyz on ppc because the vbit tester does not 
support them. This is just so we don't have to add another .exp file for ppc.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12910
2012-08-28 23:38:49 +00:00
Florian Krohm
0d0e6346db Add a tester for V-bit propagation through IROps.
The tester is located in memcheck/tests/vbit-test.
It needs the following support on the valgrind / VEX side:
(1) a new client request VG_USERREQ__VEX_INIT_FOR_IRI
(2) a new "special instruction" on all architectures inserted via
    VALGRIND_VEX_INJECT_IR
(3) VEX changes to detect the special insn and insert IR (ir_inject.c)

The README file in vbit-test has some more information.
See also VEX r2490.  Fixes bugzilla #300102.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12906
2012-08-28 16:50:39 +00:00
Julian Seward
07e9d64e18 Clang complains that "fist" is ambiguous (it's right, too); use
"fists" instead.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12834
2012-08-04 23:10:23 +00:00
Julian Seward
0591d4c8f0 Don't explicitly specify an ABI when building regtests on ARM. This
causes them to fail to be built on (eg) Ubuntu 12.04 ARM.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12831
2012-08-04 19:21:18 +00:00
Philippe Waroquiers
d8576fd3bc Add non matching suppressions for suppfree test (more testing for suppr matching)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12825
2012-08-04 00:26:26 +00:00
Philippe Waroquiers
08c619389b fix 284540 (optimise suppression matching)
Before this patch, matching an error stack trace with many suppression
patterns was implying to repeating the translation of the IPs of the
stack trace to the function name or object name for each suppr pattern.

This patch introduces a "lazy input completer" in the generic match
so that an IP is (in the worst case) translated once to its function
name and once to its object name.

It is a "lazy" completer in the sense that only the needed IP to fun or obj
name are done.

On a artificial test case, has given a factor 3 in performance.
On another big (real) application, gave a factor 2 to 3.
(there was less matching to do, but probably more debug info to search).

match-overrun.supp completed to have non matching suppr first to
better exercise the lazy completer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12824
2012-08-03 23:11:39 +00:00
Philippe Waroquiers
d045b4236a Implement --redzone-size and --core-redzone-size
* For tools replacing the malloc library (e.g. Memcheck, Helgrind, ...),
  the option --redzone-size=<number> allows to control the padding 
  blocks (redzones) added before and after each client allocated block.
  Smaller redzones decrease the memory needed by Valgrind. Bigger
  redzones increase the chance to detect blocks overrun or underrun.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12807
2012-07-31 22:17:28 +00:00
Florian Krohm
3630d97fcf Testcases for CU42. Part of fixing bugzilla #289839.
Update opcode table.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12804
2012-07-28 22:20:03 +00:00
Florian Krohm
d073e8f615 Minor tweaks. A few comments were out of synch with source.
Add another test.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12802
2012-07-28 21:59:34 +00:00
Petar Jovanovic
0717c59552 MIPS specific expected output for memcheck/tests/sigkill.
MIPS has different signal values, so it has to have its own expected output for
the tests that deal with signal values.
This fixes (false) failure in memcheck/tests/sigkill.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12794
2012-07-27 22:35:35 +00:00
Philippe Waroquiers
7685c36a5e Have one test testing the ? suppr matching wildcard character.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12793
2012-07-27 21:56:08 +00:00
Florian Krohm
1709090cc8 Improve complaints. Enabled by VEX r2449.
Line numbers are still bad. But that is a GCC issue.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12785
2012-07-26 02:03:16 +00:00
Florian Krohm
21c67106a6 Add testcases for CU21. Update opcode table.
WRT the memcheck test: the good news is we get all the complaints
we want. The bad news is:
- the line numbers from within do_cu21 are off
- there are 2 complaints when attempting to convert from
  an uninitialised input buffer instead of one. One of them has a 
  completely bogus line number.

Possibly due to bad debug info?  Let's see what happens on machines
with more recent GCCs. 


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12765
2012-07-20 00:17:16 +00:00
Philippe Waroquiers
cb808f8353 Improve behaviour of mempool redzone checking if user does not follow the manual (297911)
User is supposed to mark the superblock(s) of a mempool as noaccess.
As Valgrind objective is to find bugs for users which are doing bugs, let's even
find (some) bugs if the user has a bug in the bug detection code.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12714
2012-07-05 21:11:12 +00:00
Florian Krohm
5dec28d4af Increase allowed size of a back-trace to 500 frames.
This limit is large enough for all practical purposes. It exists
only to sanity check the value specified with --num-callers.
Be frugal in record_ExeContext_wrk and only allocate on the stack 
as many frames as needed. 
Testcase included.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12685
2012-06-29 21:20:52 +00:00
Julian Seward
241b6776ba Fix inline assembly for the "lfiwax" insn test. #302536.
(Carl Love, carll@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12681
2012-06-28 18:40:43 +00:00
Bart Van Assche
8235b63124 Fix compiler warnings for ppc test cases. Patch from Carl Love (carll@us.ibm.com). See also #302205.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12663
2012-06-23 11:04:01 +00:00
Bart Van Assche
209eb0a2ab Add strchr.stderr.exp3 to memcheck/tests/Makefile.am
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12647
2012-06-17 05:51:03 +00:00
Bart Van Assche
deec5f8ece memcheck/tests/strchr: Add expected output for openSUSE 12.1
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12644
2012-06-16 18:50:04 +00:00
Philippe Waroquiers
3ad6cb5039 Fix order of % versus * in memalign2.c new checks introduced in 12642
(spotted by Florian eagle eyes)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12643
2012-06-15 22:57:40 +00:00
Philippe Waroquiers
e46d2abe7e Fix 203877 and 301229 increase to 16Mb maximum allowed alignment for memalign() and posix_memalign
Note that VG_(arena_memalign) is not used by core or tools for the moment.
We have one single maxima for both the V core/tools and the client.
Enhanced memcheck/tests/memalign2.c to test 4 Mb and 16 Mb alignments.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12642
2012-06-15 22:19:59 +00:00
Christian Borntraeger
02b511c27d avoid gcc warning regarding local/global variable shadowing in cdsg test
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12623
2012-06-08 07:13:17 +00:00
Christian Borntraeger
f2ac9c9cca s390: also fix the memcheck testcase for cdsg regarding alignment
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12622
2012-06-08 06:59:33 +00:00
Julian Seward
3e344c57f6 Merge in a port for mips32-linux, by Petar Jovanovic and Dejan Jevtic,
mips-valgrind@rt-rk.com, Bug 270777.

Valgrind: changes to existing files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12616
2012-06-07 09:13:21 +00:00
Florian Krohm
932ea4ad94 Support "compare double ansd swap" insns: CDS, CDSY, and CDSG
valgrind bits for fixing bugzilla #291865. See also VEX r2372.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12615
2012-06-06 02:27:51 +00:00
Julian Seward
15d92f3799 Fixes for 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12614
2012-06-05 11:10:19 +00:00
Florian Krohm
99f5b836b3 Add missing .exp files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12597
2012-06-01 03:20:47 +00:00
Florian Krohm
48b4014349 Add testcases for "compare and swap".
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12595
2012-05-30 20:46:58 +00:00
Philippe Waroquiers
6ccb4c199e fix 299756 (for symmetry, --free-fill must be ignored for MEMPOOL_FREE and FREELIKE client requests).
Test program from goodell@mcs.anl.gov



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12560
2012-05-11 22:10:39 +00:00
Philippe Waroquiers
0ea6d36f1d fix 219156 support static malloc or alternate malloc lib (e.g. tcmalloc) with new option --soname-synonyms
* pub_tool_redir.h : define the prefix to be used for "soname synonym"
  place holder
* vg_replace_malloc.c : define synonym place holder for malloc related
  functions
* m_redir.c : when detecting a soname synonym place holder redir spec, search
  in clo_soname_synonyms if there is a synonym pattern.
  If yes, replace the soname pattern. If not, ignore the redir spec.
* various files: implement or document the new clo --soname-synonyms
* new test memcheck/tests/static_malloc.vgtest



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12559
2012-05-11 19:33:46 +00:00
Julian Seward
f069a7bb56 Merge branches/TCHAIN from r12476 (its creation point) into trunk.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12517
2012-04-20 23:58:55 +00:00
Florian Krohm
12f588b195 Disable test on big-endian platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12495
2012-04-06 14:50:52 +00:00
Florian Krohm
6798e87909 Skip the test if it was not compiled, i.e. dwarf4 is not supported.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12494
2012-04-06 13:54:53 +00:00
Julian Seward
e13d919613 Add support for reading DWARF4 .debug_types sections. Fixes #284124.
(Tom Tromey, tromey@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12491
2012-04-05 07:55:47 +00:00
Julian Seward
8b6f93641c Add translation chaining support for amd64, x86 and ARM
(Valgrind side).  See #296422.



git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12484
2012-04-02 21:56:03 +00:00
Julian Seward
a1e6c6723c Make this compile on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12464
2012-03-27 09:39:22 +00:00