]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoFix an obvious typo as reported by dcb314@hotmail.com in BZ #350251.
Florian Krohm [Thu, 16 Jul 2015 21:42:11 +0000 (21:42 +0000)] 
Fix an obvious typo as reported by dcb314@hotmail.com in BZ #350251.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3164

11 years agomips32: fix build error caused by r15404
Petar Jovanovic [Wed, 15 Jul 2015 18:07:36 +0000 (18:07 +0000)] 
mips32: fix build error caused by r15404

Fix typo that caused build break for mips32.

"error: invalid preprocessing directive #elsif"

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

11 years agomips: emit addiu instead of addi
Petar Jovanovic [Mon, 13 Jul 2015 00:04:28 +0000 (00:04 +0000)] 
mips: emit addiu instead of addi

Remove wrong emission of addi when addiu is correct, sufficient and needed.
Attention to this part of the code has been brought by BZ #338924. This
patch fixes the reported issue as well.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3163

11 years agoOS X 10.11: Tweak magic offset, which was amended prior to xnu-3247.1.36~7 (DP3)...
Rhys Kidd [Sun, 12 Jul 2015 13:25:55 +0000 (13:25 +0000)] 
OS X 10.11: Tweak magic offset, which was amended prior to xnu-3247.1.36~7 (DP3). Also align some debug output text between x86 and amd64. bz#348909.

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

11 years agoFix Valgrind does not support pthread_sigmask() on OS X
Rhys Kidd [Sun, 12 Jul 2015 06:54:56 +0000 (06:54 +0000)] 
Fix Valgrind does not support pthread_sigmask() on OS X
bz#201216

On OS X 10.10

Before:

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

After:

== 592 tests, 219 stderr failures, 15 stdout failures, 0 stderrB failures, 0 stdoutB failures, 30 post failures ==

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

11 years agoFix syntax error;
Florian Krohm [Fri, 10 Jul 2015 17:21:12 +0000 (17:21 +0000)] 
Fix syntax error;
Certain GCC versions do not accept empty clobber lists.
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com). Part of
fixing BZ #342841.

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

11 years agoBetter align OS X error reporting with other platforms. Refer coregrind/m_ume/elf.c
Rhys Kidd [Fri, 10 Jul 2015 08:14:18 +0000 (08:14 +0000)] 
Better align OS X error reporting with other platforms. Refer coregrind/m_ume/elf.c

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

11 years agoFollowup to r15406:
Florian Krohm [Thu, 9 Jul 2015 21:05:26 +0000 (21:05 +0000)] 
Followup to r15406:
- update list of supported s390 opcodes
- update bug status
- keep BZ list in NEWS sorted

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

11 years agos390: Add support for FIEBR(A) and FIDBR(A).
Florian Krohm [Thu, 9 Jul 2015 20:59:24 +0000 (20:59 +0000)] 
s390: Add support for FIEBR(A) and FIDBR(A).
Patch by Andreas Arnez (arnez@linux.vnet.ibm.com). Part of fixing BZ #342841.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3162

11 years agoFix from Andreas Arnez for bug 342841 s390x unrecognized instruction fiebra
Christian Borntraeger [Thu, 9 Jul 2015 19:21:42 +0000 (19:21 +0000)] 
Fix from Andreas Arnez for bug 342841  s390x unrecognized instruction fiebra

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

11 years agoMinor updates; also note the fixing of 346411.
Julian Seward [Wed, 8 Jul 2015 17:13:46 +0000 (17:13 +0000)] 
Minor updates; also note the fixing of 346411.

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

11 years agoFix "346411 MIPS: SysRes::_valEx handling is incorrect"
Julian Seward [Wed, 8 Jul 2015 17:08:23 +0000 (17:08 +0000)] 
Fix "346411  MIPS: SysRes::_valEx handling is incorrect"
Specialise type SysRes for mips{32,64}-linux to enable
meaningful equality comparisons.

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

11 years agoPreliminary support for OS X 10.11 (El Capitan). Refer BZ#348909 for ongoing work.
Rhys Kidd [Wed, 8 Jul 2015 13:46:57 +0000 (13:46 +0000)] 
Preliminary support for OS X 10.11 (El Capitan). Refer BZ#348909 for ongoing work.

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

11 years agoRoughly classify all the bugs in 3_10_BUGSTATUS.txt.
Julian Seward [Wed, 8 Jul 2015 09:22:40 +0000 (09:22 +0000)] 
Roughly classify all the bugs in 3_10_BUGSTATUS.txt.

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

