Commit Graph

10402 Commits

Author SHA1 Message Date
Dejan Jevtic
c8fdf5eb67 mips32: Fix typo.
Fix some typo error and some errors in tests that was discovered while running Valgrind on MIPS/Android.
In some cases initial FCSR value wasn't being set properly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13746
2013-12-05 14:05:25 +00:00
Bart Van Assche
5c25fb0a1c Helgrind: Suppress false positive reports on _dl_allocate_tls_init()
Reported-by: Dejan Jevtic <dejan.jevtic@rt-rk.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13745
2013-12-02 15:13:05 +00:00
Philippe Waroquiers
deafe374ca Decrease helgrind memory use for applications allocating many blocks
Use a pool allocator for the MallocMeta struct that helgrind maintains
for each client allocated block.

For perf/heap on x86, this decreases the max amount of mmap-ed memory
for the core area from 56Mb to 36Mb.
On amd64, decreases from 104Mb to 62Mb.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13744
2013-12-01 19:28:48 +00:00
Philippe Waroquiers
b8ed3a5b65 Fix 326462 Refactor vgdb to isolate invoker stuff into separate module
vgdb.c contained (conditionally compiled) "invoker" code to have ptrace syscalls
used to allow gdb/vgdb to connect to a valgrind process blocked in a syscall.
This "invoker" code is ptrace based.
Not all platforms are using ptrace.
=> refactor vgdb so as allow invoker code to be added more cleanly
for non ptrace based platforms (e.g. Darwin, Solaris).

* add file vgdb.h for:
   - definition of the vgdb-invoker interface
   - common declarations between vgdb.c and vgdb-invoker implementations
* move ptrace related code from vgdb.c to new file vgdb-invoker-ptrace.c
* new file vgdb-invoker-none.c containing an empty invoker implementation
  used on platforms that do not (yet) have a invoker implementation
  (e.g. android and darwin).
* modified Makefile.am to use one of the vgdb-invoker-*.c file depending
  on the platform.
* small changes related to changing ptraceinvoker to invoker in various files:
  gdbserver_tests/make_local_links, gdbserver_tests/nlcontrolc.vgtest,
  gdbserver_tests/mcinvokeRU.vgtest, gdbserver_tests/nlsigvgdb.vgtest  
  gdbserver_tests/mcinvokeWS.vgtest, coregrind/m_gdbserver/README_DEVELOPERS

Patch from Ivo Raisr, slightly modified



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13743
2013-12-01 14:56:28 +00:00
Philippe Waroquiers
e9b6e1c9be Move bug fix announcement to the FIXED BUGS section
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13742
2013-12-01 14:51:21 +00:00
Bart Van Assche
4f909dddf7 NEWS: Mark #328205 as fixed
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13741
2013-12-01 12:59:32 +00:00
Philippe Waroquiers
8ec5ebb995 Announce bug fixed for several bugs in NEWS
fixed in r13709 326983  Clear direction flag after tests on amd64.
fixed in r13712 327238  Callgrind Assertion 'passed <= last_bb->cjmp_count' failed
fixed in r13715 327837  dwz compressed alternate .debug_info and .debug_str not read correctly
fixed in r13718 327916  DW_TAG_typedef may have no name



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13740
2013-12-01 12:52:00 +00:00
Philippe Waroquiers
9f3d49a562 Create 3.10.0 section in NEWS, add (first draft of) README_DEVELOPERS_processes
* add the new sections for next 3.10.0 release in NEWS.
* add file README_DEVELOPERS_processes.

As discussed on valdev and documented in README_DEVELOPERS_processes,
the idea is to document fixed bugs or new features in NEWS together
with the commit fixing/implementing these.

Looking at SVN, the below bugs should be added in 3.10.0 fixed bugs.
I will add them in NEWS shortly.

Thanks

Philippe


r13709 | tom | 2013-11-01 11:46:28 +0100 (Fri, 01 Nov 2013) | 2 lines

Clear direction flag after tests on amd64. BZ#326983.

r13712 | weidendo | 2013-11-12 16:32:58 +0100 (Tue, 12 Nov 2013) | 17 lines

Fix bug 327238.

 assertion failure in Callgrind: bbcc.c:585 (vgCallgrind_setup_bbcc):
 Assertion 'passed <= last_bb->cjmp_count' failed

r13715 | mjw | 2013-11-20 12:54:38 +0100 (Wed, 20 Nov 2013) | 5 lines

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.

r13718 | mjw | 2013-11-24 18:19:35 +0100 (Sun, 24 Nov 2013) | 5 lines

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@13739
2013-12-01 12:42:30 +00:00
Bart Van Assche
b6afe8ce21 xen: Implement XEN_DOMCTL_set_max_evtchn
This is new in Xen 4.4.

