]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
10 years agoxen: syswrap XEH_HVMOP_set_pci_intx_level
Bart Van Assche [Sun, 28 Jun 2015 16:44:21 +0000 (16:44 +0000)] 
xen: syswrap XEH_HVMOP_set_pci_intx_level

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15377

10 years agoxen: syswrap XEN_HVMOP_track_dirty_vram
Bart Van Assche [Sun, 28 Jun 2015 16:43:14 +0000 (16:43 +0000)] 
xen: syswrap XEN_HVMOP_track_dirty_vram

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15376

10 years agoxen: implement VKI_XEN_DOMCTL_irq_permission
Bart Van Assche [Sun, 28 Jun 2015 16:42:38 +0000 (16:42 +0000)] 
xen: implement VKI_XEN_DOMCTL_irq_permission

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15375

10 years agoxen: support for XEN_DOMCTL_iomem_permission
Bart Van Assche [Sun, 28 Jun 2015 16:42:05 +0000 (16:42 +0000)] 
xen: support for XEN_DOMCTL_iomem_permission

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15374

10 years agoxen: Handle XEN_DOMCTL_{test_assign,assign,deassign}_device
Bart Van Assche [Sun, 28 Jun 2015 16:41:06 +0000 (16:41 +0000)] 
xen: Handle XEN_DOMCTL_{test_assign,assign,deassign}_device

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

10 years agoxen: Handle XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION
Bart Van Assche [Sun, 28 Jun 2015 16:39:47 +0000 (16:39 +0000)] 
xen: Handle XEN_DOMCTL_SHADOW_OP_{GET,SET}_ALLOCATION

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15372

10 years agoxen: syswrap XEN_DOMCTL_pin_mem_cacheattr
Bart Van Assche [Sun, 28 Jun 2015 16:38:40 +0000 (16:38 +0000)] 
xen: syswrap XEN_DOMCTL_pin_mem_cacheattr

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15371

10 years agoxen: syswrap XEN_DOMCTL_[gs]et_vcpu_msrs
Bart Van Assche [Sun, 28 Jun 2015 16:37:54 +0000 (16:37 +0000)] 
xen: syswrap XEN_DOMCTL_[gs]et_vcpu_msrs

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

10 years agoxen: syswrap XEN_DOMCTL_[gs]et_ext_vcpustate
Bart Van Assche [Sun, 28 Jun 2015 16:36:30 +0000 (16:36 +0000)] 
xen: syswrap XEN_DOMCTL_[gs]et_ext_vcpustate

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

10 years agoxen: syswrap XEN_DOMCTL_setvcpuextstate
Bart Van Assche [Sun, 28 Jun 2015 16:35:13 +0000 (16:35 +0000)] 
xen: syswrap XEN_DOMCTL_setvcpuextstate

XEN_DOMCTL_setvcpuextstate reads a vcpu, size and buffer pointer, and reads
size bytes from the buffer.  It has no outputs.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15368

10 years agoxen: Fix XEN_DOMCTL_getvcpuextstate
Bart Van Assche [Sun, 28 Jun 2015 16:34:20 +0000 (16:34 +0000)] 
xen: Fix XEN_DOMCTL_getvcpuextstate

Xen only writes into the provided buffer if the guest handle was not NULL.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15367

10 years agoxen: Add domctl interface version 0x0000000a
Bart Van Assche [Sun, 28 Jun 2015 16:33:04 +0000 (16:33 +0000)] 
xen: Add domctl interface version 0x0000000a

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15366

10 years agoxen: Add support for new sysctl and domctl interface versions
Bart Van Assche [Sun, 28 Jun 2015 16:31:54 +0000 (16:31 +0000)] 
xen: Add support for new sysctl and domctl interface versions

The change causing the sysctl bump is not in an implemented subop yet, so no
change is required.  The change causing the domctl bump is in an implemented
subop, but has also been reverted in favor of a different way of performing
the same actions.  Therefore, there is no net difference.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15365

10 years agoxen: refactor the various "version not supported" messages into a single helper
Bart Van Assche [Sun, 28 Jun 2015 16:30:36 +0000 (16:30 +0000)] 
xen: refactor the various "version not supported" messages into a single helper

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15364

10 years agoPartial update of OS X related 3_10_BUGSTATUS, due to resolved bug reports.
Rhys Kidd [Sun, 28 Jun 2015 04:22:34 +0000 (04:22 +0000)] 
Partial update of OS X related 3_10_BUGSTATUS, due to resolved bug reports.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15363

10 years agoSet svn ignore on map_32bits regression test, added in r15341.
Rhys Kidd [Sun, 28 Jun 2015 04:13:16 +0000 (04:13 +0000)] 
Set svn ignore on map_32bits regression test, added in r15341.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15362

