Commit Graph

1452 Commits

Author SHA1 Message Date
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
e55e352fc6 Generate type-correct IR (always a good thing :-) when instrumenting
256 bit stores with --undef-value-errors=no.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12684
2012-06-29 15:29:37 +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
Julian Seward
7ef42ab8c3 Add handling of 256-bit vector FP arithmetic ops, so as to support AVX.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12673
2012-06-25 07:52:15 +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
Florian Krohm
4c9a5b53c6 Amend do_shadow_Dirty and do_origins_Dirty so they no longer assert
if the helper call touches an odd number of bytes in memory.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12624
2012-06-08 16:01:19 +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
Julian Seward
ccf880a48c POWER Processor decimal FP support, part 5. (Valgrind side). Bug #299694.
(Carl Love, carll@us.ibm.com and Maynard Johnson, maynardj@us.ibm.com)

This patch adds support for Power Decimal Floating Point (DFP) . This
is the fifth patch set in the series of five to add the DFP
instruction support to Valgrind.  Adds support for the ddedpd,
ddedpdq, denbcd, denbcdq, dtstsf, and dtstsfq instructions.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12603
2012-06-02 23:48:06 +00:00
Florian Krohm
81ad5d929e Rippled from VEX r2366. Part of reducing size of IRExpr.
These are the valgrind bits.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12602
2012-06-02 20:30:41 +00:00
Florian Krohm
eba52b2778 Ripple from VEX r2363. Part of reducing size of IRExpr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12599
2012-06-01 20:43:03 +00:00
Julian Seward
eadaa02566 Track the change to IRDirty guest state effect annotations introduced
in vex r2362.

mc_translate.c: also do PCast 64->32 a bit more efficiently.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12598
2012-06-01 16:11:41 +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
bb6b4f1bbe Reduce size of an IRStmt from 40 bytes to 32 bytes on LP64
by allocating the details of a PutI statement into a struct
of its own and link to that (as is being done for Dirty and CAS).

These are the valgrind bits (see also VEX r2361).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12596
2012-05-31 15:48:13 +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
Florian Krohm
b9f5142112 Add comments from Julian as to why mc_main.c and mc_replace_strmem.c
deserve special compilation treatment.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12575
2012-05-22 01:41:48 +00:00
Julian Seward
d71610e63a Handle increase in ppc64 guest state size resulting from r2331.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12570
2012-05-21 11:01:35 +00:00
Julian Seward
8ebb8c30e5 Add initial support for Intel AVX instructions (Valgrind side).
Tracker bug is #273475.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12569
2012-05-21 10:18:10 +00:00
Philippe Waroquiers
cad5f2ea1d Bypass gcc 4.4/4.5 compilation bug by moving -fomit-frame-pointer to Makefile.all.am
gcc 4.4 and 4.5 has a bug which causes miscompilation of mc_main.c:
 args are not correctly given to VG_(am_munmap_valgrind).
This causes the secondary map entries to not be unmapped
(which can cause unlimited memory growth) 
and/or causes the assert on VG_(am_munmap_valgrind) result to fail.

Removing the pragma optimize from mc_main.c and inserting it instead
in Makefile.all.am for x86 solves the gcc bug.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12564
2012-05-15 21:04:31 +00:00
Philippe Waroquiers
354569b574 Add assertion that the munmap of the secmap succeeds.
It is suspected that there is a bug in the call to VG_(am_munmap_valgrind).

At first sight, it looks like a bug in gcc version 4.4.5 (Debian 4.4.5-8)
which seems to pass wrong arguments from mc_main.c to aspace mgr function.
Some tests are failing on gcc20 with this assert a.o.
  ./vg-in-place ./perf/bz2 x
gives an assert.
The bug does not happen if Valgrind is compiled with gcc 4.7.0.


On gcc20, the new tests failing with this assert are:
memcheck/tests/linux/lsframe1            (stderr)
memcheck/tests/linux/lsframe2            (stderr)
memcheck/tests/linux/stack_switch        (stderr)
memcheck/tests/origin5-bz2               (stdout)
memcheck/tests/vcpu_bz2                  (stdout)
memcheck/tests/vcpu_bz2                  (stderr)

