11485 Commits

Author SHA1 Message Date
Florian Krohm
fee9b3cc76 Update list of ignored files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14975
2015-03-03 14:58:29 +00:00
Florian Krohm
1f8ced27c3 Produce a user message in case of stack overflow.
Change VG_(extend_stack) and VG_(am_extend_into_adjacent_reservation_client)
accordingly. 
Remove some redundant checking.
Add testcase.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14974
2015-03-03 14:56:17 +00:00
Florian Krohm
3f8cb6aae5 Update a comment. Apparently the code was refactored at some point...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14973
2015-03-02 21:10:46 +00:00
Rhys Kidd
2e241b4011 Fix missing libobjc suppressions on OS X 10.10
bz#344702
- Update darwin14.supp suppressions
- Includes malloc_zone_malloc and malloc related issues in system libraries

Before

== 585 tests, 256 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After

== 585 tests, 240 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14972
2015-03-01 13:22:21 +00:00
Florian Krohm
6bf346491b Change the testcase such that the output matches the intended output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14971
2015-03-01 09:36:54 +00:00
Rhys Kidd
7e19b559a3 Fix suppression for pthread_rwlock_init on OS X 10.10
bz#344686
- Update darwin14.supp to match prior OS X versions

Before

== 585 tests, 257 stderr failures, 23 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After

== 585 tests, 256 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14970
2015-03-01 01:35:59 +00:00
Florian Krohm
d485eed8e0 Fix a few compiler warnings issued by clang 3.6.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14969
2015-02-28 09:22:09 +00:00
Rhys Kidd
c31c62f916 Fix memcheck/tests/err_disable4 test on OS X
bz#344621
- Unnamed semaphores are not supported on OS X, must use named semaphores.
- To use named semaphores sem_open() instead of sem_init() utilised.
- Test case updated accordingly across all platforms.

Before:

== 586 tests, 240 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

After:

== 586 tests, 239 stderr failures, 22 stdout failures, 0 stderrB failures, 0 stdoutB failures, 31 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14968
2015-02-27 11:34:07 +00:00
Florian Krohm
eb4228077a Simplify do_brk
- remove redundant asserts
- let VG_(am_extend_into_adjacent_reservation_client) worry about
  - whether delta is too large
  - whether the segment abutting this one exists and is a reservation
    segment
  The function already checks these things. No need to do it again here.
- do_brk does not need to know that a reservation segment must not
  shrink beyond a single page. That detail ought to be hidden in
  the address space manager.
Also, turn a few conditions into asserts.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14967
2015-02-26 21:48:19 +00:00
Florian Krohm
ec19425185 Include pub_core_aspacemgr.h only where needed.
Also fixes BZ #344235.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14966
2015-02-26 17:48:07 +00:00
Florian Krohm
f8a625781c Change the prototype of VG_(am_extend_into_adjacent_reservation_client)
to match VG_(am_extend_map_client) for consistency.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14965
2015-02-26 16:07:12 +00:00
Mark Wielaard
5fa9a30cea Bug #344318 socketcall should wrap recvmmsg and sendmmsg
Some architectures, e.g. s390, don't have dedicated recvmmsg and sendmmsg
system calls, but use the socketcall multiplexing system call with
SYS_RECVMMSG or SYS_SENDMMSG (just like the accept4 systemcall can also
be called through socketcall). Create separate helpers for recvmmsg and
sendmmsg helpers that can be used by either the direct syscall or the
socket call.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14964
2015-02-25 14:00:14 +00:00
Florian Krohm
d59ebddc38 Change VG_(am_extend_map_client) as follows:
- Tighten up on asserts
- Simplify; as the function grows memory into a free segment, there
  cannot possibly be any translations to be discarded. Free segments
  do not have translations. sane_NSegment will make sure.