11 years agoFix a bug for TileGX platform found by instruction tests.
Zhi-Gang Liu [Tue, 7 Jul 2015 14:28:38 +0000 (14:28 +0000)] 
Fix a bug for TileGX platform found by instruction tests.

The issue is of the dirty helper of the SIMD instructions
with immediate operand.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3161

11 years agoVG_(get_StackTrace_wrk) for x86-{linux,darwin}: when following
Julian Seward [Tue, 7 Jul 2015 14:06:00 +0000 (14:06 +0000)] 
VG_(get_StackTrace_wrk) for x86-{linux,darwin}: when following
frame-pointer chains (via EBP), don't continue if EBP doesn't contain
a 4-aligned value.  A misaligned EBP is almost certainly invalid --
hence, no loss in unwind capability here -- and the misaligned access
causes gcc 5.1 ubsan alignment checks to fail.  So avoid them.

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

11 years agoUpdate.
Julian Seward [Tue, 7 Jul 2015 13:29:09 +0000 (13:29 +0000)] 
Update.

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

11 years ago349941 di_notify_mmap might create wrong start/size DebugInfoMapping
Mark Wielaard [Tue, 7 Jul 2015 13:01:40 +0000 (13:01 +0000)] 
349941 di_notify_mmap might create wrong start/size DebugInfoMapping

Use seg->start instead of a as DebugInfoMapping avma. Normally seg->start
equals a. But when it is not then the size of the map might extend beyond
the segment (and not actually cover the start of the segment). When another
ELF file is them mapped right after this then it triggers an overlap purge
of the DebugInfo. In the case the mapping was for libc or ld.so this then
removes all intercepts causing "bad things".

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

11 years ago349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)
Mark Wielaard [Tue, 7 Jul 2015 13:01:39 +0000 (13:01 +0000)] 
349828 memcpy intercepts memmove causing src/dst overlap error (ppc64 ld.so)

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

11 years agoAdd some functions for misaligned load/store support, and use them
Julian Seward [Tue, 7 Jul 2015 12:41:33 +0000 (12:41 +0000)] 
Add some functions for misaligned load/store support, and use them
in the x86 and amd64 chainer/unchainer.  This makes it possible to
run at least some programs when built with gcc 5.1, with ubsan misaligned
checking enabled.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3160

11 years agoRevert an accidental change to the address space manager that sneaked
Florian Krohm [Mon, 6 Jul 2015 20:22:16 +0000 (20:22 +0000)] 
Revert an accidental change to the address space manager that sneaked
in in r15394.

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

11 years agoFollowup to r15394 and BZ #349874. Ensure tests align with (corrected) output.
Rhys Kidd [Mon, 6 Jul 2015 09:34:12 +0000 (09:34 +0000)] 
Followup to r15394 and BZ #349874. Ensure tests align with (corrected) output.

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

11 years agoFix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Florian Krohm [Sun, 5 Jul 2015 21:53:33 +0000 (21:53 +0000)] 
Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874

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

11 years agoFix scripts to use /bin/true consistently.
Florian Krohm [Fri, 3 Jul 2015 20:07:08 +0000 (20:07 +0000)] 
Fix scripts to use /bin/true consistently.

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

11 years agoFix Memcheck: the 'impossible' happened: unexpected size for Addr (OSX/wine)
Rhys Kidd [Wed, 1 Jul 2015 23:04:58 +0000 (23:04 +0000)] 
Fix Memcheck: the 'impossible' happened: unexpected size for Addr (OSX/wine)
bz#347988
== 345929

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@15391

11 years agoBacking out patch 1 and 2 from Bugzilla 349790.
Carl Love [Wed, 1 Jul 2015 21:29:12 +0000 (21:29 +0000)] 
Backing out patch 1 and 2 from Bugzilla 349790.

The new script (tests/check_ppc64_auxv_cap) in the first patch was
written for the bash shell.  I was told by fkrohm that there was an
issue with bash sometime ago and the decision was to use sh instead.
sh maps to bash on a lot of systems but on some it maps to dash.  The
script is not compatible with dash.

In retesting the second patch with a fresh svn pull, I found that I
forgot to do the svn add for the new script file.  Which causes the
regression test to fail with the second patch applied.

So, I have decided it will be best to just back out patch 1 and 2 for now.
I will fix the script and do this again.

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