The assert is committed so as to see other platforms
where this is failing.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12563
2012-05-13 22:58:09 +00:00
Florian Krohm
7d3eee1edf Move registration of mc_pre_reg_read to mc_post_clo_init.
This fixes the regtest failure for memcheck/tests/clireq_nofill on s390x.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12562
2012-05-12 18:06:35 +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
6e0e5e15c5 Test cases for POWER Power Decimal Floating Point (DFP) test class,
test group and test exponent instructions dtstdc, dtstdcq, dtstdg,
dtstdgq, dtstex and dtstexq.  Bug #298862.  (Carl Love,
carll@us.ibm.com and Maynard Johnson, maynardj@us.ibm.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12546
2012-04-29 20:20:16 +00:00
Julian Seward
72eb6b7a7e POWER Processor decimal floating point instruction support, part 3 --
test cases.  (Carl Love, carll@us.ibm.com).  Bug 298080.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12541
2012-04-23 11:22:05 +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
Julian Seward
4395ea6182 Changes needed to make t-chaining work on ppc64-linux (valgrind side).
git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12514
2012-04-20 10:43:08 +00:00
Julian Seward
6d68ec0346 Add translation chaining support for ppc32 (tested) and to
a large extent for ppc64 (incomplete, untested) (Valgrind side)


git-svn-id: svn://svn.valgrind.org/valgrind/branches/TCHAIN@12512
2012-04-20 00:14:02 +00:00
Julian Seward
9c1af9b09a POWER Processor decimal floating point instruction support: part 2
(bug #297497) (Carl Love, carll@us.ibm.com) (Valgrind side, mostly
tests)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12500
2012-04-12 17:28:57 +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
f8bd0543a4 Fix track-origin instrumentation for ppc32 following r2270/r12476
(initial DFP support).  Maynard Johnson (maynardj@us.ibm.com).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12480
2012-04-02 15:10:37 +00:00
Julian Seward
d2ca761361 Initial support for POWER Processor decimal floating point
instruction support -- VEX side changes.  See #295221.

This patch adds test cases.  Also adds some minor Memcheck
instrumentation tweaks necessitated by the IR changes.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12476
2012-04-02 10:22:05 +00:00
Julian Seward
b49612b466 /* Do expensive interpretation for Iop_Add32 and Iop_Add64 on
Darwin.  10.7 is mostly built with LLVM, which uses these for
   bitfield inserts, and we get a lot of false errors if the cheap
   interpretation is used, alas.  Could solve this much better if
   we knew which of such adds came from x86/amd64 LEA instructions,
   since these are the only ones really needing the expensive
   interpretation, but that would require some way to tag them in
   the _toIR.c front ends, which is a lot of faffing around.  So
   for now just use the slow and blunt-instrument solution. */

Pertains to, although does not completely solve, #242137.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12467
2012-03-27 10:19:39 +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
Philippe Waroquiers
b20b3938c6 add test-plo-no.stderr.exp-s390x-mvc in EXTRA_DIST.
Note: such missing files in EXTRA_DIST are found
by check_makefile_consistency.
However, to avoid blocking the tests, the return code
of check_makefile_consistency is ignored, but the errors
it detects are pages before the end of the make regtest output.

=> it might be a good idea to move the check_makefile_consistency
as the last step of regtest: target, and not ignore its return code.
This means:
   trials tests will not block make regtest
   such errors will be noticed.

For the moment, just fixed the missing file in EXTRA_DIST



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12455
2012-03-21 20:32:00 +00:00
Philippe Waroquiers
cbb290c3a3 fix 295799 Missing \n with get_vbits in gdbserver when line is % 80 and there are some unaddressable bytes
patch from Marc Bessières

Thanks



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12453
2012-03-20 19:04:39 +00:00
Florian Krohm
3898cbda6b Add expected output for s390x with compilers using mvc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12448
2012-03-17 17:37:50 +00:00
Florian Krohm
55255ece42 Add expected results for 32-bit little endian platform.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12447
2012-03-17 17:27:17 +00:00
Philippe Waroquiers
825fdcf3cb Ensure VALGRIND_MALLOCLIKE_BLOCK protects the red zones.
* Redzones for custom alloc were not protected by VALGRIND_MALLOCLIKE_BLOCK.
  mc_main.c client request handling completed with protection
  of the redzones.
* custom_alloc.c test modified to test this case.
* mc_errors.c modified so as to first search for a malloc-ed block
  bracketting the error : for a custom allocator, a recently freed
  block can have just been re-allocated.
  In such a case, describing the address (e.g. in case of error)
  points to the block freed rather than to the block just allocated.
  If there is *also* a recently freed block bracketting the address,
  the block description is changed to indicate that.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12439
2012-03-11 17:59:00 +00:00
Julian Seward
cd43bae6a4 Change the behaviour of --partial-loads-ok=yes to avoid false
negatives, by marking the V bits that come from out of range parts of
the access as undefined; and hence any use of them leads to an value
error.  Prior to this they were marked as defined and could be used
without error.

Behaviour of --partial-loads-ok=no (the default case) is unchanged.

Also add some testing thereof.

Fixes #294523.  Modified version of a patch and testcase by Patrick
J. LoPresti (lopresti@gmail.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12430
2012-03-08 14:51:01 +00:00