Age | Commit message (Collapse) | Author |
|
failed
All memory dereferences during leak search are checked either with
aspacemgr or using the VA-bits.
So, in theory, no memory fault should occur.
However, the leak search is done so as to resist to e.g.
- desynchronisation between the real pages mapped and the aspacemgr state.
- client pages mprotected against reading
- any other reason why dereferencing a client address would fail.
So, the function lc_scan_memory installs a fault catcher that
is called if a memory fault signal is raised during memory scan.
However, memory dereference is also done in the function heuristic_reachedness.
So, this function must also resist to memory fault.
This patch also installs a fault catcher for the function heuristic_reachedness.
More in details, the following changes are done:
* pub_tool_signal.h and m_signals.c :
VG_(set_fault_catcher) now returns the previously set fault catcher.
This is needed so that heuristic_reachedness/lc_scan_memory can save
and restore the previous fault catcher.
* mc_leakcheck.c:
Addition of leak_search_fault_catcher that contains the common
code for the (currently 2) fault catchers used during leak search.
* Modification of heuristic_reachedness and lc_scan_memory:
Add 2 (small) specific fault catcher that are calling the common
leak_search_fault_catcher.
* The way sigprocmask is handled has been changed:
Before this patch, lc_scan_memory was saving/restoring the procsigmask
for each scanned block (and was restoring it when the fault catcher
was longjmp-ing back to lc_scan_memory in case of SEGV or BUS.
This was causing 2 system calls for each block scanned.
Now, lc_scan_memory and heuristic_reachedness are not saving/restoring
the procmask: the work to reset the sigprocmask is only done
in leak_search_fault_catcher. This is more efficient as no syscall
anymore is done during leak search, except for (normally) unfrequent
SIGSEGV/BUS. It is also simpler as signal handling is now done at
a single place.
It is ok to reset the procmask (in fact, just remove the caught signal
from the process sigmask) as during leak search, no other activity than
the leak search is on-going, and so no other SEGV/BUS can be received
while the handler runs.
This gives moderate speed improvements for applications allocating a lot of
blocks (about 10% improvement when leak searching in 1 million small blocks).
Test case (slightly modified) by Matthias Schwarzott.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15716 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
No functional change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15713 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Provide scalar test as well.
Fixes BZ #353920.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15708 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Provide scalar tests as well.
Fixes BZ #353917.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15707 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
that the prerequisites for lock elision are met. Then it may use TBEGIN
and other transactional-execution instructions which are not implemented
by Valgrind. Likewise, the upcoming glibc 2.23 will exploit vector
instructions if they are advertised by HWCAP; and those are currently
not implemented by Valgrind either. In general, the increased use of
ifunc may lead to more such cases in the future.
This patch suppresses the advertising of those hardware features via
HWCAP which are either not known to Valgrind or currently unsupported.
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com).
Fixes BZ #353680.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15702 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Provide scalar tests as well.
Fixes BZ #353398.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15700 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Explanation by Matthias Schwarzott:
The linker will request an executable stack as soon as at least one
object file, that is linked in, wants an executable stack.
And the absence of the
.section .note.GNU-stack."",@progbits
is enough to tell the linker that an executable stack is needed.
So even an empty asm-file must at least contain this statement to not
force executable stacks on the whole executable.
* Define a helper macro MARK_STACK_NO_EXEC that disables the
executable stack.
* Instantiate this macro unconditionally at the end of each asm file.
Patch by Matthias Schwarzott <zzam@gentoo.org>.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15692 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
SIOCGLIFBRDADDR, SIOCGLIFCONF, SIOCGLIFFLAGS, SIOCGLIFNETMASK.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15689 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
SIOCGIFCONF, SIOCGIFFLAGS, SIOCGIFNETMASK, and SIOCGIFNUM.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15686 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Provide scalar test as well.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15684 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
in the auxiliary vector.
This is possible as Solaris 12 kernel now creates auxv even
for statically linked binaries.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15682 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Bump version to 3.12.0.SVN.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15679 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
clang/llvm in 64-bit mode.
(arm64, that is)
Patch from chh@google.com.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15633 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
bz#351632
On OS X 10.11 (DP8)
Before:
== 595 tests, 575 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 595 tests, 219 stderr failures, 9 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15619 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15614 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Solaris runtime linker allows to run dynamically linked programs indirectly, as:
ld.so.1 <dynamic_executable>
This is now possible under Valgrind as well.
Fixes BZ#351858.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15607 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15584 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Fixes BZ #351531
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15573 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Patch from Martin Ling (martin-kdebugs@earth.li)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15542 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Patch from Frank Zago (fzago@cray.com)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15541 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Patch from mchehab@infradead.org (Mauro Carvalho Chehab).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15537 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Ensure that no code is generated for client requests on x32.
From: Matthias Schwarzott <zzam@gentoo.org>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15526 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Patch contributed by Tomas Jedlicka <jedlickat@gmail.com>.
n-i-bz
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15518 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15514 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Let the return type of VG_(sizeRangeMap) reflect that.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15492 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Let the return type of VG_(OSetGen_Size) reflect that.
Also fix a few casts.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15491 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Let the return type of VG_(HT_count_nodes) reflect that.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15490 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15489 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
handle BPF ioctls
bz#312989
Patch by Guy Harris <guy@alum.mit.edu>
On OS X 10.10
Before:
== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
After:
== 593 tests, 214 stderr failures, 10 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15451 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
deprecated in 3.10.0
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15445 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
bz#327745
Patch by Mark H <mh8928@yahoo.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15444 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Authors of this port:
Petr Pavlu setup@dagobah.cz
Ivo Raisr ivosh@ivosh.net
Theo Schlossnagle theo@omniti.com
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Specialise type SysRes for mips{32,64}-linux to enable
meaningful equality comparisons.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15404 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
work.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15403 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
This ioctl argument struct has never had such a member.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15386 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15385 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
More recent Xen toolstacks use this for the SID_TO_CONTEXT operation
only, even when XSM is not in use.
XSM is actually an abstraction layer, of which the only current
implementation is FLASK. So this blindly assumes that the backend is
FLASK. Should another XSM backend be invented then we will have to
sort of detecting the correct one.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15384 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15383 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15382 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
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@15381 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
XENMEM_machphys_compat_mfn_list is functionally identical to
XENMEM_machphys_mfn_list but returns a different list from Xen.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15379 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15377 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15376 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15375 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15374 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15373 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15371 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
The XEN_DOMCTL_[gs]et_vcpu_msrs work simiarly to the other get/set pairs,
taking a vcpu, buffer and size. A query with a buffer of NULL is a request
for the maximum size.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15370 a5019735-40e9-0310-863c-91ae7b9d1cf9
|
|
The VKI_XEN_DOMCTL_[gs]et_ext_vcpucontext hypercalls have had interface
changes, but are largly just extentions of the existing structure.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15369 a5019735-40e9-0310-863c-91ae7b9d1cf9
|