11 years agoPatch 2 of 6
Carl Love [Wed, 1 Jul 2015 19:44:13 +0000 (19:44 +0000)] 
Patch 2 of 6

Update all vgtest files to reference the new capability check helper.
This includes a few adjustments to ensure the test is checking for
the proper capability. (i.e. htm versus isa_2_07).

Patch 1 valgrind commit id 15388.

The bugzilla for this commit is 349790

Patch submitted by   Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>

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

11 years agoPatch 1 of 6
Carl Love [Wed, 1 Jul 2015 18:48:48 +0000 (18:48 +0000)] 
Patch 1 of 6

Rework the aux vector hwcap capability checking utilities.
This is meant to consolidate a number of existing _cap
checking scripts, and allow a better way of checking for
additional capabilites.

The bugzilla for this commit is 349790

Patch submitted by   Will Schmidt <will_schmidt@vnet.ibm.com>
Reviewed and tested by Carl Love <cel@ibm.com>

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

11 years agoFix condition to avoid that decode[] is indexed out-of-bounds.
Florian Krohm [Wed, 1 Jul 2015 11:30:02 +0000 (11:30 +0000)] 
Fix condition to avoid that decode[] is indexed out-of-bounds.
Spotted by Coverity.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3159

11 years agoRemove unused computations. Spotted by Coverity.
Florian Krohm [Wed, 1 Jul 2015 11:07:03 +0000 (11:07 +0000)] 
Remove unused computations. Spotted by Coverity.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3158

11 years ago* Fix ubsan failures in mullS64 due to signed integer overflow.
Julian Seward [Tue, 30 Jun 2015 13:37:45 +0000 (13:37 +0000)] 
* Fix ubsan failures in mullS64 due to signed integer overflow.
* Take the opportunity to replace 0xFFFFFFFF with a symbolic
  constant.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3157

11 years agoAdd news entry for bugzilla #349626
Bart Van Assche [Sun, 28 Jun 2015 17:06:14 +0000 (17:06 +0000)] 
Add news entry for bugzilla #349626

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

11 years agoxen: Drop bogus port field from vki_xen_ioctl_evtchn_bind_virq
Bart Van Assche [Sun, 28 Jun 2015 16:57:48 +0000 (16:57 +0000)] 
xen: Drop bogus port field from vki_xen_ioctl_evtchn_bind_virq

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

11 years agoxen: Implement physdev_op and map_pirq
Bart Van Assche [Sun, 28 Jun 2015 16:57:10 +0000 (16:57 +0000)] 
xen: Implement physdev_op and map_pirq

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

11 years agoxen: Implement the xsm_op hypercall
Bart Van Assche [Sun, 28 Jun 2015 16:55:45 +0000 (16:55 +0000)] 
xen: Implement the xsm_op hypercall

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

11 years agoxen: syswrap XEN_SCHEDOP_remote_shutdown
Bart Van Assche [Sun, 28 Jun 2015 16:53:58 +0000 (16:53 +0000)] 
xen: syswrap XEN_SCHEDOP_remote_shutdown

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

11 years agoFollow-up for r15381
Bart Van Assche [Sun, 28 Jun 2015 16:52:49 +0000 (16:52 +0000)] 
Follow-up for r15381

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

11 years agoxen: Basic syswrap infrastructure for XEN_sched_op hypercalls
Bart Van Assche [Sun, 28 Jun 2015 16:48:22 +0000 (16:48 +0000)] 
xen: Basic syswrap infrastructure for XEN_sched_op hypercalls

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

11 years agoxen: Implement memory map hypercalls
Bart Van Assche [Sun, 28 Jun 2015 16:47:13 +0000 (16:47 +0000)] 
xen: Implement memory map hypercalls

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

11 years agoxen: syswrap XENMEM_machphys_compat_mfn_list
Bart Van Assche [Sun, 28 Jun 2015 16:46:30 +0000 (16:46 +0000)] 
xen: syswrap XENMEM_machphys_compat_mfn_list

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

11 years agosyswrap-xen.c: Make indentation consistent
Bart Van Assche [Sun, 28 Jun 2015 16:45:44 +0000 (16:45 +0000)] 
syswrap-xen.c: Make indentation consistent

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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 years agomips64: do not use 64-bit loads for lwl/lwr instructions
Petar Jovanovic [Wed, 24 Jun 2015 18:47:39 +0000 (18:47 +0000)] 
mips64: do not use 64-bit loads for lwl/lwr instructions