- Change the prototype to take in the start address of the mapping and
  return a pointer to the resized segment. Previously, the code 

   ok = VG_(am_extend_map_client)( &d, old_seg, needL );
   if (!ok)
      goto eNOMEM;
   VG_TRACK( new_mem_mmap, needA, needL, 
                           old_seg->hasR, old_seg->hasW, old_seg->hasX,

  was examining old_seg->hasR etc even though VG_(am_extend_map_client)
  stated that *old_seg was invalid after the function returned.
  That wasn't exactly a problem, but clearly looked wrong.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14963
2015-02-25 10:06:06 +00:00
Florian Krohm
12401cdc41 Add a comment explaining why there are only 3 emulation warnings
and not 4 as one would expect. 
Update the .exp file to show correct line numbers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14962
2015-02-24 18:11:01 +00:00
Florian Krohm
f029054493 Update opcode list following VEX r3092.
Add an assertion to trigger a compile time error in case this
happens again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14961
2015-02-24 17:17:19 +00:00
Julian Seward
91f48cdcb7 arm64: enable test cases for conversion instructions which are
in fact implemented at this point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14960
2015-02-24 13:24:52 +00:00
Julian Seward
fbf8cd3a46 Handle new IROps added in vex r3092:
Iop_RecipStep64Fx2, Iop_RSqrtStep64Fx2 
Iop_RSqrtEst64Fx2,  Iop_RecipEst64Fx2 
Iop_RecpExpF64,     Iop_RecpExpF32 
 --This line, and those below, will be ignored--

M    memcheck/mc_translate.c


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14959
2015-02-24 12:24:35 +00:00
Julian Seward
0362e68ec4 arm64: enable test cases for
FRECPS  d_d_d, s_s_s 
FRSQRTS d_d_d, s_s_s 
FRECPE  d_d, s_s 
FRSQRTE d_d, s_s 
FRECPX  d_d, s_s 
FRECPS  2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
FRSQRTS 2d_2d_2d, 4s_4s_4s, 2s_2s_2s 
FRECPE  2d_2d, 4s_4s, 2s_2s 
FRSQRTE 2d_2d, 4s_4s, 2s_2s 
 --This line, and those below, will be ignored--

M    none/tests/arm64/fp_and_simd.c
M    none/tests/arm64/fp_and_simd.stdout.exp


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14958
2015-02-24 12:21:26 +00:00
Florian Krohm
e1b0a8e30d Fix an off-by-one error - this time, do it right.
A segment with start == end is not empty.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14957
2015-02-24 11:23:51 +00:00
Florian Krohm
7bd3d1e798 Revert r14954. If the end of a segment is 0xfffff.....fffff
then end + 1 == 0 and any start address will be >= end.
Think some more.....


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14956
2015-02-23 21:56:16 +00:00
Christian Borntraeger
3f384a5c94 Fix configure for Linux kernel >= 4.0-rc1
In addition raise the minimal Linux version to 2.6 as there is almost
no test coverage for 2.4 and 2.6 was released in 2003.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14955
2015-02-23 20:19:03 +00:00
Florian Krohm
8d088fa71e Fix an off-by-one error. A segment with start == end is not
empty.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14954
2015-02-23 19:57:12 +00:00
Julian Seward
6920a29c98 Stop gcc -Og complaining (incorrectly) about filessize being used
uninitialised.  No functional change.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14953
2015-02-23 13:58:55 +00:00
Rhys Kidd
4094895ed6 Fix bz#343523, OS X mach_ports_register: UNKNOWN task message [id 3403, to mach_task_self(), reply 0x30f]
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14952
2015-02-22 00:42:52 +00:00
Rhys Kidd
f3c4b1a67a Fix OS X 10.10 (Yosemite) - missing system calls and fcntl code, courtesy of Bill Zissimopoulos
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14951
2015-02-21 12:24:18 +00:00
Florian Krohm
3e53930ad0 Update a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14950
2015-02-20 16:46:50 +00:00
Florian Krohm
00ffec50e5 Pass in a mask of segment kinds to VG_(get_segment_starts)
and VG_(am_get_segment_starts) to indicate which segments
should be collected. That should solve the following problem:
in m_main.c we used to:

      seg_starts = VG_(get_segment_starts)( &n_seg_starts );

      for (i = 0; i < n_seg_starts; i++) {
         Word j, n;
         NSegment const* seg 
            = VG_(am_find_nsegment)( seg_starts[i] );
         vg_assert(seg);
         if (seg->kind == SkFileC || seg->kind == SkAnonC) {

         ...
         // ... dynamic memory allocation for valgrind
         ...
      }

This caused the vassert(seg) to fire because the dynamic memory
allocation further down the loop changed segments such that a 
valgrind segment which used to be non-SkFree suddenly became 
SkFree and hence VG_(am_find_nsegment) returned NULL. Whoom.

With this revision we only collect the segments we're really
interested in. For the example above that is all client segments.
So if V allocates memory -- fine. That will not change the layout
of client segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14949
2015-02-20 14:00:23 +00:00
Julian Seward
38adfae0a0 canonicaliseSymtab: fix silly logic that could cause the function to
loop forever.  In particular, it will do that when two symbols have
exactly the same address range but differ in their .isText attribute.
Fixes #342117.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14948
2015-02-20 12:29:59 +00:00
Josef Weidendorfer
9b43616636 Fix Bug #344314 callgrind_annotate ... commands containing newlines
Escape newlines in command arguments for "cmd:" header field in dumps
We could do unescaping in callgrind_annotate, but a escaped command
even seems better there.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14947
2015-02-18 16:28:58 +00:00
Julian Seward
199646a9cd Correctly handle prctl(VKI_PR_SET_PTRACER, ..) so as to avoid false
positives (eg when running Wine).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14946
2015-02-18 15:46:19 +00:00
Julian Seward
31f23d7028 Messaging cleanup for the PDB reader. No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14945
2015-02-18 15:38:25 +00:00
Mark Wielaard
795a4f2d37 Bug #344307 2 unhandled syscalls on aarch64/arm64: umount2(39), mount (40)
Reporter: Branislav Blaskovic, bblaskov@redhat.com
Patch: Robin Hack, rhack@redhat.com
Test: Miloš Prchlík, mprchlik@redhat.com

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14944
2015-02-18 14:23:17 +00:00
Julian Seward
c6a9c7a38d For PDB stats printing, don't print the number of inl-info records,
since it's always zero.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14943
2015-02-18 12:58:56 +00:00
Julian Seward
a348c314d7 Improve string table reading for MSVC2010 compiled code. Also seems
to help with MSVC2013 compiled code.  Variant of a patch from
Mark Browning (mabrowningrr@gmail.com).  Fixes #211529.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14942
2015-02-18 12:57:06 +00:00
Florian Krohm
22d7bf79ad Update a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14941
2015-02-17 21:51:53 +00:00
Mark Wielaard
06a9351cd8 Bug #344295 syscall recvmmsg on arm64 (243) and ppc32/64 (343) unhandled
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14940
2015-02-17 19:50:45 +00:00
Mark Wielaard
6951c3aba9 Bug #344279 syscall sendmmsg on arm64 (269) and ppc32/64 (349) unhandled.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14939
2015-02-17 16:04:09 +00:00
Julian Seward
3aa09eb3bf ML_(find_name_of_pdb_file): bit a bit more careful when grepping the
output from /usr/bin/strings, so as to not get confused by substrings
".pdb" and ".PDB" when they don't appear at the end of a line.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14938
2015-02-17 13:46:26 +00:00
Florian Krohm
09b7e14ba9 Update comment for VG_(am_find_nsegment) to match the code.
Likewise for VG_(am_next_nsegment). Also make the code similar to
VG_(am_find_nsegment) for easier comprehension.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14937
2015-02-16 23:04:53 +00:00
Florian Krohm
798e5a7707 Translations are allowed from all client segments. Update comments
and rename VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC) to 
VG_(am_set_segment_hasT_if_client_segment). Change it so it handles
all client segments.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14936
2015-02-16 22:58:30 +00:00
Florian Krohm
7f6f4f0a01 Update a few comments.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14935
2015-02-16 22:29:03 +00:00
Florian Krohm
071d18df06 Document the --max-threads command line option.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14934
2015-02-16 21:55:52 +00:00
Florian Krohm
797f339875 Misc tweaks in segAddr_to_index:
(1) It is always invalid for the incoming segment pointer to be
    out of range. Assert that.
(2) Let the compiler do the address arithmetic. They're good at that
    and therefore:
(3) No asserts needed to check the result.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14933
2015-02-14 21:17:46 +00:00
Florian Krohm
d47181fd7d Add command line flag --max-threads=<integer> to increase the number of
threads that valgrind can handle. No recompile is needed. 
Part of fixing BZ #337869.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14932
2015-02-13 19:08:26 +00:00
Florian Krohm
cf6190cb37 More use of LibVEX_GUEST_STATE_ALIGN.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14931
2015-02-13 17:05:57 +00:00
Florian Krohm
493dd569d2 Use LibVEX_GUEST_STATE_ALIGN introduced in VEX r3091.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14930
2015-02-13 16:26:44 +00:00
Julian Seward
b4287f205a arm32-linux: for the magic-call CALL_FN_* macros, add r12 to the asm
trash list.  Not doing so was causing r12 to get corrupted by the
called function, which lead to some very strange failures in Helgrind
on arm32.  Fixes #344033.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14929
2015-02-11 19:46:27 +00:00
Julian Seward
1fe042b6eb arm32-linux: GET_STARTREGS has always been wrong on this target,
confusing SP and LR and resulting in no backtraces during internal
assertion failures etc on this platform.  Fixes #343219.  Noticed by
dimitry@google.com.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14928
2015-02-11 00:49:45 +00:00
Julian Seward
e0297b57d8 arm32: local_sys_write_stderr and local_sys_getpid: don't trash r7
in the inline assembly, because gcc doesn't like that when compiling
for Thumb.  And this file is compiled for Thumb during "make check".


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14927
2015-02-11 00:41:48 +00:00
Mark Wielaard
0279de2d80 Bug #344007 accept4 syscall unhandled on arm64 (242) and ppc64 (344)
ppc64 might fall back to socketcall in some cases, but arm64 always uses
accept4 syscall directly. Some (confusing) background on when/how glibc
(wrongly) decides to use a direct accept4 or the socketcall system call:
https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14926
2015-02-10 13:39:04 +00:00