]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
12 years agomips32/mips64: Avoid breakpoints in branch delay slots
Petar Jovanovic [Sat, 13 Jul 2013 23:50:46 +0000 (23:50 +0000)] 
mips32/mips64: Avoid breakpoints in branch delay slots

Reusing parts of Chris Dearman's change in GDB to avoid placing breakpoints
in a branch delay slot.
Fixes gdbserver_tests/mcbreak for MIPS32 and MIPS64.

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

12 years agomips32: another VG_(am_get_advisory) needs non-single-page-size adjustment
Petar Jovanovic [Fri, 12 Jul 2013 15:32:27 +0000 (15:32 +0000)] 
mips32: another VG_(am_get_advisory) needs non-single-page-size adjustment

Another mmap issue in which another VG_(am_get_advisory) needs adjustment
wrapper for cases when (VKI_SHMLBA > VKI_PAGE_SIZE) and argument is
VKI_MAP_SHARED.

Fix by DejanJ for Bug #320057.
Issue and the test case by Vasile Floroiu.

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

12 years agoBug 321969. Support [lf]setxattr on ppc32 and ppc64 linux kernel.
Mark Wielaard [Fri, 5 Jul 2013 09:50:26 +0000 (09:50 +0000)] 
Bug 321969. Support [lf]setxattr on ppc32 and ppc64 linux kernel.

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

12 years agoUpdate bug status.
Julian Seward [Thu, 4 Jul 2013 20:49:48 +0000 (20:49 +0000)] 
Update bug status.

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

12 years agoAdd test cases pertaining to vex r2731, for the following instructions:
Julian Seward [Thu, 4 Jul 2013 20:39:53 +0000 (20:39 +0000)] 
Add test cases pertaining to vex r2731, for the following instructions:
  SSAX SXTAB16 SHASX SHSAX SHSUB16 SHSUB8
  UASX USAX UQADD16 UQASX UQSAX UHASX UHSAX REVSH

Pertaining to
  321363 321364 321466 321467 321468 321619 321704
  321620 321621 321692 321694 321696 321697 321703

(Vasily, w.golubev@mail.ru)

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

12 years agoHandle Iop_QAdd16Ux2. Needed for recent ARM v6media additions committed
Julian Seward [Thu, 4 Jul 2013 20:37:33 +0000 (20:37 +0000)] 
Handle Iop_QAdd16Ux2.  Needed for recent ARM v6media additions committed
in vex r2731.

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

12 years agoAdd test cases for
Julian Seward [Thu, 4 Jul 2013 15:29:07 +0000 (15:29 +0000)] 
Add test cases for
(T1) STRBT reg+#imm8
(T1) STRHT reg+#imm8
(T1) LDRBT reg+#imm8
(T1) LDRSBT reg+#imm8

Pertaining to: 319858 319932 320083 321693 321148

(Vasily, w.golubev@mail.ru)

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

12 years agoUpdate bug status.
Julian Seward [Wed, 3 Jul 2013 11:16:31 +0000 (11:16 +0000)] 
Update bug status.

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

12 years agoBug 321738 Add manpages for vgdb and valgrind-listener.
Mark Wielaard [Wed, 3 Jul 2013 10:00:19 +0000 (10:00 +0000)] 
Bug 321738 Add manpages for vgdb and valgrind-listener.

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

12 years agoBug 321730 Add cg_merge and cg_diff man pages.
Mark Wielaard [Wed, 3 Jul 2013 10:00:17 +0000 (10:00 +0000)] 
Bug 321730 Add cg_merge and cg_diff man pages.

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

12 years agoUpdate expected outputs.
Julian Seward [Tue, 2 Jul 2013 20:47:24 +0000 (20:47 +0000)] 
Update expected outputs.

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

12 years agoMerge r13421:HEAD from branches/DISRV. This merges the debuginfo-server
Julian Seward [Tue, 2 Jul 2013 08:07:15 +0000 (08:07 +0000)] 
Merge r13421:HEAD from branches/DISRV.  This merges the debuginfo-server
stuff into the trunk.

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

12 years agoMinor improvements in debug printing for stabs reading.
Julian Seward [Tue, 2 Jul 2013 07:11:14 +0000 (07:11 +0000)] 
Minor improvements in debug printing for stabs reading.

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

