891 Commits

Author SHA1 Message Date
Mark Wielaard
7f675b0c9b BZ#331380 Syscall param timer_create(evp) points to uninitialised byte(s)
Only check struct sigevent actually used by the kernel. If SIGEV_THREAD_ID
is set check sigev_notify_thread_id, otherwise don't.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13835
2014-02-24 10:38:45 +00:00
Florian Krohm
5428b4f7a2 Bump __VALGRIND_MINOR__ to catch up with the release.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13831
2014-02-22 15:26:30 +00:00
Julian Seward
fa2ba0f61a arm64-linux: make restarting of syscalls interrupted by signals work
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13823
2014-02-20 23:18:32 +00:00
Julian Seward
61ef1c2dde Fix the ppc32 special-instruction magic sequence so it really does
preserve the value of r0, as claimed.  Fixes #278808 (Valgrind side).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13797
2014-02-10 12:26:12 +00:00
Julian Seward
3c8017fea0 VG_(bzero_inline): handle up to 12 words inline.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13772
2014-01-13 00:17:54 +00:00
Julian Seward
3f6d211236 Add support for ARMv8 AArch64 (the 64 bit ARM instruction set).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13770
2014-01-12 12:54:00 +00:00
Philippe Waroquiers
231d67347f add --vgdb-prefix arg to callgrind_control
If valgrind is started with --vgdb-prefix arg, then callgrind_control
cannot find and control this valgrind.
So, add an (optional) argument to callgrind_control,
and have callgrind tool report the needed vgdb prefix argument
if the user supplied this arg.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13769
2014-01-11 13:56:48 +00:00
Dejan Jevtic
423d0643b9 mips32: Adding mips32/Android support to Valgrind.
Necessary changes to Valgrind to support mips32 on Android.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13767
2013-12-27 09:06:55 +00:00
Philippe Waroquiers
492a8ae2a2 Implement gdbsrv "v.info stats" command giving statistics for valgrind core + tools
* addition of VG_(needs_print_stats) in pub_tool_tooliface.h
* use the above in memcheck and helgrind
* output valgrind stats and calls print_stats in server.c



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13760
2013-12-15 20:24:43 +00:00
Philippe Waroquiers
b330c9fa31 Minor tweak in the VG_(poll) syscall and callers: have a way to show
the error in case the poll syscall unexpectedly fails.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13748
2013-12-05 22:10:55 +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
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
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
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
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
Philippe Waroquiers
619be966db Allow tools to provide some statistics in suppression list produced at the end
Option -v outputs a list of used suppressions. This only gives
the nr of times a suppression was used.
For a leak search, this only gives the nr of loss records that
have been suppressed, but it does not give additional needed details
to understand more precisely what has been suppressed
(i.e. nr of blocks and nr of bytes).

=> Add in the tool interface update_extra_suppression_use and
print_extra_suppression_info functions to allow the tool to record
additioonal use statistics for a suppression. These statistics
can be done depending on the error (and its data) which is suppressed.

Use this in memcheck for the leak suppressions, to maintain and output
the nr of blocks and bytes suppressed by a suppression during
the last leak search.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13651
2013-10-17 22:10:41 +00:00
Julian Seward
4fc45578f6 Disallow client mmap calls with MAP_32BIT as a flag.
Fixes, or at least addresses, #324181.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13644
2013-10-14 14:50:57 +00:00
Philippe Waroquiers
3e5f78f04d pub_tool_oset.h and m_oset.c cleanup
* Remove dead code in m_oset.c VG_(OSetGen_ResetIterAt)
  The code at the end of VG_(OSetGen_ResetIterAt) was unreachable
  (detected by BEAM checker).
  Looking at SVN, the initial commit of VG_(OSetGen_ResetIterAt)
  already contained this deadcode.

* pub_tool_oset.h was wrongly indicating that signed words could
  be used for fast cmp oset.

* modified memcheck/tests/unit_oset.c to test VG_(OSetGen_ResetIterAt)

* modified memcheck/tests/unit_oset.c to not use signed words
  (it was previously using signed words, but only with positive values)





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13622
2013-10-06 16:35:35 +00:00
Dejan Jevtic
8eda9d604e mips32: Add two syscall wrappers:
4345 __NR_process_vm_readv
4346 __NR_process_vm_writev
Code style, no functional changes.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13577
2013-09-24 14:21:50 +00:00
Florian Krohm
a6c7a2893c Fix coregrind header files such that they can be included without
having to worry what other header files may have to be included
beforehand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549
2013-09-15 13:54:34 +00:00
Florian Krohm
5c4ba95a27 Fix inclusion of header files in coregrind. No pub_tool_*.h should be
included here.
Added pub_core_poolalloc.h and renamed pub_tool_inner.h to pub_core_inner.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13548
2013-09-15 10:42:26 +00:00
Florian Krohm
de4c6ffc54 Fix include guard.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13547
2013-09-15 09:56:18 +00:00
Florian Krohm
e4c80fed1e Move a function and its prototype VG_(malloc_effective_client_redzone_size)
to a conceptually better place.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13546
2013-09-15 09:18:03 +00:00
Philippe Waroquiers
6e3bb2af58 Fix 324514 gdbserver monitor cmd output behaviour consistency + allow user
to put a "marker" msg in process log output

