10376 Commits

Author SHA1 Message Date
Bart Van Assche
083723080c memcheck/tests/strchr: Add a regression test output variant
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13720
2013-11-25 06:46:45 +00:00
Bart Van Assche
39c447e4a9 Merge mc_replace_strmem.c, hg_intercepts.c and drd_strmem_intercepts.c
Move memcheck/mc_replace_strmem.c to shared/vg_replace_strmem.c and
add several intercepts for SSE-variants. Include that source file from
drd/drd_strmem_intercepts.c, helgrind/hg_intercepts.c and
memcheck/mc_replace_strmem.c.

Merge memcheck/tests/filter_memcpy into tests/filter_stderr_basic.
    
Update tests/check_headers_and_includes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13719
2013-11-24 17:48:13 +00:00
Mark Wielaard
98a63bf1d4 Bug 327916 - DW_TAG_typedef may have no name
We already accepted DW_TAG_typedef without a name for Ada. But g++ for
OpenMP can also emit such nameless DW_TAG_typedefs. Just accept them.
Also fix up anonymous enum and typedef printing in tytypes.c.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13718
2013-11-24 17:19:35 +00:00
Bart Van Assche
04252a5172 memcheck/mc_replace_strmem.c: Remove trailing whitespace
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13717
2013-11-23 16:41:54 +00:00
Bart Van Assche
38c8815567 memcheck: Optimize the memcpy() intercept
This change reduces the time needed to run the memcheck regression tests
with 2% on my development system.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13716
2013-11-23 15:48:12 +00:00
Mark Wielaard
e622570ce0 dwz compressed alternate .debug_info and .debug_str not read correctly.
Bug #327837. The buildid from the .gnu_debugaltlink section was parsed
incorrectly (from the wrong offset). Causing the debug alt file not to
be found.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13715
2013-11-20 11:54:38 +00:00
Bart Van Assche
ac63f15b07 tests/check_headers_and_includes: Use File::Basename
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13714
2013-11-17 10:06:09 +00:00
Dejan Jevtic
b4adb1bc50 mips32/64: Test case for VEX r2799.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13713
2013-11-14 15:45:26 +00:00
Josef Weidendorfer
84b48d7742 Fix bug 327238.
assertion failure in Callgrind: bbcc.c:585 (vgCallgrind_setup_bbcc):
 Assertion 'passed <= last_bb->cjmp_count' failed

Background:
We want to detect the jump behavior of code, that is, the side exit
from a SB, as there can be many. For that, instrumented code writes
the exit number into a global variable (jmps_passed) before an eventual
exit.

