Commit Graph

5030 Commits

Author SHA1 Message Date
Florian Krohm
128fe0d9c4 Fix BZ #338606. Basically, the bug was that it was believed that
the interpreter following the #! has to be an absolute path name.
Not so; relative path works just fine.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15429
2015-07-21 21:37:23 +00:00
Julian Seward
ac60633d65 Bug 345248 - add support for Solaris OS in valgrind
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
2015-07-21 14:44:28 +00:00
Rhys Kidd
b5ce362e7b Documentation: Ensure alignment of the x86 and amd64 darwin code in m_sigframe. Follows from a side-by-side code review.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15415
2015-07-18 05:53:56 +00:00
Petar Jovanovic
6fa0e74c20 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
2015-07-15 18:07:36 +00:00
Rhys Kidd
dd23e30c68 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
2015-07-12 13:25:55 +00:00
Rhys Kidd
042441c57f 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
2015-07-12 06:54:56 +00:00
Rhys Kidd
89c527ff7b 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
2015-07-10 08:14:18 +00:00
Julian Seward
2ac4c69401 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
2015-07-08 17:08:23 +00:00
Rhys Kidd
0fcd971d15 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
2015-07-08 13:46:57 +00:00
Julian Seward
1c9d03a09d 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
2015-07-07 14:06:00 +00:00
Mark Wielaard
c814eb6b35 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
2015-07-07 13:01:40 +00:00
Florian Krohm
20efd87659 Revert an accidental change to the address space manager that sneaked
in in r15394.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15396
2015-07-06 20:22:16 +00:00
Florian Krohm
7a474c9455 Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).
Fixes BZ #349874


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394
2015-07-05 21:53:33 +00:00
Bart Van Assche
a914bcf7f5 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
2015-06-28 16:57:10 +00:00
Bart Van Assche
b64fedcf91 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
2015-06-28 16:55:45 +00:00
Bart Van Assche
31229b7020 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
2015-06-28 16:53:58 +00:00
Bart Van Assche
d2a0392539 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
2015-06-28 16:48:22 +00:00
Bart Van Assche
f49647fd78 xen: Implement memory map hypercalls
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15380
2015-06-28 16:47:13 +00:00
Bart Van Assche
7a8a964019 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
2015-06-28 16:46:30 +00:00
Bart Van Assche
15667c1499 syswrap-xen.c: Make indentation consistent
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15378
2015-06-28 16:45:44 +00:00
Bart Van Assche
b51ec07994 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
2015-06-28 16:44:21 +00:00
Bart Van Assche
56e19e386d 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
2015-06-28 16:43:14 +00:00
Bart Van Assche
04c609b998 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
2015-06-28 16:42:38 +00:00
Bart Van Assche
278a3d1df5 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
2015-06-28 16:42:05 +00:00
Bart Van Assche
e93aa3706d 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
2015-06-28 16:41:06 +00:00
Bart Van Assche
3fc699dda3 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
2015-06-28 16:39:47 +00:00
Bart Van Assche
8269099b13 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
2015-06-28 16:38:40 +00:00
Bart Van Assche
10d6d0a7ad 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
2015-06-28 16:37:54 +00:00
Bart Van Assche
7806d251be 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
2015-06-28 16:36:30 +00:00
Bart Van Assche
26c53cda38 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
2015-06-28 16:35:13 +00:00
Bart Van Assche
1b6ca5d030 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
2015-06-28 16:34:20 +00:00
Bart Van Assche
b1e2a3e6a1 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
2015-06-28 16:33:04 +00:00
Bart Van Assche
c35715d20a 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
2015-06-28 16:31:54 +00:00
Bart Van Assche
4e84ded15a 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
2015-06-28 16:30:36 +00:00
Rhys Kidd
9b3e7344ca 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
2015-06-28 04:06:30 +00:00
Florian Krohm
0b6735e2ed Fix a comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15355
2015-06-25 21:12:44 +00:00
Florian Krohm
4eeecae9b7 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
2015-06-19 12:01:07 +00:00
Philippe Waroquiers
8c8cd6c9fc 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
2015-06-17 19:57:09 +00:00
Rhys Kidd
700aa31d8d 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
2015-06-13 22:59:47 +00:00
Rhys Kidd
e35b06fbb8 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
2015-06-13 06:16:10 +00:00
Christian Borntraeger
c2baee9b7b add KVM_S390_MEMOP ioctl handling
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15334
2015-06-12 10:54:12 +00:00
Julian Seward
337e580745 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
2015-06-08 11:20:22 +00:00
Rhys Kidd
0f1f6e7bdc 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
2015-06-08 11:07:48 +00:00
Philippe Waroquiers
8f30180df2 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
2015-06-07 10:38:39 +00:00
Rhys Kidd
e4d96677ef 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
2015-06-06 04:18:49 +00:00
Rhys Kidd
d2e68860c9 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
2015-06-06 03:57:34 +00:00
Florian Krohm
2de98199b0 Add -Wempty-body to the list of compile flags.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15319
2015-06-05 16:26:14 +00:00
Julian Seward
a4d69434b8 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
2015-06-05 11:25:32 +00:00
Julian Seward
eed8fbcd80 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
2015-06-05 11:23:35 +00:00
Julian Seward
5058294f3e Fix format string mismatch.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15312
2015-06-05 10:03:56 +00:00