12 years ago[PATCH 4/4] xen: VKI_XENMEM_get_sharing_{freed, shared}_pages hypercall (#321065)
Bart Van Assche [Sun, 30 Jun 2013 07:59:50 +0000 (07:59 +0000)] 
[PATCH 4/4] xen: VKI_XENMEM_get_sharing_{freed, shared}_pages hypercall (#321065)

From: Andrew Cooper <andrew.cooper3@citrix.com>

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

12 years ago[PATCH 3/4] xen: VKI_XEN_SYSCTL_sched_id hypercall (#321065)
Bart Van Assche [Sun, 30 Jun 2013 07:59:09 +0000 (07:59 +0000)] 
[PATCH 3/4] xen: VKI_XEN_SYSCTL_sched_id hypercall (#321065)

From: Andrew Cooper <andrew.cooper3@citrix.com>

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

12 years ago[PATCH 2/4] xen: update for interface changes in Xen 4.3 release (#321065)
Bart Van Assche [Sun, 30 Jun 2013 07:58:19 +0000 (07:58 +0000)] 
[PATCH 2/4] xen: update for interface changes in Xen 4.3 release (#321065)

From: Ian Campbell <ian.campbell@citrix.com>

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

12 years ago[PATCH 1/4] xen: distinguish the various fields of the Xen privcmd ioctls in the...
Bart Van Assche [Sun, 30 Jun 2013 07:57:35 +0000 (07:57 +0000)] 
[PATCH 1/4] xen: distinguish the various fields of the Xen privcmd ioctls in the logging (#321065)

From: Ian Campbell <ian.campbell@citrix.com>

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

12 years agoMake the ppc64-linux .opd-reading machinery work in the new framework.
Julian Seward [Sat, 29 Jun 2013 08:38:37 +0000 (08:38 +0000)] 
Make the ppc64-linux .opd-reading machinery work in the new framework.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13434

12 years agoBug 289360 parse_type_DIE confused by DW_TAG_enumeration_type.
Mark Wielaard [Fri, 28 Jun 2013 14:03:58 +0000 (14:03 +0000)] 
Bug 289360 parse_type_DIE confused by DW_TAG_enumeration_type.

GCC allows incomplete enums as GNU extension.
http://gcc.gnu.org/onlinedocs/gcc/Incomplete-Enums.html
These are marked as DW_AT_declaration and won't have a size.
They can only be used in declaration or as pointer types.
You can't allocate variables or storage using such an enum type.
So don't require a size for such enum types.

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

12 years agoExit a bit more gracefully if a request to get part of an image
Julian Seward [Thu, 27 Jun 2013 20:31:36 +0000 (20:31 +0000)] 
Exit a bit more gracefully if a request to get part of an image
exceeds the allowable range.  With this change, it should be
essentially impossible to crash V by feeding it invalid ELF or Dwarf.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13432

12 years agoMinimal changes needed to make this suitable for trunk:
Julian Seward [Thu, 27 Jun 2013 17:39:15 +0000 (17:39 +0000)] 
Minimal changes needed to make this suitable for trunk:

* add a new flag --allow-mismatched-debuginfo to override the
  CRC32/build-id checks, if needed

* tidy up logic for finding files on the --extra-debuginfo-path
  and at the --debuginfo-server

* don't assert if connection to the debuginfo server is lost;
  instead print a reasonable message and quit.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13431

12 years agoConnect up the Mach-O reader to the new DiImage abstractions.
Julian Seward [Tue, 25 Jun 2013 12:42:52 +0000 (12:42 +0000)] 
Connect up the Mach-O reader to the new DiImage abstractions.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13430

12 years agos390: Update testcase for PFPO
Florian Krohm [Mon, 17 Jun 2013 21:04:25 +0000 (21:04 +0000)] 
s390: Update testcase for PFPO
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

12 years agovalgrind side changes to support the new IRops introduced
Florian Krohm [Mon, 17 Jun 2013 19:04:24 +0000 (19:04 +0000)] 
valgrind side changes to support the new IRops introduced
in VEX r2727 (conversion ops between binary floating point and
decimal floating point).
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

12 years agoUpdate list of ignored files.
Florian Krohm [Mon, 17 Jun 2013 18:44:15 +0000 (18:44 +0000)] 
Update list of ignored files.

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

12 years agoimprove --help for --main-stacksize and supported ARM cpu
Philippe Waroquiers [Wed, 12 Jun 2013 21:45:39 +0000 (21:45 +0000)] 
improve --help for --main-stacksize and supported ARM cpu
If the command line option --main-stacksize is not used,
the current ulimit value is used, with a min of 1MB
and a max of 16MB. Document this min/max default formula
in the --help.

Also indicate that Valgrind supports ARMv7

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

12 years agoImprove performance of CRC32 computations for files in the local filesystem.
Julian Seward [Mon, 10 Jun 2013 08:34:26 +0000 (08:34 +0000)] 
Improve performance of CRC32 computations for files in the local filesystem.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13425

12 years agomips64: fix typo in EXTRA_DIST
Petar Jovanovic [Sun, 9 Jun 2013 14:29:10 +0000 (14:29 +0000)] 
mips64: fix typo in EXTRA_DIST

Fixes make dist error.
Typo spotted and reported by Maran Pakkirisamy <maranp@linux.vnet.ibm.com>

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

12 years agoInitial code for remote debuginfo server. Handles all ELF/Dwarf{2,3,4}
Julian Seward [Fri, 7 Jun 2013 16:15:48 +0000 (16:15 +0000)] 
Initial code for remote debuginfo server.  Handles all ELF/Dwarf{2,3,4}
on Linux.  No Dwarf1, no Stabs, and MacOSX probably won't build.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13423

12 years agoCreate brances/DISRV as a copy of trunk r13421, to hold work
Julian Seward [Fri, 7 Jun 2013 16:02:32 +0000 (16:02 +0000)] 
Create brances/DISRV as a copy of trunk r13421, to hold work
on a remote debuginfo server.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/DISRV@13422

12 years agoMore comment only changes as the "DFP rounding mode" has been removed.
Florian Krohm [Thu, 6 Jun 2013 21:21:46 +0000 (21:21 +0000)] 
More comment only changes as the "DFP rounding mode" has been removed.

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

12 years agoUpdate list of ignored files.
Florian Krohm [Thu, 6 Jun 2013 19:20:53 +0000 (19:20 +0000)] 
Update list of ignored files.

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

12 years agoComment only changes: IRRoundingModeDFP -> IRRoundingMode.
Florian Krohm [Thu, 6 Jun 2013 19:13:29 +0000 (19:13 +0000)] 
Comment only changes: IRRoundingModeDFP -> IRRoundingMode.

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

12 years agomips64: add cases in wrappers for ptrace calls with GETREGSET
Petar Jovanovic [Mon, 3 Jun 2013 15:33:09 +0000 (15:33 +0000)] 
mips64: add cases in wrappers for ptrace calls with GETREGSET

Add cases for PTRACE_GETREGSET in PRE(sys_ptrace) and POST(sys_ptrace).

This fixes memcheck/tests/linux/getregset on MIPS64 platforms with kernel
that supports ptrace call with PTRACE_GETREGSET.

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

12 years agomips64: disable intercepting the spinlock function
Petar Jovanovic [Sun, 2 Jun 2013 18:08:04 +0000 (18:08 +0000)] 
mips64: disable intercepting the spinlock function

This change disables intercepting pthread_spin_lock() for MIPS64, similar to
r13190 for MIPS32. Used in DRD and Helgrind as a workaround for the issue
#311690.

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

12 years agomips64: add missing line-continuation character
Petar Jovanovic [Sun, 2 Jun 2013 17:23:43 +0000 (17:23 +0000)] 
mips64: add missing line-continuation character

make distclean failed for the missing character.

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

12 years agoupdate cond_ld_st test and expected outputs
Petar Jovanovic [Sun, 2 Jun 2013 03:22:28 +0000 (03:22 +0000)] 
update cond_ld_st test and expected outputs

Line numbers are off by one in some outputs since it differs on GCC version
how it will map source code to line number for the ternary operator written
in multiple lines.
This is small fix that replaces one occurrence of ternary operator with
if-then-else. The excepted outputs have been changed accordingly.

This fixes the test memcheck/tests/cond_ld_st for different platforms with
different GCC versions.

Tested on x86, i386, ARM, MIPS32, and MIPS64.

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

12 years agoadd and update exp files for drd/tests/annotate_trace_memory
Petar Jovanovic [Sun, 2 Jun 2013 02:59:07 +0000 (02:59 +0000)] 
add and update exp files for drd/tests/annotate_trace_memory

exp-32bit files needed minor update for the last store, and some mips32
platforms also need additional exp-mips32 due to different way of loading
and storing double values.

This fixes drd/tests/annotate_trace_memory on different 32-bit platforms.

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

12 years agos390x: The CC_DEP1 field is accessed as a whole or bits [0:31]
Florian Krohm [Fri, 31 May 2013 15:44:06 +0000 (15:44 +0000)] 
s390x: The CC_DEP1 field is accessed as a whole or bits [0:31]
in case the field holds a 32-bit floating point value.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.

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

12 years agomips64: rename exp files for load_store_multiple
Petar Jovanovic [Wed, 29 May 2013 10:50:31 +0000 (10:50 +0000)] 
mips64: rename exp files for load_store_multiple

Rename none/tests/mips64/load_store_multiple exp files to match the name
of the source file.

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

12 years agomips64: expected output for mips64 specific tests
Petar Jovanovic [Tue, 28 May 2013 18:06:05 +0000 (18:06 +0000)] 
mips64: expected output for mips64 specific tests

Follow up to the previous change in which mips64 specific tests were added.
It covers both MIPS64-LE and MIPS64-BE.

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

12 years agomips64: set of mips64 specific tests
Petar Jovanovic [Tue, 28 May 2013 16:51:27 +0000 (16:51 +0000)] 
mips64: set of mips64 specific tests

This is a set of mips64 programs that test mips64 instruction set.

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

12 years agofix 320211 Stack buffer overflow in ./coregrind/m_main.c with huge TMPDIR
Philippe Waroquiers [Sun, 26 May 2013 21:09:20 +0000 (21:09 +0000)] 
fix 320211 Stack buffer overflow in ./coregrind/m_main.c with huge TMPDIR
* Addition of a function to compute size of buffer needed for VG_(mkstemp)
* Use it to dimension buffers for all VG_(mkstemp) calls.

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

12 years agoRevert "Disable drd/tests/annotate_trace_memory[_xml].vgtest on arm and ppc."
Mark Wielaard [Wed, 22 May 2013 20:43:25 +0000 (20:43 +0000)] 
Revert "Disable drd/tests/annotate_trace_memory[_xml].vgtest on arm and ppc."

The tests have been changed to not depend on atomic 64bit add_and_fetch.

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

12 years agodrd/tests/annotate_trace_memory no longer depends on 64-bit atomics
Bart Van Assche [Wed, 22 May 2013 18:01:16 +0000 (18:01 +0000)] 
drd/tests/annotate_trace_memory no longer depends on 64-bit atomics

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

12 years agodrd/tests/annotate_trace_memory: Make this test more ARM/PPC friendly (#318643)
Bart Van Assche [Wed, 22 May 2013 16:30:29 +0000 (16:30 +0000)] 
drd/tests/annotate_trace_memory: Make this test more ARM/PPC friendly (#318643)

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

12 years agoDon't break platforms without AF_BLUETOOTH.
Mark Wielaard [Wed, 22 May 2013 10:37:52 +0000 (10:37 +0000)] 
Don't break platforms without AF_BLUETOOTH.

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

12 years agoSupport Linux kernel AF_BLUETOOTH for bind().
Mark Wielaard [Wed, 22 May 2013 10:21:10 +0000 (10:21 +0000)] 
Support Linux kernel AF_BLUETOOTH for bind().

Bug #320116. sockaddr_rc might contain some padding which might not be
initialized. Explicitly check the sockaddr_rc fields are set. That also
produces better diagnostics about which field is unitialized.

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

12 years agoSupport PTRACE_GET/SET_THREAD_AREA on x86.
Mark Wielaard [Wed, 22 May 2013 10:21:08 +0000 (10:21 +0000)] 
Support PTRACE_GET/SET_THREAD_AREA on x86.
BZ#320063.  (Josh Stone, jistone@redhat.com)

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

12 years agoDisable drd/tests/annotate_trace_memory[_xml].vgtest on arm and ppc.
Mark Wielaard [Wed, 22 May 2013 10:21:02 +0000 (10:21 +0000)] 
Disable drd/tests/annotate_trace_memory[_xml].vgtest on arm and ppc.

Workaround for bug #318643. Disable the tests for now so they don't
go into an infinite loop and fill up the disks on arm, ppc32 or ppc64.

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

12 years agoexp files for cond_ld and cond_st for 32-bit architectures
Petar Jovanovic [Mon, 20 May 2013 15:39:11 +0000 (15:39 +0000)] 
exp files for cond_ld and cond_st for 32-bit architectures

This fixes:
- memcheck/tests/cond_ld and
- memcheck/tests/cond_st

for 32-bit non-ARM architectures. Tested on IA32 and MIPS32.

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

12 years agomips: enable syscalls prlimit64, process_vm_readv, process_vm_writev
Petar Jovanovic [Tue, 14 May 2013 14:13:15 +0000 (14:13 +0000)] 
mips: enable syscalls prlimit64, process_vm_readv, process_vm_writev

Enable wrappers for syscalls prlimit64, process_vm_readv, process_vm_writev,
needed by the following tests:

- none/tests/rlimit64_nofile and
- none/tests/process_vm_readv_writev.

The change also adds definitions for several system calls for MIPS64.

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

12 years agomips: atomic_add_8bit and atomic_add_16bit for MIPS64-BE
Petar Jovanovic [Tue, 14 May 2013 13:33:27 +0000 (13:33 +0000)] 
mips: atomic_add_8bit and atomic_add_16bit for MIPS64-BE

It fixes memcheck/tests/atomic_incs on MIPS64-BE.

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

12 years agoFix incorrect filenames for the cond_ld_st tests.
Julian Seward [Mon, 13 May 2013 13:27:00 +0000 (13:27 +0000)] 
Fix incorrect filenames for the cond_ld_st tests.

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

12 years agoAdd test case for STRT. See #319395.
Julian Seward [Mon, 13 May 2013 10:29:32 +0000 (10:29 +0000)] 
Add test case for STRT.  See #319395.
(Vasily Golubev, w.golubev@mail.ru)

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

12 years agoAdd test cases for SSAT16. See #318929.
Julian Seward [Mon, 13 May 2013 10:03:28 +0000 (10:03 +0000)] 
Add test cases for SSAT16.  See #318929.
(Vasily Golubev, w.golubev@mail.ru)

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

12 years agocond_ld_st: Split the non-arm expected outputs into 32- and 64-bit
Julian Seward [Mon, 13 May 2013 09:13:04 +0000 (09:13 +0000)] 
cond_ld_st: Split the non-arm expected outputs into 32- and 64-bit
versions, since they will be different.

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

12 years agomemcheck/tests/cond_ld_st: add expected outputs for ARM, where
Julian Seward [Mon, 13 May 2013 08:35:19 +0000 (08:35 +0000)] 
memcheck/tests/cond_ld_st: add expected outputs for ARM, where
we are using real conditional load/store instructions.

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

12 years agoFix up output filtering for cond_st so that the stacks are
Julian Seward [Mon, 13 May 2013 08:28:31 +0000 (08:28 +0000)] 
Fix up output filtering for cond_st so that the stacks are
actually present.

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

12 years agoAdd test cases for instrumentation of IR-level loads and stores.
Julian Seward [Sun, 12 May 2013 11:07:59 +0000 (11:07 +0000)] 
Add test cases for instrumentation of IR-level loads and stores.

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

12 years agoWhitespace-only changes.
Julian Seward [Sun, 12 May 2013 10:43:31 +0000 (10:43 +0000)] 
Whitespace-only changes.

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

12 years agomips: code-style, remove some trailing spaces from MIPS header files
Petar Jovanovic [Sun, 12 May 2013 01:16:40 +0000 (01:16 +0000)] 
mips: code-style, remove some trailing spaces from MIPS header files

Non-function change, removing some trailing spaces from MIPS header files.

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

12 years agomips: default VKI_SHMLBA to the MIPS Linux kernel value SHMLBA
Petar Jovanovic [Sun, 12 May 2013 00:52:38 +0000 (00:52 +0000)] 
mips: default VKI_SHMLBA to the MIPS Linux kernel value SHMLBA

This change removes option to define shared-memory-alignment for MIPS,
instead default value (0x40000) from MIPS Linux kernel will be used.

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

12 years agomips: define allexec files as soft links
Petar Jovanovic [Sat, 11 May 2013 22:23:27 +0000 (22:23 +0000)] 
mips: define allexec files as soft links

This change is a follow up to r13385. It removes physical copies of the
allexec c-files in none/tests/mips32/ and none/tests/mips64/ and defines
them as soft-links to a common file like other arches do.

Credits to Philippe for noticing it.

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

12 years agos390: valgrind side support for PFPO. New hwcap added.
Florian Krohm [Sat, 11 May 2013 15:05:04 +0000 (15:05 +0000)] 
s390: valgrind side support for PFPO. New hwcap added.
See companion patch VEX r2719.

Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113

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

12 years agocomplainIfUndefined: reinstate the 3rd argument (guard) so as to make
Julian Seward [Sat, 11 May 2013 13:42:08 +0000 (13:42 +0000)] 
complainIfUndefined: reinstate the 3rd argument (guard) so as to make
the definedness check and possible shadow temp set-to-defined be
optional.  Use this to properly instrument IRLoadG and IRStoreG, so
that if the load/store does not happen, not only is the validity of
the address not checked, neither is the definedness.

This fixes a regression introduced by the COMEM branch on ARM, in
which conditional loads/stores with addresses which are undefined at
runtime and with guards which are false, would generate false errors.

Also extensively re-checked the check-generation machinery and updated
a bunch of comments.

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

12 years agomips: add allexec tests for mips64
Petar Jovanovic [Fri, 10 May 2013 13:14:54 +0000 (13:14 +0000)] 
mips: add allexec tests for mips64

Initial patch for none/tests/mips64/.
allexec tests added.

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

12 years agofix 319235 --db-attach=yes is broken with Yama ptrace scoping enabled
Philippe Waroquiers [Thu, 9 May 2013 21:29:23 +0000 (21:29 +0000)] 
fix 319235 --db-attach=yes is broken with Yama ptrace scoping enabled
On Ubuntu systems, ptrace_scoping could forbid a process to ptrace another.
This ptrace scoping was already handled for vgdb by using SET_PTRACER
(the valgrind process must be ptraced by vgdb when it is blocked
in a syscall).
set_ptracer is however also needed when the old mechanism --db-attach=yes
is used.
The following changes are done:
* make the set_ptracer logic callable outside gdbserver
* make set_ptracer less restrictive (i.e. allow all
  processes of the user to ptrace). This removes a limitation for vgdb.
* call the set_ptracer in the child launched for --db-attach=yes
* cleaned up the ptrace scope restriction message and doc as vgdb
  is now working properly by default, even with ptrace_scope enabled.

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

12 years agoAdd syscall suport for system calls sys_mbind, sys_set_mempolicy and
Carl Love [Tue, 7 May 2013 15:47:35 +0000 (15:47 +0000)] 
Add syscall suport for system calls sys_mbind, sys_set_mempolicy and
sys_get_mempolicy.

This patch add support for the PPC64 sytem calls:
        259 - sys_mbind
260 - sys_get_mempolicy
261 - sys_set_mempolicy

This patch also adds the Add syscall 259, sys_mbind, support for the PPC32
platform.

The patch fixes bugzilla 318932.

Signed-off-by: Carl Love <cel@us.ibm.com>
---

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

12 years agovalgrind side support for
Florian Krohm [Sun, 5 May 2013 15:05:42 +0000 (15:05 +0000)] 
valgrind side support for
Iop_F64toD64, Iop_D64toF64
Iop_F64toD128, Iop_D128toF64,
Iop_F128toD128, Iop_D128toF128

Companion patch of VEX r2717.
Patch by Maran Pakkirisamy (maranp@linux.vnet.ibm.com).
Part of fixing BZ #307113

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

12 years agofix gdbsrv inferior calls when PT_GNU_STACK declares stack not executable
Philippe Waroquiers [Thu, 2 May 2013 22:06:31 +0000 (22:06 +0000)] 
fix gdbsrv inferior calls when PT_GNU_STACK declares stack not executable
With rev 13368, Valgrind obeys PT_GNU_STACK making the stack not
executable. This makes inferior function call with GDB >= 7.5 failing,
as GDB places a breakpoint on the stack, which must be decoded
and translated by Valgrind to have the inferior function call properly done.
=> introduce a special case in the conditions to allow translation
when a segment is not executable but is readable and there is a
breakpoint at the address.

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

12 years agomips: extending the existing test for INS and EXT instructions
Petar Jovanovic [Sat, 27 Apr 2013 01:34:05 +0000 (01:34 +0000)] 
mips: extending the existing test for INS and EXT instructions

Follow up to r2715 in VEX in which we fix INS instruction for lsb = 0.

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

12 years agomips: fixup blksys_restart address for mips64
Petar Jovanovic [Fri, 26 Apr 2013 19:01:04 +0000 (19:01 +0000)] 
mips: fixup blksys_restart address for mips64

Restart logic has changed in kernel, this is counterpart in Valgrind.

This change fixes:

none/tests/syscall-restart1
none/tests/syscall-restart2

for mips64.

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

12 years agoIncrease size of the CIEs array to 5000.
Julian Seward [Fri, 26 Apr 2013 08:59:40 +0000 (08:59 +0000)] 
Increase size of the CIEs array to 5000.

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

12 years agoWhitespace changes only -- no functional change.
Julian Seward [Tue, 23 Apr 2013 12:15:37 +0000 (12:15 +0000)] 
Whitespace changes only -- no functional change.

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

12 years agoAdd test cases for SMMLA{R}.
Julian Seward [Tue, 23 Apr 2013 08:52:35 +0000 (08:52 +0000)] 
Add test cases for SMMLA{R}.

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

12 years agoAndroid's elf.h doesn't have PT_GNU_STACK (sigh) and so r13368 broke
Julian Seward [Mon, 22 Apr 2013 09:57:01 +0000 (09:57 +0000)] 
Android's elf.h doesn't have PT_GNU_STACK (sigh) and so r13368 broke
the build.  This conditionalises that fragment on the present of
PT_GNU_STACK.

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

12 years agoMinor changes to how V{LD}{1,2,3,4} are tested:
Julian Seward [Sat, 20 Apr 2013 23:43:49 +0000 (23:43 +0000)] 
Minor changes to how V{LD}{1,2,3,4} are tested:
* print the output 64-bit results in most-to-least-significant
  lane format
* change the memory values used in these tests to ones which
  are reliably able to detect confusion of 8-bit lanes.  The
  previous values couldn't to that reliable.  This change causes
  the diff to be huge because the stdout.exp changes a lot.

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

12 years agoCalculate offsets in read_dwarf2_lineblock based on is64
Petar Jovanovic [Fri, 19 Apr 2013 15:23:44 +0000 (15:23 +0000)] 
Calculate offsets in read_dwarf2_lineblock based on is64

Reading header length and values in external line info was incorrect at
some places as it used offsets based on dw64 that came from .debug_info.
Instead, offsets should be calculated based on is64 from .debug_line.
This issue surfaced in MIPS64 port, and it was discussed at:

https://bugs.kde.org/show_bug.cgi?id=313267#c20

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

12 years agoNon-functional changes: flush stdout frequently, so as to make
Julian Seward [Thu, 18 Apr 2013 11:52:19 +0000 (11:52 +0000)] 
Non-functional changes: flush stdout frequently, so as to make
it easier to sync with stderr output.  Also, add some more helpful
data for testing Neon loads/stores.

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

12 years agoFix -Ttext-segment configure check.
Mark Wielaard [Wed, 17 Apr 2013 19:11:05 +0000 (19:11 +0000)] 
Fix -Ttext-segment configure check.

Explicitly test together with -static -nodefaultlibs -nostartfiles to mimic
what the tools linking script does. At least on s390 the test might fail for
a non-static AC_LINK, while it does work when using those other flags too.

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

12 years agostrchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.
Mark Wielaard [Wed, 17 Apr 2013 15:23:22 +0000 (15:23 +0000)] 
strchr.vgtest mc_replace_strmem.c [r]index and [__GI_]str[r]chr are the same.

Add memcheck/tests/filter_strchr to make it so for the testcase.

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

12 years agoSimplify read_unitinfo_dwarf2. Only try to read the first DIE.
Mark Wielaard [Wed, 17 Apr 2013 13:48:29 +0000 (13:48 +0000)] 
Simplify read_unitinfo_dwarf2. Only try to read the first DIE.

Bug #305513. We should only read the first DIE of a compilation unit.
Each compilation unit header is followed by a single DW_TAG_compile_unit
(or DW_TAG_partial_unit, but those aren't important here) and its children.
There is no reason to read any of the children at this point. If the first
DIE isn't a DW_TAG_compile_unit we are done, none of the child DIEs will
provide any useful information.

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

12 years agoPay attention to PT_GNU_STACK when deciding what permissions to
Tom Hughes [Wed, 17 Apr 2013 10:08:04 +0000 (10:08 +0000)] 
Pay attention to PT_GNU_STACK when deciding what permissions to
use for the client stack.

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

12 years agoread_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.
Mark Wielaard [Thu, 11 Apr 2013 17:55:39 +0000 (17:55 +0000)] 
read_unitinfo_dwarf2 DW_FORM_ref_addr is address size in DWARF version 2.

Bug #305513 contained a patch for some extra robustness checks. But
the real cause of crashing in the read_unitinfo_dwarf2 DWARF reader
seemed to have been this issue where DWARF version 2 DWZ partial_units
were read and DW_FORM_ref_addr had an unexpected size. This combination
is rare. DWARF version 4 is the current default version of GCC.

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

12 years agoUpdate.
Julian Seward [Thu, 11 Apr 2013 16:17:45 +0000 (16:17 +0000)] 
Update.

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

12 years agoAdd test cases for SDIV and UDIV. Pertains to #314178.
Julian Seward [Thu, 11 Apr 2013 13:58:48 +0000 (13:58 +0000)] 
Add test cases for SDIV and UDIV.  Pertains to #314178.

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

12 years agoAdd test cases for (T1) LDRT reg+#imm8. See #315689.
Julian Seward [Thu, 11 Apr 2013 10:58:18 +0000 (10:58 +0000)] 
Add test cases for (T1) LDRT reg+#imm8.  See #315689.

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

12 years agoFix double 'the the' in documentation.
Mark Wielaard [Fri, 5 Apr 2013 13:19:12 +0000 (13:19 +0000)] 
Fix double 'the the' in documentation.

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

12 years agotemporarily disable memalign part of the undef_malloc_args.c test
Philippe Waroquiers [Fri, 5 Apr 2013 12:53:16 +0000 (12:53 +0000)] 
temporarily disable memalign part of the undef_malloc_args.c test
as this is breaking Darwin.

A better fix should follow

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

12 years agoSolve false negative for various malloc replaced functions arguments
Philippe Waroquiers [Thu, 4 Apr 2013 21:10:22 +0000 (21:10 +0000)] 
Solve false negative for various malloc replaced functions arguments

The replacement functions are running on the simulated CPU.
The code on the simulated CPU does not necessarily use
all arguments. E.g. args can be ignored and/or only given
to a NON SIMD call.
The definedness of such 'unused' arguments will not be verified
by memcheck.
A call to 'trigger_memcheck_error_if_undefined' allows
memcheck to detect such errors for the otherwise unused args.
Apart of allowing memcheck to detect an error, the function
trigger_memcheck_error_if_undefined has no effect and
has a minimal cost for other tools replacing malloc functions.

(suggestion of the 'no operation check' from Julian).

tested on f12/x86, debian6/amd64, f18/ppc64
Note that some Darwin specific code has been modified
in coregrind/m_replace_malloc/vg_replace_malloc.c.
(Some of) this code has not been compiled (no access to a
Darwin system). The code changed is trivial, so there is
some chance it will compile and even maybe work.

Added a new test verifying that various malloc related
functions undefined args are triggering an error in memcheck.

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

12 years agomips: enable helgrind test tc08_hbl2 for mips64
Petar Jovanovic [Thu, 4 Apr 2013 15:33:27 +0000 (15:33 +0000)] 
mips: enable helgrind test tc08_hbl2 for mips64

Enable the test for mips64.
Minor improvement in macro INC.

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

12 years agomips: add different value for SOCK_STREAM
Petar Jovanovic [Thu, 4 Apr 2013 10:55:09 +0000 (10:55 +0000)] 
mips: add different value for SOCK_STREAM

MIPS uses different values for socket types.
This is protected by ARCH_HAS_SOCKET_TYPES in Linux kernel and we introduce
it here too. This is important for log-socket feature, and it resolves the
issue reported in https://bugs.kde.org/show_bug.cgi?id=313267#c21.

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

12 years agomips: enable several system call wrappers on mips64
Petar Jovanovic [Wed, 3 Apr 2013 23:43:11 +0000 (23:43 +0000)] 
mips: enable several system call wrappers on mips64

Enable wrappers on mips64 for the following calls:

- dup3
- accept4
- epoll_create1
- timerfd_settime
- newfstatat

Also, allow additional flock64 values in sys_fcntl for mips64.

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

12 years agomips: add mips64le support for atomic_incs and annotate_hbefore tests
Petar Jovanovic [Wed, 3 Apr 2013 22:51:23 +0000 (22:51 +0000)] 
mips: add mips64le support for atomic_incs and annotate_hbefore tests

Add mips64-le implementation of:

- atomic_add_8bit
- atomic_add_16bit
- atomic_add_32bit
- atomic_add_64bit
- do_acasW

Minor fixes for mips32 implementations are included as well.

These functions are needed to execute atomic_incs and annotate_hbefore
tests on mips64le.

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

12 years agoUpdate bug status.
Julian Seward [Tue, 2 Apr 2013 08:24:48 +0000 (08:24 +0000)] 
Update bug status.

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

12 years agomemcheck, Darwin 10: Add a suppression pattern
Bart Van Assche [Mon, 1 Apr 2013 08:23:32 +0000 (08:23 +0000)] 
memcheck, Darwin 10: Add a suppression pattern

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

12 years agoannounce an old bug (wishlist) which rev 13223 fixed
Philippe Waroquiers [Sun, 31 Mar 2013 16:20:02 +0000 (16:20 +0000)] 
announce an old bug (wishlist) which rev 13223 fixed

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

12 years agodrd, Darwin: Generalize a suppression pattern
Bart Van Assche [Sun, 31 Mar 2013 07:40:53 +0000 (07:40 +0000)] 
drd, Darwin: Generalize a suppression pattern

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

12 years agodrd, Darwin: Add a suppression pattern
Bart Van Assche [Sat, 30 Mar 2013 09:38:11 +0000 (09:38 +0000)] 
drd, Darwin: Add a suppression pattern

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