As reported in BZ #346562, lwl/lwr were implemented incorrectly using
64-bit loads. This has led to incorrect "invalid read of size 8"
warnings. This patch fixes it, and it does some formatting to make the
code more readable.

Original version of the patch proposed by Crestez Dan Leonard.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3156

11 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

11 years agoFix a few undefined shift operations as spotted by ubsan.
Florian Krohm [Mon, 22 Jun 2015 11:53:48 +0000 (11:53 +0000)] 
Fix a few undefined shift operations as spotted by ubsan.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3155

11 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

11 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

11 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

11 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

11 years ago* x86: on an SSE2 only host, Valgrind in 32 bits now claims to be a Pentium 4.
Philippe Waroquiers [Thu, 18 Jun 2015 21:31:32 +0000 (21:31 +0000)] 
* x86: on an SSE2 only host, Valgrind in 32 bits now claims to be a Pentium 4.
       3.10.1 was wrongly claiming to be a CORE 2, which is SSSE3.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3154

11 years agoA SSE2 only CPU was reported to the guest as a SSE3 CPU.
Philippe Waroquiers [Wed, 17 Jun 2015 21:33:19 +0000 (21:33 +0000)] 
A SSE2 only CPU was reported to the guest as a SSE3 CPU.
The guest code might then select functions calling invalid
instructions.
E.G. giving:
  vex x86->IR: unhandled instruction bytes: 0x66 0xF 0x3A 0xF
  ==13094== valgrind: Unrecognised instruction at address 0x496d4d3.
  ==13094==    at 0x496D4D3: __mempcpy_ssse3 (memcpy-ssse3.S:771)
  ==13094==    by 0x125E0B: ??? (in /bin/dash)
as the host hw cap is not SSE3 enabled, while the guest believes
SSE3 can be used.

So, change CPUID so as to report an SSE3 if the hw is SSE3,
and otherwise SSE1 or lower.

(an SSE2 cpu might be added later on)

git-svn-id: svn://svn.valgrind.org/vex/trunk@3153

11 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

11 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

11 years agomips64: add support for Cavium LHX
Petar Jovanovic [Tue, 16 Jun 2015 23:40:21 +0000 (23:40 +0000)] 
mips64: add support for Cavium LHX

This patch adds support for LHX (Load Halfword Indexed) instruction.
It is available on CVMv2/MIPS DSP.

Issue reported in BZ #345987.

Patch by Crestez Dan Leonard.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3152

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 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

11 years agoJust a dummy white space change to record the fact that in
Florian Krohm [Fri, 5 Jun 2015 19:48:24 +0000 (19:48 +0000)] 
Just a dummy white space change to record the fact that in
r3150 an incorrect BZ # was referenced.
It should say in r3150: BZ #348748  not  BZ #348565.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3151

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

git-svn-id: svn://svn.valgrind.org/vex/trunk@3150

11 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

11 years agoOpps, missed a change in the previous patch. Forgot to remove the format
Carl Love [Fri, 5 Jun 2015 18:52:57 +0000 (18:52 +0000)] 
Opps, missed a change in the previous patch.  Forgot to remove the format
specifier.

The dcbt and dcbtst instructions provide a non-zero hint that describes
a block or data stream to which a program may perform a Store acces,
or indicates the expected use.  The field bits[25:21] (bits 6:10 in
the IBM numbering) in the instruction provide the hint.

Valgrind checks that these bits are non-zero.  Unfortunately, the test was
being applied to other instructions such as the dcbf instruction causing
it to fail when the field was equal to zero.  This patch removes the check
that was being incorrectly applied to all of the instructions.

The valgrind bugzilla for this issue is 348334.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3149

11 years agoThe dcbt and dcbtst instructions provide a non-zero hint that describes
Carl Love [Fri, 5 Jun 2015 17:58:23 +0000 (17:58 +0000)] 
The dcbt and dcbtst instructions provide a non-zero hint that describes
a block or data stream to which a program may perform a Store acces,
or indicates the expected use.  The field bits[25:21] (bits 6:10 in
the IBM numbering) in the instruction provide the hint.

Valgrind checks that these bits are non-zero.  Unfortunately, the test was
being applied to other instructions such as the dcbf instruction causing
it to fail when the field was equal to zero.  This patch removes the check
that was being incorrectly applied to all of the instructions.

The valgrind bugzilla for this issue is 348334.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3148

11 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

11 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

11 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

11 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

11 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

11 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