* v.info n_errs_found accepts optional msg, added in the output of
   the monitor command.

* use VG_(printf) rather than VG_(gdb_printf) when output of command
  should be redirected according to v.set gdb_output|log_output|mixed_output

* also avoid calling gdb_printf in output sink processing
  to output zero bytes, as gdb_printf expects to have a null terminated
  string, which is not ensured when 0 bytes have to be output.

* some minor reformatting (replace char* xxx by char *xxx).




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13532
2013-09-04 21:42:43 +00:00
Philippe Waroquiers
a44190db93 Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13519
2013-08-30 15:48:16 +00:00
Florian Krohm
c5fd4773ed Add missing headers and such so that 'make dist' works again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13518
2013-08-29 17:59:27 +00:00
Bart Van Assche
045b8ab23e valgrind.h: Add MinGW64 support
From: Makoto Kato <m_kato@ga2.so-net.ne.jp>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13513
2013-08-25 06:10:24 +00:00
Bart Van Assche
de32048275 coregrind/m_debuginfo: Add VG_(DebugInfo_get_bss_avma)() and VG_(DebugInfo_get_bss_size)()
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13510
2013-08-24 17:52:26 +00:00
Julian Seward
4e3134f897 Fix fallout from r13486: "virtual" is a C++ reserved word and so this
header causes breakage in the C++ tests in the tree.  Rename it.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13487
2013-08-08 09:05:37 +00:00
Julian Seward
f7cd4044d5 Add support for a bunch of DRM Ioctls. Fixes #207815.
(Robert Bragg, bob@o-hand.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13486
2013-08-08 08:09:29 +00:00
Dejan Jevtic
78ae0356c4 mips32: Add support for mips32 DSP instruction set.
Add support for mips32 DSP and DSP revision 2 ASE.
More details about the mips32 DSP(r2) ASE:
http://www.mips.com/media/files/MD00566-2B-MIPSDSP-QRC-01.00.pdf
Applied patch provided by Maja Gagic <maja.gagic@rt-rk.com>



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13470
2013-07-25 08:22:08 +00:00
Philippe Waroquiers
4c9052b4d6 fix incorrect lineno in supp error msgs+ -v give filename+lineno of used supp.
If a suppression file contains an error, the lineno reported could be wrong.
Also, give filename and lineno of the used suppressions in -v debugging output.

The fix consists in ensuring that tool specific read_extra function gets
the Int* lineno pointer, together with other VG_(get_line) parameters.






git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13469
2013-07-22 22:00:13 +00:00
Tom Hughes
d9264a8311 The FIOCLEX and FIONCLEX ioctls are architecture specific.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13464
2013-07-18 11:22:10 +00:00
Tom Hughes
6247518a02 Socket option constants are architecture specific.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13463
2013-07-18 11:15:41 +00:00
Tom Hughes
c9ba888d97 Handle FIOCLEX and FIONCLEX ioctls. Patch from Ben Noordhuis. BZ#305170.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13462
2013-07-17 14:57:18 +00:00
Tom Hughes
97342e80a6 Handle setsockopt(SOL_SOCKET, SO_ATTACH_FILTER) better. Based
on patch from Guy Harris on BZ#318203.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13461
2013-07-17 14:36:57 +00:00
Julian Seward
4fe9a30352 Merge r13421:HEAD from branches/DISRV. This merges the debuginfo-server
stuff into the trunk.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13440
2013-07-02 08:07:15 +00:00
Bart Van Assche
8650980ea8 [PATCH 3/4] xen: VKI_XEN_SYSCTL_sched_id hypercall (#321065)
From: Andrew Cooper <andrew.cooper3@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13437
2013-06-30 07:59:09 +00:00
Bart Van Assche
bbe2f19d40 [PATCH 2/4] xen: update for interface changes in Xen 4.3 release (#321065)
From: Ian Campbell <ian.campbell@citrix.com>



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13436
2013-06-30 07:58:19 +00:00
Julian Seward
d14f385579 Connect up the Mach-O reader to the new DiImage abstractions.
git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13430
2013-06-25 12:42:52 +00:00
Julian Seward
68c9403938 Initial code for remote debuginfo server. Handles all ELF/Dwarf{2,3,4}
on Linux.  No Dwarf1, no Stabs, and MacOSX probably won't build.


git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13423
2013-06-07 16:15:48 +00:00
Mark Wielaard
86f74d6026 Support Linux kernel AF_BLUETOOTH for bind().
Bug #320116. sockaddr_rc might contain some padding which might not be
initialized. Explicitly check the sockaddr_rc fields are set. That also
produces better diagnostics about which field is unitialized.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13404
2013-05-22 10:21:10 +00:00