Commit Graph

9474 Commits

Author SHA1 Message Date
Philippe Waroquiers
9f4932eeec Document Helgrind limitation that old access stack traces have maximum 8 entries
#define N_FRAMES 8
(defined in libhb_core.c:3888)

implies that 'other thread' stack traces are limited to 8,
even with a bigger --num-callers.

=> document this in the manual to avoid that a user believes this is a
bug in the stack trace logic of Valgrind.




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12767
2012-07-20 23:40:35 +00:00
Julian Seward
b3d571d1d8 If the compiler being used to build is clang, remember to add
-new_linker to the stuff given to the linker, else link failures
result on x86.  Based on a suggestion by Christoph Erhardt.  Fixes
#295427.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12766
2012-07-20 16:46:54 +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
c57d56c01b Add macros for "convert unicode" insns.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12764
2012-07-19 23:29:06 +00:00
Florian Krohm
3bce85fd9f Fix syntax error
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12763
2012-07-19 18:16:49 +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
Petar Jovanovic
2d29e458d5 Include news about supporting MIPS32/Linux in NEWS file.
PLATFORM CHANGES section has been appended with news for MIPS32/Linux support.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12761
2012-07-19 15:54:02 +00:00
Petar Jovanovic
3acf4e19d3 exp-sgcheck is not supported for MIPS architecture.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12760
2012-07-19 15:40:48 +00:00
Florian Krohm
e78d930a09 Enable testing for the ETF3 facility.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12759
2012-07-19 14:35:55 +00:00
Philippe Waroquiers
964de45da8 Fix 303624 segmentation fault on Android 4.1 (e.g. on android emulator or Galaxy Nexus OMAP)
Valgrind was crashing systematically on Android 4.1.
This crash is caused by AT_IGNORE-ing AT_BASE.
This AT_IGNORE was needed to have breakpoints in shared libs
be handled properly (not very clear what is the problem
in the interaction between Valgrind GDBSERVER, AT_BASE and GDB).
Waiting to better understand all this, as a temporary bypass,
this patch ensures we do not ignore the AT_BASE on android.

The possible consequence is that breakpoints might be inserted
by the Valgrind gdbserver at wrong addresses in shared lib.
(any feedback on that is welcome).

