Commit Graph

1477 Commits

Author SHA1 Message Date
Florian Krohm
cd528bd768 Followup patch to r12899, purely mechanical. Rename:
VexEmWarn -> VexEmNote
EmWarn_NUMBER -> EmNote_NUMBER
guest_EMWARN -> guest_EMNOTE
LibVEX_EmWarn_string -> LibVEX_EmNote_string
offB_EMWARN -> offB_EMNOTE
EmWarn_NONE -> EmNote_NONE
See also VEX r2484


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12900
2012-08-26 03:22:09 +00:00
Julian Seward
ec3a16088b Implement a wrapper for wcslen on Linux, assuming that
sizeof(wchar_t) == 4, which I believe to be true on both Linux
and MacOSX.  Fixes #298281.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12893
2012-08-24 14:44:27 +00:00
Florian Krohm
ddd6ac7a7d Fix propagation of undefinedness for Iop_DPBtoBCD and Iop_BCDtoDPB.
Any undefined input bit will cause all output bits to be undefined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12885
2012-08-22 18:09:07 +00:00
Florian Krohm
7f4d41c4b9 Handle the following IRops as they may get generated:
Iop_Mul8, Iop_Sar8, Iop_CmpwNEZ32, and Iop_8HLto16.
With this change mc_translate now handles all IR ops which are architecture
independent, except Iop_LeftXYZ and Iop_Max32U.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12884
2012-08-20 16:51:39 +00:00
Florian Krohm
18a9544be9 Remove memcheck support for IR op Iop_I16StoF32 which is unused.
See also VEX r2471.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12877
2012-08-18 02:44:49 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Philippe Waroquiers
ab7b338320 301265 - add x86 support to Android build
Patch by Dragos Tatulea.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12835
2012-08-05 00:08:25 +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
ea5434e0dd Add an intercept for memrchr. Needed for amd64 Ubuntu 12.04.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12833
2012-08-04 23:08:08 +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
Florian Krohm
b54d735e92 Observe guards on dirty helpers in memcheck.
This means, that any guest state and/or memory accesses of the helper (and
complaints about those) only occur if the guard expression is true at runtime.
Definedness of parameters that the helper might have is *always* checked,
as parameters are evaluated regardless of the guard expression.
New functions: expr2vbits_guarded_Load and gen_guarded_load_b.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12762
2012-07-19 17:23:42 +00:00
Philippe Waroquiers
67f15ef871 patch that improves the speed of the leak search by up to 40% (on amd64)
Scanning 1GB of random values made of 200_000 malloc-ed block is
(on amd64) changing from (about) 17 seconds to (about) 10 seconds.

On x86, it goes from 153 seconds to 129 seconds.

(this huge difference between x86 and amd64 leak search time
for this random test is because a random value has about one chance
on 4 to be in the addressable memory on x86 and so the dichotomic
search in the list of malloc-ed blocks is called for a lot more
values than on amd64).

Basically, there are 3 optimisations:
1. call MC_(is_within_valid_secondary) only at the beginning of a
   secondary map (and not for each Word).
2. call SETJMP only at the beginning of a page (and not for each Word)
3. Validate an aligned word using get_vabits8 rather than get_vabits2.

Each of the above optimisation more or less improves by 2 seconds.
(to go from 17 seconds to 10 seconds).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12756
2012-07-18 22:26:51 +00:00
Julian Seward
7bf78edb21 Add another intercept for strncasecmp_l. Fixes #297701.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12738
2012-07-13 13:21:11 +00:00
Philippe Waroquiers
096ad47ee9 Fix bug in leak search when an ignore range is specified
The leak search verifies if an address scanned is in a fully
unaddressable secondary map (64 Kb).
However, the function checking that wrongly verifies
if the address is in an ignore range.
So, if the scan encounters one or more bytes in an ignore
range, the leak scan will erroneously skip the rest of 
the 64Kb chunk.

The solution is to not test for ignore range in the function
MC_(is_within_valid_secondary) :
The fact that the address is in an ignore range is in any case
verified in the call to MC_(is_valid_aligned_word), which
is called for every Word just after.

This bug can cause false positive leaks in case small
ignore ranges are specified.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12734
2012-07-11 23:06:07 +00:00
Julian Seward
e08776c783 RM: Implement QADD and QSUB (valgrind side fixes). Fixes #286917.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12727
2012-07-11 13:20:58 +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
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