10 years agoFix incorrect sizeof expression in syswrap-xen.c, reported by Coverity (#1233786)
Rhys Kidd [Sun, 28 Jun 2015 04:06:30 +0000 (04:06 +0000)] 
Fix incorrect sizeof expression in syswrap-xen.c, reported by Coverity (#1233786)
n-i-bz

Reviewed-by: Ian Campbell <ian.campbell@citrix.com>
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15361

10 years agoMinor shuffling in Callgrind format doc
Josef Weidendorfer [Fri, 26 Jun 2015 15:44:01 +0000 (15:44 +0000)] 
Minor shuffling in Callgrind format doc

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15360

10 years agoComplete/Fix Callgrind format specification.
Josef Weidendorfer [Fri, 26 Jun 2015 14:05:33 +0000 (14:05 +0000)] 
Complete/Fix Callgrind format specification.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15358

10 years agoFix a comment.
Florian Krohm [Thu, 25 Jun 2015 21:12:44 +0000 (21:12 +0000)] 
Fix a comment.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15355

10 years agoBeef up configury for the undefined behaviour sanitiser.
Florian Krohm [Tue, 23 Jun 2015 20:31:52 +0000 (20:31 +0000)] 
Beef up configury for the undefined behaviour sanitiser.
If the compiler supports -fno-sanitize=alignment use it.
Otherwise, there will be complaints about misaligned
memory accesses. This is needed for GCC 5.1.
If that flag is not supported simply pass in -fsantize=undefined
and assume that it won't check for alignment violations (which
is true for GCC 4.9).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15351

10 years agoFix two testcase builds so they work when linked against a VEX
Florian Krohm [Sun, 21 Jun 2015 17:54:27 +0000 (17:54 +0000)] 
Fix two testcase builds so they work when linked against a VEX
that was compiled with -fsanitize=undefined

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15348

10 years agoFilter 'New thread' lines
Philippe Waroquiers [Sat, 20 Jun 2015 22:22:56 +0000 (22:22 +0000)] 
Filter 'New thread' lines
gdb 7.9 reports new threads at different moment than the previous versions.
Filter these new threads lines so as to not be dependent on this
gdb aspect.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15347

10 years agofbit_mask needs to be unsigned because it sometimes shifts a '1'
Florian Krohm [Fri, 19 Jun 2015 12:01:07 +0000 (12:01 +0000)] 
fbit_mask needs to be unsigned because it sometimes shifts a '1'
into the MSB. Found by ubsan.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15346

10 years agoAnnounce change in NEWS
Philippe Waroquiers [Thu, 18 Jun 2015 21:31:51 +0000 (21:31 +0000)] 
Announce change in NEWS

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15343

10 years ago324181 mmap does not handle MAP_32BIT (handle it now, rather than fail it)
Philippe Waroquiers [Wed, 17 Jun 2015 19:57:09 +0000 (19:57 +0000)] 
324181  mmap does not handle MAP_32BIT (handle it now, rather than fail it)
324181 was previously closed with a solution to always make
MAP_32BIT fail. This is technically correct/according to the doc,
but is not very usable.
This patch ensures that MAP_32BIT mmap is succesful, as long as
aspacemgr gives a range in the first 2GB
(so, compared to a native run, MAP_32BIT will fail much more quickly
as aspacemgr does not reserve the address space below 2GB on a 64 bits).

Far to be perfect, but this is better than nothing.

Added a regression test that test succesful mmap 32 bits till
the 2GB limit is reached.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15341

10 years agomips64: modify load_indexed_instructions test
Petar Jovanovic [Tue, 16 Jun 2015 23:49:30 +0000 (23:49 +0000)] 
mips64: modify load_indexed_instructions test

A little style improvement for load_indexed_instructions test including
addition of new instruction to be tested - lhx (supported as of VEX r3152).

Related issue - BZ #345987.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15340

10 years agoFix UNKNOWN task message [id 3410, to mach_task_self(), reply 0x........] (task_set_s...
Rhys Kidd [Sat, 13 Jun 2015 22:59:47 +0000 (22:59 +0000)] 
Fix UNKNOWN task message [id 3410, to mach_task_self(), reply 0x........] (task_set_special_port)
bz#349087

On OS X 10.10

Before:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15339

10 years agoWaiting for the release, the doc should better indicate it is a SVN version
Philippe Waroquiers [Sat, 13 Jun 2015 15:54:22 +0000 (15:54 +0000)] 
Waiting for the release, the doc should better indicate it is a SVN version

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15338

10 years agoFix UNKNOWN task message [id 3406, to mach_task_self(), reply 0x........] (task_set_info)
Rhys Kidd [Sat, 13 Jun 2015 06:16:10 +0000 (06:16 +0000)] 
Fix UNKNOWN task message [id 3406, to mach_task_self(), reply 0x........] (task_set_info)
bz#349086

On OS X 10.10

Before:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 592 tests, 222 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15336

10 years agoUpdate svn ignore propset on the folder none/tests/scripts. n-i-bz.
Rhys Kidd [Sat, 13 Jun 2015 02:49:44 +0000 (02:49 +0000)] 
Update svn ignore propset on the folder none/tests/scripts. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15335

10 years agoadd KVM_S390_MEMOP ioctl handling
Christian Borntraeger [Fri, 12 Jun 2015 10:54:12 +0000 (10:54 +0000)] 
add KVM_S390_MEMOP ioctl handling

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15334

10 years agoFix 348949 Bogus "ERROR: --ignore-ranges: suspiciously large range"
Philippe Waroquiers [Thu, 11 Jun 2015 19:57:42 +0000 (19:57 +0000)] 
Fix 348949  Bogus "ERROR: --ignore-ranges: suspiciously large range"
Patch from Mark Harris

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15333

10 years agoStick in -Werror when attempting to detect whether a compiler
Florian Krohm [Tue, 9 Jun 2015 21:53:48 +0000 (21:53 +0000)] 
Stick in -Werror when attempting to detect whether a compiler
option is available. This is needed for clang. See also r15323.
Fixes BZ #348890

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15332

10 years agoFollowup to r15323. Cannot use AC_GCC_WARNING_SUBST to detect
Florian Krohm [Tue, 9 Jun 2015 21:44:58 +0000 (21:44 +0000)] 
Followup to r15323. Cannot use AC_GCC_WARNING_SUBST to detect
whether -Wformat-security is supported. Special handling is needed.

gcc (Ubuntu 4.8.2-19ubuntu1) 4.8.2  accepts -Wformat-security
without -Wformat being present on the command line. Other GCC
versions will issue a warning if -Wformat is missing. r15323
adds -Werror to AC_GCC_WARNING_SUBST and therefore turns that
warning into an error.  With the consequence that
-Wformat-security appears to be unsupported -- a false conclusion.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15331

10 years agoFix up a few not-in-alphabetical-order file names in file lists.
Julian Seward [Mon, 8 Jun 2015 11:20:22 +0000 (11:20 +0000)] 
Fix up a few not-in-alphabetical-order file names in file lists.
No functional change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15330

10 years agoMemcheck on multithreaded program fails with Assertion 'sizeof(UWord) == sizeof(UInt...
Rhys Kidd [Mon, 8 Jun 2015 11:07:48 +0000 (11:07 +0000)] 
Memcheck on multithreaded program fails with Assertion 'sizeof(UWord) == sizeof(UInt)' failed in m_syscall.c
bz#302630
== bz#326797

On OS X 10.7 and OS X 10.8

Before:

== 598 tests, 201 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 598 tests, 200 stderr failures, 12 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15329

10 years agoFix undefined symbols for architecture x86_64: _global, referenced from: _test_so_glo...
Rhys Kidd [Mon, 8 Jun 2015 08:56:33 +0000 (08:56 +0000)] 
Fix undefined symbols for architecture x86_64: _global, referenced from: _test_so_global in tls_so-tls_so.o. bz#347982.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15328

10 years agoInline ensure_valid. This improves reading the debug info of big executables
Philippe Waroquiers [Sun, 7 Jun 2015 10:38:39 +0000 (10:38 +0000)] 
Inline ensure_valid. This improves reading the debug info of big executables
by 1 to 2%

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15327

10 years agoAnnounce fix for 345928 (amd64: callstack only contains current function for
Philippe Waroquiers [Sat, 6 Jun 2015 08:11:37 +0000 (08:11 +0000)] 
Announce fix for 345928 (amd64: callstack only contains current function for
small stacks)
(was fixed by rev 15309)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15326

10 years agoResolve remaining clang warning on OS X. Should be possible to build Valgrind on...
Rhys Kidd [Sat, 6 Jun 2015 04:18:49 +0000 (04:18 +0000)] 
Resolve remaining clang warning on OS X. Should be possible to build Valgrind on modern OS X without any warnings (note: does not hold for regression test suite).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15325

10 years agoResolve clang warning on OS X: m_stacktrace.c:542:7: warning: implicit declaration...
Rhys Kidd [Sat, 6 Jun 2015 03:57:34 +0000 (03:57 +0000)] 
Resolve clang warning on OS X: m_stacktrace.c:542:7: warning: implicit declaration of function 'vgPlain_is_in_syscall' is invalid in C99 [-Wimplicit-function-declaration]

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15324

10 years agoclang, as opposed to gcc, does not terminate with a non-zero return code
Florian Krohm [Fri, 5 Jun 2015 21:19:06 +0000 (21:19 +0000)] 
clang, as opposed to gcc, does not terminate with a non-zero return code
in case an unrecognised command line option is encountered. configure.ac
however was assuming just that which led to compile time warnings later on.
Add -Werror to the configure bits to make clang behave like gcc in this
regard. Fixes BZ #348565.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15323

10 years agoFix a condition that was always true. Found by cppcheck.
Florian Krohm [Fri, 5 Jun 2015 19:34:59 +0000 (19:34 +0000)] 
Fix a condition that was always true. Found by cppcheck.
See BZ #348565.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15322

10 years agoRemove configure bits for -Wno-format-zero-length. The option is
Florian Krohm [Fri, 5 Jun 2015 17:40:53 +0000 (17:40 +0000)] 
Remove configure bits for -Wno-format-zero-length. The option is
not used.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15321

10 years agoSimplify configury and eliminate AC_GCC_WARNING_COND which was only used
Florian Krohm [Fri, 5 Jun 2015 17:09:57 +0000 (17:09 +0000)] 
Simplify configury and eliminate AC_GCC_WARNING_COND which was only used
in one place and can be replaced with AC_GCC_WARNING_SUBST_NEW. Adjust
perf/Makefile.am.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15320

10 years agoAdd -Wempty-body to the list of compile flags.
Florian Krohm [Fri, 5 Jun 2015 16:26:14 +0000 (16:26 +0000)] 
Add -Wempty-body to the list of compile flags.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15319

10 years agoRemove configury bits for -Wno-empty-body. It is not needed.
Florian Krohm [Fri, 5 Jun 2015 16:03:31 +0000 (16:03 +0000)] 
Remove configury bits for -Wno-empty-body. It is not needed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15318

10 years agoarm32-linux only: add handwritten assembly helpers for
Julian Seward [Fri, 5 Jun 2015 13:33:46 +0000 (13:33 +0000)] 
arm32-linux only: add handwritten assembly helpers for
MC_(helperc_LOADV32le), MC_(helperc_LOADV16le) and
MC_(helperc_LOADV8).  This improves performance by around 5% to 7% in
the best case, for run-of-the-mill integer code.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15317

10 years agoUpdate.
Julian Seward [Fri, 5 Jun 2015 12:08:10 +0000 (12:08 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15316

10 years agoUpdate.
Julian Seward [Fri, 5 Jun 2015 11:27:27 +0000 (11:27 +0000)] 
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15315

10 years agoBug 348728 - Fix broken check for VIDIOC_G_ENC_INDEX
Julian Seward [Fri, 5 Jun 2015 11:25:32 +0000 (11:25 +0000)] 
Bug 348728 - Fix broken check for VIDIOC_G_ENC_INDEX
Patch from Hans Verkuil (hverkuil@xs4all.nl)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15314

10 years agoBug 348102 - Patch updating v4l2 API support (edit)
Julian Seward [Fri, 5 Jun 2015 11:23:35 +0000 (11:23 +0000)] 
Bug 348102 - Patch updating v4l2 API support (edit)
Patch from Hans Verkuil (hverkuil@xs4all.nl)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15313

10 years agoFix format string mismatch.
Julian Seward [Fri, 5 Jun 2015 10:03:56 +0000 (10:03 +0000)] 
Fix format string mismatch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15312

10 years agoSilence some system library leaks on OS X 10.7. These same leaks silenced on later...
Rhys Kidd [Fri, 5 Jun 2015 09:58:27 +0000 (09:58 +0000)] 
Silence some system library leaks on OS X 10.7. These same leaks silenced on later OS X already. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15311

10 years agoFix r15302 for early gcc compilers on OS X. Cannot declare variable in for loop pre...
Rhys Kidd [Fri, 5 Jun 2015 09:57:03 +0000 (09:57 +0000)] 
Fix r15302 for early gcc compilers on OS X. Cannot declare variable in for loop pre C99. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15310

10 years agoOn platforms that have an accessible redzone below the SP, the unwind logic
Philippe Waroquiers [Thu, 4 Jun 2015 19:44:47 +0000 (19:44 +0000)] 
On platforms that have an accessible redzone below the SP, the unwind logic
should be able to access the redzone.
So, when computing fp_min, substract the redzone.
Currently, only amd64 and ppc64 have a non 0 redzone.

Regtested on amd64 and ppc64le, no regression.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15309

10 years agoRun memcheck/tests/demangle with -q.
Mark Wielaard [Wed, 3 Jun 2015 09:52:00 +0000 (09:52 +0000)] 
Run memcheck/tests/demangle with -q.

The interesting part is the demangled backtrace in the error message.
Suppress the memory allocation/blocks summary which can differ slightly
depending on the underlying arch/libs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15308

10 years agoDefault is 1 for the unwind length range, not 0
Philippe Waroquiers [Tue, 2 Jun 2015 22:17:51 +0000 (22:17 +0000)] 
Default is 1 for the unwind length range, not 0

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15307

10 years agoAdd a gdbxrv monitor command to print the CFI unwind info for an address+len
Philippe Waroquiers [Tue, 2 Jun 2015 22:09:42 +0000 (22:09 +0000)] 
Add a gdbxrv monitor command to print the CFI unwind info for an address+len

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15306

10 years agoGCC 5.1 is too smart. Disable Identical Code Folding for preload libs.
Mark Wielaard [Tue, 2 Jun 2015 20:23:06 +0000 (20:23 +0000)] 
GCC 5.1 is too smart. Disable Identical Code Folding for preload libs.

We want to disabled Identical Code Folding for the tools preload shared
objects to get better backraces. For GCC 5.1 -fipa-icf is enabled by
default at -O2.

    The optimization reduces code size and may disturb
    unwind stacks by replacing a function by equivalent
    one with a different name.

Add a configure check to see if GCC supports -fno-ipa-icf.
If it does then add the flag to AM_CFLAGS_PSO_BASE.

Without this GCC will notice some of the preload replacement functions
in vg_replace_strmem are identical and fold them all into one picking
a random (existing) function name. This causes backtraces showing
completely unexpected function names.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15305

10 years agoEnable process_vm_readv/writev syscall on arm32.
Mark Wielaard [Tue, 2 Jun 2015 18:17:44 +0000 (18:17 +0000)] 
Enable process_vm_readv/writev syscall on arm32.

This makes none/tests/process_vm_readv_writev.vgtest pass on arm32.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15304

10 years agoDarwin11.supp should include suppression for known uninitialised read in pthread_rwlo...
Rhys Kidd [Tue, 2 Jun 2015 10:30:15 +0000 (10:30 +0000)] 
Darwin11.supp should include suppression for known uninitialised read in pthread_rwlock_init() as required to pass the memcheck/tests/darwin/pth-supp test. bz#196528.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15303

10 years agoAdd regression test for bz#228343.
Rhys Kidd [Tue, 2 Jun 2015 09:21:28 +0000 (09:21 +0000)] 
Add regression test for bz#228343.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15302

10 years agounwind amd64 trace: improve also the fp chain unwind trace
Philippe Waroquiers [Sun, 31 May 2015 15:26:51 +0000 (15:26 +0000)] 
unwind amd64 trace: improve also the fp chain unwind trace

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15301

10 years agoImprove tracing in amd64 unwind
Philippe Waroquiers [Sun, 31 May 2015 15:18:36 +0000 (15:18 +0000)] 
Improve tracing in amd64 unwind

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15300

10 years agoFix OS X host_create_mach_voucher: UNKNOWN host message [id 222, to mach_host_self...
Rhys Kidd [Sun, 31 May 2015 03:17:53 +0000 (03:17 +0000)] 
Fix OS X host_create_mach_voucher: UNKNOWN host message [id 222, to mach_host_self(), reply 0x........]
bz#343649

Before:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15299

10 years agoFix OS X host_get_special_port: UNKNOWN host message [id 412, to mach_host_self(...
Rhys Kidd [Sun, 31 May 2015 01:58:57 +0000 (01:58 +0000)] 
Fix OS X host_get_special_port: UNKNOWN host message [id 412, to mach_host_self(), reply 0x........]
bz#343525

Before:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15298

10 years agoFix unhandled syscall: mach:41 (_kernelrpc_mach_port_guard_trap)
Rhys Kidd [Sat, 30 May 2015 08:59:46 +0000 (08:59 +0000)] 
Fix unhandled syscall: mach:41 (_kernelrpc_mach_port_guard_trap)
bz#344337

Before:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 14 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15297

10 years agoSignal handler ucontext_t not filled out correctly on OS X
Rhys Kidd [Thu, 28 May 2015 12:49:00 +0000 (12:49 +0000)] 
Signal handler ucontext_t not filled out correctly on OS X
bz#341419

Before:

== 589 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 591 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15296

10 years agoBug #348247 jno jumps wrongly when overflow is not set.
Mark Wielaard [Wed, 27 May 2015 12:37:39 +0000 (12:37 +0000)] 
Bug #348247 jno jumps wrongly when overflow is not set.

Mention bug fixed in VEX r3147 in NEWS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15295

10 years agoMake some numbers in helgrind stats use , separators, as the numbers can be big
Philippe Waroquiers [Tue, 26 May 2015 21:27:36 +0000 (21:27 +0000)] 
Make some numbers in helgrind stats use , separators, as the numbers can be big

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15294

10 years agoSlightly improve x86 unwind intensive workload.
Philippe Waroquiers [Tue, 26 May 2015 21:26:39 +0000 (21:26 +0000)] 
Slightly improve x86 unwind intensive workload.
e.g. perf/memrw is improved by 2% to 3% with this patch.

The unwinding code on x86 is trying to unwind using
either the %ebp-chain or CFI unwinding.
If these 2 techniques fail, then it tries to unwind
using FPO (PDB) debug info.
However, unless running wine or similar, there will never be
such FPO/PDB info.
The function VG_(use_FPO_info) is thus called for nothing
for each 'end of stack'. This function scans all the loaded di
to find a debug info that has some FP, to not find anything.

With this patch, the unwind code on x86 will only call VG_(use_FPO_info) if
some FPO/PDB info was loaded.

The fact that FPO/PDB info was loaded is cached and updated similarly to
cfi cache : each time new debug info is loaded, the cache value is refreshed
using the debuginfo generation.

The patch also changes the name of VG_(CF_info_generation)
to VG_(debuginfo_generation), as this generation is changed for
any kind of load or unload of debug info, not only for CFI based debug
info

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15293

10 years agoWraparounds are never allowed -- not evern for MAny requests.
Florian Krohm [Tue, 26 May 2015 17:59:50 +0000 (17:59 +0000)] 
Wraparounds are never allowed -- not evern for MAny requests.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15292

10 years agoRemove dependency on bash. Fixes BZ #347978.
Florian Krohm [Tue, 26 May 2015 11:52:45 +0000 (11:52 +0000)] 
Remove dependency on bash. Fixes BZ #347978.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15291

10 years agoSome platforms such as x86 and amd64 have efficient unaligned access.
Philippe Waroquiers [Mon, 25 May 2015 20:15:25 +0000 (20:15 +0000)] 
Some platforms such as x86 and amd64 have efficient unaligned access.
On these platforms, implement read_/write_<type> by doing a direct
access, rather than calling a function that will read or write
'byte per byte'.

For platforms that do not have efficient unaligned access,
or that do not support at all unaligned access, call function
  readUAS_/writeUAS_<type> that works as before.

Currently, direct acecss is activated only for x86 and amd64.
Unclear what other platforms support (efficiently) unaligned access.

On unwind intensive code (such as perf/memrw on amd64), this patch
gives up to 5% improvement.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15290

10 years agoThis patch decreases significantly the memory needed for OldRef and
Philippe Waroquiers [Mon, 25 May 2015 17:24:27 +0000 (17:24 +0000)] 
This patch decreases significantly the memory needed for OldRef and
slightly increases the performance. It also moderately improves
the nr of cases where helgrind can provide the stack trace of the old
access (when using the same amount of memory for the OldRef entries).
The patch also provides a new helgrind monitor command to show
the recorded accesses for an address+len, and adds an optional argument
lock_address to the monitor command 'info locks', to show the info
about just this lock.

Currently, oldref are maintained in a sparse WA, that points to N
entries, as specified by --conflict-cache-size=N.
For each entry (associated to an address), we have the last 5 accesses.

Old entries are recycled in an exact LRU order.
But inside an entry, we could have a recent access, and 4 very
old accesses that are kept 'alive' by a single thread accessing
repetitively the address shared with the 4 other old entries.

The attached patch replaces the sparse WA that maintains the OldREf
by an hash table.
Each OldRef now also only maintains one single access for an address.
As an OldRef now maintains only one access, all the entries are now
strictly in LRU mode.

Memory used for OldRef
-----------------------
For the trunk, an OldRef has a size of 72 bytes (on 32 bits archs)
maintaining up to 5 accesses to the same address.
On 64 bits arch, an OldRef is 104 bytes.

With the patch, an OldRef has a size of 32 bytes (on 32 bits archs)
or 56 bytes (on 64 bits archs).

So, for one single access, the new code needs (on 32 bits)
32 bytes, while the trunk needs only 14.4 bytes.
However, that is the worst case, assuming that the 5 entries in the
accs array are all used.
Looking on 2 big apps (one of them being firefox), we see that
we have very few OldRef entries that have the 5 entries occupied.
On a firefox startup, of the 5x1,000,000 accesses, we only have
1,406,939 accesses that are used.
So, in average, the trunk uses in reality around 52 bytes per access.

The default value for --conflict-cache-size has been doubled to 2000000.
This ensures that the memory used for the OldRef is more or less the
same as the trunk (104Mb for OldRef entries).

Memory used for sparseWA versus hashtable
-----------------------------------------
Looking on 2 big apps (one of them being firefox), we see that
there are big variations on the size of the WA : it can go in a few
seconds from 10MB to 250MB, or can decrease back to 10 MB.
This all depends where the last N accesses were done: if well localised,
the WA will be small.
If the last N accesses were distributed over a big address space,
then the WA will be big: the last level of WA (the biggest memory consumer)
uses slightly more than 1KB (2KB on 64 bits) for each '256 bytes' memory
zone where there is an oldref. So, in the worst case, on 32 bits, we
need > 1_000_000_000 sparseWA memory to keep 1_000_000 OldRef.

The hash table has between 1 to 2 Word overhead per OldRef
(as the chain array is +- doubled each time the hash table is full).
So, unless the OldRef are extremely localised, the overhead of the
hash table will be significantly less.

With the patch, the core arena total alloc is:
  5299535/1201448632 totalloc-blocks/bytes
The trunk is
  6693111/3959050280 totalloc-blocks/bytes
(so, around 1.20Gb versus 3.95Gb).
This big difference is due to the fact that the sparseWA repetitively
allocates then frees Level0 or LevelN when OldRef in the region covered
by the Level0/N have all been recycled.

In terms of CPU
---------------
With the patch, on amd64, a firefox startup seems slightly faster (around 1%).
The peak memory mmaped/used decreases by 200Mb.
For a libreoffice test, the memory decreases by 230Mb. CPU also decreases
slightly (1%).

In terms of correctness:
-----------------------
The trunk could potentially show not the most recent access
to the memory of a race : the first OldRef entry matching the raced upon
address was used, while we could have a more recent access in a following
OldRef entry. In other words, the trunk only guaranteed to find the
most recent access in an OldRef, but not between the several OldRef that
could cover the raced upon address.
So, assuming it is important to show the most recent access, this patch
ensures we really show the most recent access, even in presence of overlapping
accesses.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15289

10 years agoAddress clang compiler warnings on OS X.
Rhys Kidd [Mon, 25 May 2015 14:43:47 +0000 (14:43 +0000)] 
Address clang compiler warnings on OS X.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15288

10 years agoFix regression test added in r15282.
Rhys Kidd [Mon, 25 May 2015 13:53:55 +0000 (13:53 +0000)] 
Fix regression test added in r15282.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15287

10 years agohelgrind stats: show the total nr of thr_n_rcec
Philippe Waroquiers [Sat, 23 May 2015 15:47:35 +0000 (15:47 +0000)] 
helgrind stats: show the total nr of thr_n_rcec

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15285

10 years agohelgrind stats: give the memory occupied by the OldRef
Philippe Waroquiers [Sat, 23 May 2015 15:35:29 +0000 (15:35 +0000)] 
helgrind stats: give the memory occupied by the OldRef

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15284

10 years agoAdd stats in helgrind for oldref history found versus not found
Philippe Waroquiers [Sat, 23 May 2015 12:25:22 +0000 (12:25 +0000)] 
Add stats in helgrind for oldref history found versus not found

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15283

10 years agoAdd (presently) failing test case for bz#234814.
Rhys Kidd [Sat, 23 May 2015 10:20:06 +0000 (10:20 +0000)] 
Add (presently) failing test case for bz#234814.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15282

10 years agoUnguard none/tests/x86/cse_fail on OS X, as the test completes. n-i-bz.
Rhys Kidd [Sat, 23 May 2015 04:18:57 +0000 (04:18 +0000)] 
Unguard none/tests/x86/cse_fail on OS X, as the test completes. n-i-bz.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15281

10 years agoRe-enable functioning none/tests/amd64/bug137714-amd64 on OS X
Rhys Kidd [Fri, 22 May 2015 16:16:19 +0000 (16:16 +0000)] 
Re-enable functioning none/tests/amd64/bug137714-amd64 on OS X
n-i-bz

Before:

== 588 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

After:

== 588 tests, 220 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15280

10 years agoProperly guard none/tests/amd64/*.vgtest on OS X for tests not compiled
Rhys Kidd [Fri, 22 May 2015 15:21:31 +0000 (15:21 +0000)] 
Properly guard none/tests/amd64/*.vgtest on OS X for tests not compiled
n-i-bz

Before:

== 595 tests, 228 stderr failures, 23 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==

After:

== 595 tests, 221 stderr failures, 16 stdout failures, 0 stderrB failure, 0 stdoutB failure, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15279

10 years agoFix a comment. Do not enumerate segment kinds as all segments
Florian Krohm [Fri, 22 May 2015 15:14:04 +0000 (15:14 +0000)] 
Fix a comment. Do not enumerate segment kinds as all segments
have an extent ... including SkShmC segments.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15278

10 years agoFix bug 345126: Incorrect handling of VIDIOC_G_AUDIO and G_AUDOUT
Julian Seward [Fri, 22 May 2015 10:40:42 +0000 (10:40 +0000)] 
Fix bug 345126: Incorrect handling of VIDIOC_G_AUDIO and G_AUDOUT
Patch from Hans Verkuil (hverkuil@xs4all.nl)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15276

10 years agoFollowup to 15270. Completely forgot about the double maintenance.
Florian Krohm [Fri, 22 May 2015 09:34:30 +0000 (09:34 +0000)] 
Followup to 15270. Completely forgot about the double maintenance.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15272

10 years agoAdd procfs-non-linux.stderr.exp variants to EXTRA_DIST.
Mark Wielaard [Fri, 22 May 2015 09:20:03 +0000 (09:20 +0000)] 
Add procfs-non-linux.stderr.exp variants to EXTRA_DIST.

For bz#344936 procfs-non-linux.stderr.exp was renamed and split into
procfs-non-linux.stderr.exp-with-readlinkat and
procfs-non-linux.stderr.exp-without-readlinkat add both to EXTRA_DIST.
Fixes make post-regtest-checks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15271

10 years agoComment only change.
Florian Krohm [Fri, 22 May 2015 09:17:28 +0000 (09:17 +0000)] 
Comment only change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15270

10 years agoRemove an incorrect assertion. Need to consider SkShmC segments as well.
Florian Krohm [Thu, 21 May 2015 22:41:39 +0000 (22:41 +0000)] 
Remove an incorrect assertion. Need to consider SkShmC segments as well.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15269

10 years agoAlso compare keys before calling cmp in the hash table stats printing
Philippe Waroquiers [Thu, 21 May 2015 22:01:19 +0000 (22:01 +0000)] 
Also compare keys before calling cmp in the hash table stats printing

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15268

10 years agoFollow-up bz#344936: Distinguish readlinkat tests for OS X platforms that do or do...
Rhys Kidd [Thu, 21 May 2015 12:56:23 +0000 (12:56 +0000)] 
Follow-up bz#344936: Distinguish readlinkat tests for OS X platforms that do or do not support the readlinkat syscall.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15265

10 years agoFix rounding when printing floating point numbers.
Florian Krohm [Wed, 20 May 2015 15:14:00 +0000 (15:14 +0000)] 
Fix rounding when printing floating point numbers.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15264

10 years agoHave the hash table 'gen' functions comparing the key instead of the
Philippe Waroquiers [Wed, 20 May 2015 15:08:09 +0000 (15:08 +0000)] 
Have the hash table 'gen' functions comparing the key instead of the
cmp function.
Document this in the cmp function comment in pub_tool_hashtable.h

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15263

10 years agoImprove presentation of first line of --profile-heap=yes
Philippe Waroquiers [Wed, 20 May 2015 14:33:30 +0000 (14:33 +0000)] 
Improve presentation of first line of --profile-heap=yes
(i.e. use
  -------- Arena "client": 4,194,304/4,194,304 max/cu...
instead of
  -------- Arena "client": 4194304/4194304 max/cu....

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15262

10 years agoFix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
Rhys Kidd [Wed, 20 May 2015 13:31:02 +0000 (13:31 +0000)] 
Fix unhandled syscall: unix:473 (readlinkat) on OS X 10.10
bz#344936

Before:

== 595 tests, 229 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==

After:

== 595 tests, 228 stderr failures, 23 stdout failures, 1 stderrB failure, 1 stdoutB failure, 30 post failures ==

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15260

10 years agoImprove documentation of syscall: unix: 44 profil() which was deprecated around OS...
Rhys Kidd [Wed, 20 May 2015 11:31:35 +0000 (11:31 +0000)] 
Improve documentation of syscall: unix: 44 profil() which was deprecated around OS X 10.6 and removed from the xnu kernel shipped with OS X 10.7. See unresolved bz#264253.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15259

10 years agoSet tests/check_ppc64le_cap to executable.
Carl Love [Tue, 19 May 2015 16:16:52 +0000 (16:16 +0000)] 
Set tests/check_ppc64le_cap to executable.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15258