From: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13738
2013-12-01 10:59:07 +00:00
Bart Van Assche
9b1fe961a5 xen: XEN_SYSCTL_debugkeys hypercall
From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13737
2013-12-01 10:58:38 +00:00
Bart Van Assche
44e8025b78 xen: XEN_SYSCTL_readconsole hypercall
From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13736
2013-12-01 10:58:11 +00:00
Bart Van Assche
182bf544af xen: XEN_DOMCTL_shadow_op hypercall
And some of the sub-subops.  It is a little hacky given the legacy way of
having several methods of enabling/disbling LOG_DIRTY mode.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13735
2013-12-01 10:57:43 +00:00
Bart Van Assche
b9a87170d6 xen: XEN_DOMCTL_sethvmcontext hypercall
Xen reads 'num' and 'array' from the structure, and reads the entire buffer.
Nothing gets written back.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13734
2013-12-01 10:57:14 +00:00
Bart Van Assche
7447bdac9b xen: XEN_DOMCTL_getpageframeinfo3 hypercall
Xen reads 'num' and the 'array' pointer from ARG1, and proceeds to read and
modify-in-place the entire userspace array.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13733
2013-12-01 10:56:28 +00:00
Bart Van Assche
c798ab2b61 xen: XEN_DOMCTL_gethvmcontext hypercall
The semantics of XEN_DOMCTL_gethvmcontext are little interesting.

If the 'buffer' field of the structure is NULL, the hypercall is a request for
the required buffer size, which written into the 'size' paramater.

If 'buffer' is non NULL, Xen will write to the buffer, and update 'size' with
the amount of data written.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13732
2013-12-01 10:55:54 +00:00
Bart Van Assche
fc2f8ac0e0 xen: XENMEM_remove_from_physmap hypercall
Xen reads the entire structure and writes nothing.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13731
2013-12-01 10:55:13 +00:00
Bart Van Assche
2bd24b6ef5 xen: XENMEM_add_to_physmap hypercall
Xen reads the entire structure, and if the space is _gmfn, will write the
structure back

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13730
2013-12-01 10:54:42 +00:00
Bart Van Assche
7f1b1eb0fb xen: XENMEM_machphys_mfn_list hypercall
The XENMEM_machphys_mfn_list implementation reads 'max_extents' and
'extents_start'.  It writes to the array at 'extents_start', and writes the
number of extents written into the 'nr_extents' field.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13729
2013-12-01 10:54:06 +00:00
Bart Van Assche
8d61cb581e xen: XENMEM_maximum_gpfn hypercall
Xen reads a 16 bit domid from the pointer provided in ARG2, but does not write
anything back.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13728
2013-12-01 10:53:34 +00:00
Bart Van Assche
3e4e3ebac0 xen: XENMEM_maximum_ram_page hypercall
Xen does not read or write any memory for this hypercall

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13727
2013-12-01 10:53:05 +00:00
Bart Van Assche
b848d83815 xen: Infratructure for XEN_TMEM_* hypercalls
and an implementation of XEN_TMEM_control save_begin.

Xen will read various fields at various time, but write nothing back for a
save_begin subop.

From: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13726
2013-12-01 10:52:22 +00:00
Bart Van Assche
bbbdd846be xen: Fix XEN_SYSCTL_getdomaininfolist for version 0xa
From: Andrew Cooper <andrew.cooper3@citrix.com>

Also add a default case so future bumps of the sysctl interface version dont
result in spurious passes of the IOCTL handler.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13725
2013-12-01 10:51:19 +00:00
Julian Seward
e2bff1c182 Merge the following revisions from 3_9_BRANCH to trunk:
r13682  Initial cut at 3.9.0 release notes.
r13683  Remove duplicate NEWS entries for 3.9.0.
r13689  Minor docs/NEWS fixes
r13690  Documentation updates for 3.9.0.
r13691  More documentation updates, re leak-checker changes
r13692  NEWS: Note increased max mem size.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13724
2013-11-29 23:08:28 +00:00
Julian Seward
ee95729330 Merge r13704 from 3_9_BRANCH (Fix compile problem in
memcheck/tests/reach_thread_register.c)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13723
2013-11-29 16:57:29 +00:00
Julian Seward
5cd3d03083 Merge r13703 rom 3_9_BRANCH (Add Maran Pakkirisamy.)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13722
2013-11-29 16:55:04 +00:00
Bart Van Assche
84a7cef749 memcheck/tests/origin5-bz2: Add a regression test output file variant
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13721
2013-11-25 07:25:51 +00:00
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