With an exception happening in the first few instructions of an SB,
jmps_passed never was written, and still contained an old value. This
got saved/restored around the exception handler, and resulted in the
failed assertion.
Solution: always initialize jmps_passed to zero in setup_bbcc(), which
is called at the beginning of every SB.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13712
2013-11-12 15:32:58 +00:00
Christian Borntraeger
dd808ba8b0 add testcase for the rotate and (insert/or/and/xor) family of
instructions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13711
2013-11-08 09:45:12 +00:00
Tom Hughes
9887050b08 Clear direction flag after tests on amd64. BZ#326983.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13709
2013-11-01 10:46:28 +00:00
Dejan Jevtic
c8213ce37a mips32/64: Fix the problem with cacheflush on mips platforms.
On mips platforms the second cacheflush parameter is the number
of bytes in cache that needs to be flushed. When we are discarding
translation we need to use this number instead of:
((ULong) ARG2) - ((ULong) ARG1) + 1ULL
This patch also include syscall wrapper for __NR_sigaction on mips32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13707
2013-10-31 16:58:31 +00:00
Bart Van Assche
e8ec2e8d5e drd: Add three additional strncpy() and strncmp() intercepts (#326816)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13706
2013-10-29 20:49:16 +00:00
Bart Van Assche
29032f4b6e drd: Add strncpy() and strncmp() intercepts (#326816)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13705
2013-10-29 17:16:47 +00:00
Petar Jovanovic
e58b7c43e4 mips64: add missing headers to EXTRA_DIST
make dist will not copy header files if they are not explicitly listed
in EXTRA_DIST. This change adds missing header files from none/test/mips64.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13701
2013-10-27 16:10:26 +00:00
Bart Van Assche
a28e837b3a drd/tests: Update Subversion ignore list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13700
2013-10-25 19:45:32 +00:00
Bart Van Assche
906cc893d5 drd: Add strstr() intercept (#326623)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13699
2013-10-25 16:51:21 +00:00
Bart Van Assche
12a1867bda drd: Add range support for --ptrace-addr
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13698
2013-10-25 14:26:14 +00:00
Bart Van Assche
d8d62e85f5 drd: Add a test for the strmem intercepts
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13697
2013-10-25 12:30:46 +00:00
Bart Van Assche
635f963b8c drd: Add strrchr(), memchr(), memrchr() and memcmp() intercepts (#326623)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13696
2013-10-25 12:08:36 +00:00
Bart Van Assche
1b09dba092 drd: Add stpcpy() intercept (#326436)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13694
2013-10-24 10:01:45 +00:00
Christian Borntraeger
50b6a83ce8 We need to have the host code close to the generated code to improve
branch prediction performance on some s390 systems. This change will
move valgrind text close to the initial aspace start for valgrind
allocations.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13688
2013-10-23 16:23:30 +00:00
Dejan Jevtic
8eec882079 mips32: Change the tests values so that the result is
the same on all mips32 platforms. Add extra cases in 
vbit-test for mips32.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13687
2013-10-23 14:07:15 +00:00
Bart Van Assche
af6922c039 drd: Add additional strchr(), strcpy() and strcmp() intercepts (#326436)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13686
2013-10-23 13:09:10 +00:00
Dejan Jevtic
007794399e mips32: Delete unused empty files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13685
2013-10-23 13:08:10 +00:00
Dejan Jevtic
a14c3ea5b7 mips32: Update Subversion ignore lists.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13684
2013-10-23 12:59:17 +00:00
Bart Van Assche
6b1755cb5b Update Subversion ignore lists
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13681
2013-10-23 12:40:27 +00:00
Bart Van Assche
86ed37d6f5 drd/tests: Add std_list and std_string test programs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13680
2013-10-23 12:37:44 +00:00
Bart Van Assche
9d13fe8a66 drd: Add strchr(), strcpy(), strcmp() and memcpy() intercepts (#326436)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13679
2013-10-23 12:19:30 +00:00
Julian Seward
b75b6cc822 Add some suppresssions for leaks (really?) in dyld (the dynamic linker)
on 64-bit OSX 10.8.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13675
2013-10-22 22:41:52 +00:00
Philippe Waroquiers
14a60a028b In an inner valgrind, register the interim stack earlier
The "late" registration of the interim stack is causing false
positive non addressable memcheck errors in x86.

Registering the interim stack earlier avoids these false positive.

Note however that this is just a bypass for the problem.

I believe there is a more fundamental problem in m_stacks.c stack handling:
In case a thread is switching of stack while the new stack is not yet
registered, the stack switching code will keep the old stack as current stack,
as the stack corresponding to the new sp cannot be found.
In such a case, the zone between the old and new SP in this unknown stack
can be marked either as addressable (if unknown stack is growing)
or unaddressable (if unknown stack is shrinking).
Then at some point in time, the new stack is registered.
If just after that, the sp is changed so as to grow the stack
by nr of bytes not determinable at translation time, VG_(unknown_SP_update)
will be called, will detect the stack switch and will do nothing.
This leaves a certain zone of the stack (the grown zone) in a not
addressable state, as the stack switch code has in fact wrongly
guessed a stack switch, while in fact what should have been detected
is just a sp change in a stack previously unknown.

Proper fixes might be: 
 1. in "IF_STACK_SWITCH_SET_current_stack_AND_RETURN", do not return
    if old and new sp are in the stack stack.
    rather continue so as to execute correctly the sp change in
    the newly discovered stack.
and/or
 2. in the stack registration code (client request), if the current SP
    is inside the stack being registered, also set the current stack
    to the just registered stack pointer

None of these fixes are being looked at currently, as such changes looks
too adventurous close to 3.9.0



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13674
2013-10-22 21:20:14 +00:00
Philippe Waroquiers
cc83a01b30 fix attribution of memcheck/tests/reach_thread_register.c code
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13673
2013-10-22 17:26:06 +00:00
Julian Seward
e37bfc02f3 mc_LOADVn_slow: also allow --partial-loads-ok=yes to grant an
exemption for aligned 32 bit loads on 64 bit targets, since it appears
to be necessary.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13672
2013-10-22 15:36:59 +00:00
Julian Seward
acddb7f8b3 Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13671
2013-10-22 14:46:55 +00:00
Philippe Waroquiers
81d7bfddde Fix 324227 memcheck false positive leak when a thread calls exit+block
only reachable via other thread live register

The exiting thread will have its registers considered as not reachable
anymore, registers of other threads will be considered reachable.

This is ensured by using a different exit reason for the
exiting thread and for the other threads.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13670
2013-10-21 19:57:08 +00:00
Philippe Waroquiers
fbe834ff1a unbreak (future) Mac OS 10.9, 11.0, ... builds
Disappeared syscalls are better 
  #ifdef-ed with "< version_in_which_they_disappear"

Newly appeared syscalls are better
  #ifdef-ed with ">= version_in_which_they_appear"



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13669
2013-10-21 18:39:01 +00:00
Julian Seward
6abdeda828 Enable sys_rt_sigsuspend on ppc64-linux. Not sure why this is
necessary, but I found it lying around in a ppc64 tree, so there
was probably some use case at some point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13668
2013-10-21 10:07:43 +00:00
Philippe Waroquiers
4f7d2ae066 Two small wording fixes in manual
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13667
2013-10-20 17:12:16 +00:00
Julian Seward
da5aab648e Fix a potentially serious bug discovered by BEAM.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13666
2013-10-20 09:34:13 +00:00
Bart Van Assche
0ff9e33d1b NEWS: Add entry for bug #326091 (drd and __GI_strlen())
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13665
2013-10-20 08:25:58 +00:00
Bart Van Assche
f82cf02f0a drd: Avoid that optimized strlen() implementations trigger false positive race reports (#326091)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13664
2013-10-20 08:23:38 +00:00
Florian Krohm
4035c74f04 Remove autotools requirement as it is not specific to s390.
Minor wording changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13663
2013-10-19 08:21:19 +00:00
Bart Van Assche
0dcb9ab4dd NEWS: Add info about bugs #316181 and #316696
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13662
2013-10-19 06:43:55 +00:00
Petar Jovanovic
b926797b17 mips: update README.mips and NEWS for 3.9
Minor update to README.mips and NEWS section to state that MIPS64 support is
new in 3.9, as well as support for MIPS DSP ASE on MIPS32.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13661
2013-10-19 02:24:11 +00:00
Julian Seward
dfaedbfa9f Update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13660
2013-10-18 15:13:12 +00:00
Julian Seward
4a9b50efe7 Un-break the build on OSX 10.7.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13659
2013-10-18 14:45:29 +00:00
Julian Seward
dbf9b63605 Update copyright dates (20XY-2012 ==> 20XY-2013)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658
2013-10-18 14:27:36 +00:00
Julian Seward
682b7211e6 arm-linux only: make unwinding by stack scanning (a nasty hack)
be controllable from the command line.  Fixes (kind of) #289578.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13657
2013-10-18 13:21:26 +00:00
Mark Wielaard
e671b086cf Don't report BMI support when AVX support is missing.
Bug #326113. This is a bit conservative, but it is what the linux kernel
also seems to be doing. If AVX support is missing (because the OS doesn't
save the wide registers), then also don't report supporting BMI.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13656
2013-10-18 13:11:05 +00:00
Julian Seward
ab319a7e24 Followup to r13652 (make the translation cache size be command-line
controllable): reduce MAX_N_SECTORS to 24, speed up Sector
initialisation, wording tweaks.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13655
2013-10-18 11:18:45 +00:00