Valgrind was build and then "proved" to work on Android emulator 4.0
and emulator 4.1, by using memcheck on one executable.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12758
2012-07-18 23:01:02 +00:00
Philippe Waroquiers
d861050c71 Be slightly less precise on the leak check perf. improvement in NEWS
(as this 40% is only a measurement of one perf program on amd64).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12757
2012-07-18 22:36:37 +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
Philippe Waroquiers
0dcfe28c77 Small cleanup: use VG_TRACK (when possible) to call tool tracking functions
(spotted by Julian)
Note: there is a second occurence of call to track_post_mem_write in the
same file; but this second occurence is better done with an "if".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12755
2012-07-18 20:33:40 +00:00
Julian Seward
72f43a1329 Un-break the build on MacOS, following r12742 (initial support for DWZ
compressed debuginfo).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12754
2012-07-18 10:47:38 +00:00
Julian Seward
14162b7154 Track recent bug fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12753
2012-07-16 22:39:24 +00:00
Petar Jovanovic
e24ea886e5 Add some missing syscall numbers for MIPS.
The header file has been extended with the missing syscall numbers for MIPS,
and sys_prlimit64 has been enabled. This will make none/tests/rlimit64_nofile
pass.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12752
2012-07-16 14:35:26 +00:00
Petar Jovanovic
27fdf23181 Conditionally execute tests depending on revision of MIPS architecture.
Support has been added to the tests for MIPS32 revision 1. Previously, all the
tests had to be compiled for MIPS32r2 platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12751
2012-07-16 14:07:47 +00:00
Julian Seward
57c1e52b2d Add tests for MOVBE -- an Intel-Atom-only instruction
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12750
2012-07-16 08:23:26 +00:00
Florian Krohm
e38f0a220e Before printing a back-trace make sure that page containing the
address stored in the stack pointer is mapped. Fixes a corner case.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12749
2012-07-15 01:31:45 +00:00
Julian Seward
b3d96945ad Add expected outputs for VCMPNGESS. Should have been included in r12745.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12748
2012-07-14 19:47:32 +00:00
Florian Krohm
ee3b6efc6c Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12747
2012-07-14 14:58:19 +00:00
Florian Krohm
8c5e6d6f28 Update list of ignore files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12746
2012-07-14 14:51:01 +00:00
Julian Seward
3823586a6f Add test case for VCMPNGESS.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12745
2012-07-14 14:31:44 +00:00
Julian Seward
058ab42645 Update with recent fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12744
2012-07-14 10:08:40 +00:00
Julian Seward
0efee1b47a Accept glibc-2.16 as valid (UNTESTED).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12743
2012-07-14 10:07:06 +00:00
Julian Seward
a3cd78a1e2 Initial support for DWZ compressed debuginfo -- don't crash, at least,
when reading it.  Bug 302901 comment 3.  (Jakub Jelinek, jakub@redhat.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12742
2012-07-14 09:59:01 +00:00
Florian Krohm
8b1923a195 Fix ppCfiReg for s390 so --trace-cfi=yes no longer asserts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12741
2012-07-13 17:55:36 +00:00
Julian Seward
c3f41bc3ed Update w/ recent bug fixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12740
2012-07-13 14:04:03 +00:00
Julian Seward
f97a316e03 Fix loading of large Mach-O thin binaries. Bug #289470.
(Scott Byer, scottbyer@chromium.org)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12739
2012-07-13 13:34:31 +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
Julian Seward
620ac73938 Add ioctl wrappers for "Linux user input device". Fixes #296229.
(Chase Douglas, chase.douglas@canonical.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12737
2012-07-13 13:15:10 +00:00
Julian Seward
e2054f710e Clean up the PDB reader somewhat, mostly in the area of biasing.
#296318 comment 9.  (Jiri Hruska, jirka@fud.cz)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12736
2012-07-13 12:58:55 +00:00
Julian Seward
989f74ff0d Allow multiple rw and rx mappings in the ELF debuginfo reader.
Fixes #296318 (patch on comment 8).  (Jiří Hruška, jirka@fud.cz)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12735
2012-07-13 11:24:05 +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
73bed921ca Add tests for SMMUL{R}, both ARM and Thumb encodings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12733
2012-07-11 16:58:59 +00:00
Tom Hughes
a3c57c513c Update bug status.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12732
2012-07-11 15:42:25 +00:00
Tom Hughes
0c6ef68494 Wire up four more system calls on arm, based on patch
from William Cohen. Fixes BZ#295617.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12731
2012-07-11 15:38:29 +00:00
Tom Hughes
dd70fc4248 Add support for the SIOCSHWTSTAMP ioctl, based on a patch
from Arseny Solokha. Fixes BZ#296792.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12730
2012-07-11 14:33:10 +00:00
Julian Seward
11f12ec05c Note 286917 fix.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12729
2012-07-11 14:28:13 +00:00
Tom Hughes
0f1fdb8f37 Wire up dup3 on arm. Fixes BZ#299629.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12728
2012-07-11 13:54:04 +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
Tom Hughes
b53fdb8ea7 Add support for the CDROM_GET_CAPABILITY ioctl based on patch
from Nick Black. Fixes BZ#302827.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12726
2012-07-11 12:02:06 +00:00
Julian Seward
c37b405fc3 Note 290006 fixage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12725
2012-07-11 00:06:35 +00:00
Philippe Waroquiers
2b25e3f059 remove 302800 (bug invalid and/or covered by --soname-synonyms)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12724
2012-07-07 15:53:26 +00:00
Philippe Waroquiers
a059322c40 remove 301204 (already in NEWS fixed section)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12723
2012-07-07 15:44:06 +00:00
Bart Van Assche
e744067f88 none/tests/ifunc: Only run this test if the "ifunc" executable has been built
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12722
2012-07-07 06:13:55 +00:00
Philippe Waroquiers
74bc30c150 295590 Helgrind: Assertion 'cvi->nWaiters > 0' failed when cond var being waited upon destroyed
* when cond var is destroyed, in the PRE, report an error if nwaiters > 0.
* when cond_wait succeeds, get the cond var but do not create one in helgrind
  (it must exist if cond_wait was done).
  Report an error if cond not found (assuming this is caused by a destroy
  done while the thread was cond_wait-ing).
* added a test


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12721
2012-07-06 23:38:24 +00:00
Philippe Waroquiers
831cddf0a1 fix 303127 Power test suite fixes for frsqrte, vrefp, and vrsqrtefp instructions
The frsqrte and vrefp instructions produce an approximate result.
According to the ISA document for the POWER processor, the result will
vary in its precision for different processor implementations.  This patch
fixes the masks to be applied to the results to remove the variability
in the results.  The expected output files are also updated to reflect the
change in the result given the new masking of the result.

patch from Carl Love <cel@us.ibm.com>



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12720
2012-07-06 22:52:09 +00:00
Philippe Waroquiers
2254b8ab60 fix 303116 - Add support for the POWER instruction popcntb (Valgrind side)
patch from carll@us.ibm.com


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12719
2012-07-06 21:59:03 +00:00
Philippe Waroquiers
4160fb96ff fix 302918 Enable testing of the vmaddfp and vnsubfp instructions in the testsuite
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12718
2012-07-06 21:42:14 +00:00