]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
11 years agoMinor tidying of the generalised V128/V256 shadow helper returns
Julian Seward [Sun, 18 Aug 2013 10:20:22 +0000 (10:20 +0000)] 
Minor tidying of the generalised V128/V256 shadow helper returns
that landed in r13500.  No functional change.

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

11 years agoMake sure that sh-mem-vec256 is only built on platforms that can
Julian Seward [Sun, 18 Aug 2013 10:00:59 +0000 (10:00 +0000)] 
Make sure that sh-mem-vec256 is only built on platforms that can
assemble the relevant instructions.

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

11 years agoAdd test cases for 256-bit --partial-loads-ok=no|yes, by generalising the
Julian Seward [Fri, 16 Aug 2013 08:34:10 +0000 (08:34 +0000)] 
Add test cases for 256-bit --partial-loads-ok=no|yes, by generalising the
128-bit versions.  (Patrick J. LoPresti, lopresti@gmail.com).  Bug 294285.

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

11 years agoAdd support for direct V256 shadow helper returns -- memcheck side.
Julian Seward [Fri, 16 Aug 2013 08:31:29 +0000 (08:31 +0000)] 
Add support for direct V256 shadow helper returns -- memcheck side.
(Patrick J. LoPresti, lopresti@gmail.com).  Bug 294285.

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

11 years agoAvoid a compiler warning.
Julian Seward [Thu, 15 Aug 2013 21:18:21 +0000 (21:18 +0000)] 
Avoid a compiler warning.

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

11 years agoFollowup to VEX r2742 which eliminates IRExprP__VECRET and IRExprP__BBPTR
Florian Krohm [Thu, 15 Aug 2013 20:55:42 +0000 (20:55 +0000)] 
Followup to VEX r2742 which eliminates IRExprP__VECRET and IRExprP__BBPTR
and adds Iex_VECRET and Iex_BBPTR.

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

11 years agomips32: Delete unnecessary exp files.
Dejan Jevtic [Thu, 15 Aug 2013 13:48:28 +0000 (13:48 +0000)] 
mips32: Delete unnecessary exp files.

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

11 years agomips32/mips64: Fix compiler warnings.
Dejan Jevtic [Thu, 15 Aug 2013 13:37:29 +0000 (13:37 +0000)] 
mips32/mips64: Fix compiler warnings.

Fix some compiler warnings when compiling Valgrind for mips32/mips64.
Clean up exp files for mips32 BE and LE.

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

11 years agokludge to bypass inner valgrind mmap failing due to not observed outer mmap
Philippe Waroquiers [Mon, 12 Aug 2013 22:17:47 +0000 (22:17 +0000)] 
kludge to bypass inner valgrind mmap failing due to not observed outer mmap

Some tests are failing in an "outer/inner" setup with an "out of memory"
situation reported by the inner (e.g. memcheck/tests/err_disable4.vgtest).

Looks like this is because the inner valgrind aspacemgr believes
a segment is free and can be used, but segment is in fact used by the outer.
This can happen as the inner cannot observe the outer mmap, and so
inner aspacemgr can be out of sync with the kernel and the outer.

This kludge bypasses the problem: if the fixed mmap fails in the inner,
the inner retries without the fixed.
This is a kludge as the proper solution would be to have a correct
state of aspacemgr in the inner. This however implies a more in-depth surgery
in the outer/inner setup (to have e.g. the outer informing the inner of
its own mmap or alternatively having the inner asking the outer about the
mmap advisory).

Kludge is preferred (at least now) as this kludge is activated only
for the inner (and for darwin, but that was already like that).

Of course, this kludge does not the state of the inner aspacemgr
matching the outer and kernel state.
So, other problems might be detected e.g. if inner aspacemgr does a check
comparing its status with kernel status.

The patch also ensures the inner reports the memory status of the
outer (using a client request) when an out of memory situation is detected.
This helps understanding what goes wrong.

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

11 years agoInitial ISA 2.07 support for POWER8-tuned libc
Carl Love [Mon, 12 Aug 2013 18:04:22 +0000 (18:04 +0000)] 
Initial ISA 2.07 support for POWER8-tuned libc

The IBM Power ISA 2.07 has been published on power.org, and IBM's new POWER8
processor is under development to implement that ISA. This patch provides
initial runtime and testsuite support for running Valgrind on POWER8 systems
running a soon-to-be released Linux distribution. This Linux distro will
include a POWER8-tuned libc that uses a subset of the new instructions from
ISA 2.07.  Since virtually all applications link with libc, it would be
impossible to run an application under Valgrind on this distro without adding
support for these new instructions to Valgrind, so that's the intent of this
patch. Note that applications built on this distro will *not* employ new POWER8
instructions by default. There are roughly 150 new instructions in the Power
ISA 2.07, including hardware transaction management (HTM). Support for these
new instructions (modulo the subset included in this bug) will be added to
Valgrind in a phased approach, similar to what we did for Power ISA 2.06.

Bugzilla 322294, VEX commit 2740

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

12 years agoAdd test cases for 128-bit shadow loads with
Julian Seward [Mon, 12 Aug 2013 16:10:38 +0000 (16:10 +0000)] 
Add test cases for 128-bit shadow loads with
--partial-loads-ok={yes,no} for x86 targets.  Bug #294285.

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

12 years ago* rename the memcheck/tests/amd64/sh-mem-vec128*stderr.exp* files
Julian Seward [Mon, 12 Aug 2013 11:47:52 +0000 (11:47 +0000)] 
* rename the memcheck/tests/amd64/sh-mem-vec128*stderr.exp* files
  so as to specify an endianness
* add two missing symlinks

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

12 years agoAdd test cases for 128-bit shadow loads with --partial-loads-ok={yes,no}
Julian Seward [Mon, 12 Aug 2013 10:42:49 +0000 (10:42 +0000)] 
Add test cases for 128-bit shadow loads with --partial-loads-ok={yes,no}
in such a way that they can be shared across targets that support 128 bit
loads, as required.  amd64 only right now.  Adds memcheck/tests/common
to hold this stuff.  Bug #294285.

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

12 years agoThe following instructions were introduced in the Power ISA 2.05
Carl Love [Fri, 9 Aug 2013 21:55:45 +0000 (21:55 +0000)] 
The following instructions were introduced in the Power ISA 2.05
(i.e., POWER6) - lfdp - stfdp - lfdpx - stfdpx These instructions were promptly
deprecated (phased out) in ISA 2.06 (i.e., POWER7). Recent updates in binutils
no longer supports these instructions unless the assembler is invoked with
'-mpower6'. When 'make check' is run on valgrind when using such a newer
binutils and running on a ppc64 system newer than POWER6, you get the
following build error:
y
pc64_linux=1 -DVGPV_ppc64_linux_vanilla=1 -DVGA_SEC_ppc32=1 -DVGP_SEC_ppc64_linux=1 -Winline -Wall -Wshadow -g -Winline -Wall -Wshadow -g -I../../../include -m64 -Wno-long-long -Wwrite-strings -fno-stack-protector -Wno-write-strings -MT power_ISA2_05-power_ISA2_05.o -MD -MP -MF .deps/power_ISA2_05-power_ISA2_05.Tpo -c -o power_ISA2_05-power_ISA2_05.o `test -f 'power_ISA2_05.c' || echo './'`power_ISA2_05.c
/tmp/cciGIkGG.s:Assembler messages:
/tmp/cciGIkGG.s:387: Error: operand out of domain (31 is not a multiple of 4)
/tmp/cciGIkGG.s:387: Error: syntax error; found `,', expected `('
/tmp/cciGIkGG.s:387: Error: junk at end of line: `,9'
/tmp/cciGIkGG.s:478: Error: operand out of domain (31 is not a multiple of 4)
/tmp/cciGIkGG.s:478: Error: syntax error; found `,', expected `('
/tmp/cciGIkGG.s:478: Error: junk at end of line: `,9'
make[2]: *** [power_ISA2_05-power_ISA2_05.o] Error 1
make[2]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/tmp/Valgrind_review/valgrind_ISA2_05/memcheck/tests/ppc64' make: *** [check-recursive] Error 1

This patch fixes the problem by adding a configure check to determine if these
phased out instructions are supported by the binutils, and the result of that
configure check is used to decide whether or not to compile in the source for
testing these instructions.

Bugzilla 323116

committed by Carl Love, carll@us.ibm.com

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

12 years agoA comprehensive test case for 128 bit shadow vector loads in the case
Julian Seward [Thu, 8 Aug 2013 10:56:08 +0000 (10:56 +0000)] 
A comprehensive test case for 128 bit shadow vector loads in the case
of partial addressibility, for --shadow-loads-ok=yes and =no.  Not
portable and not hooked up to the test/build system yet.

Pertains to #294285.

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

12 years agoFix # 294285: --partial-loads-ok does not work for 16-byte SSE loads
Julian Seward [Thu, 8 Aug 2013 10:41:46 +0000 (10:41 +0000)] 
Fix # 294285: --partial-loads-ok does not work for 16-byte SSE loads
(core fixes for the memcheck handling of 128 bit loads)
(Patrick J. LoPresti, lopresti@gmail.com)

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

12 years agoFix fallout from r13486: "virtual" is a C++ reserved word and so this
Julian Seward [Thu, 8 Aug 2013 09:05:37 +0000 (09:05 +0000)] 
Fix fallout from r13486: "virtual" is a C++ reserved word and so this
header causes breakage in the C++ tests in the tree.  Rename it.

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

12 years agoAdd support for a bunch of DRM Ioctls. Fixes #207815.
Julian Seward [Thu, 8 Aug 2013 08:09:29 +0000 (08:09 +0000)] 
Add support for a bunch of DRM Ioctls.  Fixes #207815.
(Robert Bragg, bob@o-hand.com)

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

12 years agofix --vgdb-prefix no / character interpreted differently by V gdbsrv and vgdb
Philippe Waroquiers [Tue, 6 Aug 2013 20:45:20 +0000 (20:45 +0000)] 
fix --vgdb-prefix no / character interpreted differently by V gdbsrv and vgdb
When --vgdb-prefix contains no / character,
the Valgrind gdbsrv is interpreting the prefix value as the filename
prefix in the current directory, while vgdb interprets this as
a directory to be opened in the current directory.

Cbange vgdb.c so that it uses the same interpretation as V gdbsrv

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

12 years agoAnnounce fix for BZ 319494.
Florian Krohm [Sat, 3 Aug 2013 20:57:49 +0000 (20:57 +0000)] 
Announce fix for BZ 319494.

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

12 years agoAnnounce fix for BZ 322851 (VEX r2736).
Florian Krohm [Sat, 3 Aug 2013 20:40:05 +0000 (20:40 +0000)] 
Announce fix for BZ 322851 (VEX r2736).

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

12 years agoUpdate configure machinery to detect PTRACE_GETREGS
Philippe Waroquiers [Sat, 3 Aug 2013 20:34:58 +0000 (20:34 +0000)] 
Update configure machinery to detect PTRACE_GETREGS
Using #ifdef PTRACE_GETREGS gives difficulties as in some
platforms (e.g. mips) PTRACE_GETREGS is not defined as a
preprocessor symbols unless linux/ptrace.h is included.
However, including linux/ptrace.h causes compilation error on some
other platforms

=> better detect that PTRACE_GETREGS can be used using the
configure machinery.

This should make vgdb PTRACE_GETREGS working again on
various platforms (x86/amd64/mips/...) as PTRACE_GETREGS
was disabled on all of these following r13471

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

12 years agoFollowup to the renaming in VEX r2735.
Florian Krohm [Sat, 3 Aug 2013 19:37:55 +0000 (19:37 +0000)] 
Followup to the renaming in VEX r2735.
Also ignore AT_DCACHEBSIZE entries in the auxiliary vector as they
are not needed.
Fixes BZ 306587.

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

12 years agoUpdate list of ignored files.
Florian Krohm [Sat, 3 Aug 2013 11:36:52 +0000 (11:36 +0000)] 
Update list of ignored files.

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

12 years agomips32: Add test cases for for mips32 DSP instruction set.
Dejan Jevtic [Fri, 2 Aug 2013 15:39:58 +0000 (15:39 +0000)] 
mips32: Add test cases for for mips32 DSP instruction set.

Add test cases for mips32 DSP and DSP revision 2 ASE.
Correctly model SHLL_S.PH on MIPS32.

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

12 years agoDefine _XOPEN_SOURCE before including unistd.h.
Julian Seward [Thu, 1 Aug 2013 22:16:41 +0000 (22:16 +0000)] 
Define _XOPEN_SOURCE before including unistd.h.

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

12 years agoAvoid a compiler warning about integer overflow when compiling this
Julian Seward [Thu, 1 Aug 2013 22:16:10 +0000 (22:16 +0000)] 
Avoid a compiler warning about integer overflow when compiling this
for 32 bit targets.

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

12 years agoadd a test + assert for GDB bug bypassed in r13472
Philippe Waroquiers [Tue, 30 Jul 2013 20:26:06 +0000 (20:26 +0000)] 
add a test + assert for GDB bug bypassed in r13472

* modify mcwatchpoints to print a 50000 char array
* add an assert to check the max allowed size

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

12 years agoRemove simple_huffman.c which is a leftover from the time
Florian Krohm [Mon, 29 Jul 2013 19:02:43 +0000 (19:02 +0000)] 
Remove simple_huffman.c which is a leftover from the time
when AIX was supported. As AIX support has been removed,
the file can be removed as well.

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

12 years agos390: Announce support for DFP. Update the opcode spreadsheet
Florian Krohm [Sun, 28 Jul 2013 16:19:34 +0000 (16:19 +0000)] 
s390: Announce support for DFP. Update the opcode spreadsheet
to reflect this.

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

12 years agos390: New machine model: zBC12
Florian Krohm [Sun, 28 Jul 2013 15:29:36 +0000 (15:29 +0000)] 
s390: New machine model: zBC12

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

12 years agoBypass GDB bug which asks to read packet slightly too big
Philippe Waroquiers [Thu, 25 Jul 2013 22:37:02 +0000 (22:37 +0000)] 
Bypass GDB bug which asks to read packet slightly too big
GDB sometimes asks slightly too big read packets
(no taking into account the packet overhead).
Bypass the problem by allocating slightly more than needed
if GDB would only ask the correct maximum size.

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

12 years agodo not include linux/ptrace.h in vgdb.c
Philippe Waroquiers [Thu, 25 Jul 2013 20:40:17 +0000 (20:40 +0000)] 
do not include linux/ptrace.h in vgdb.c

Include of linux/ptrace.h was added in revision r11740,
to avoid compilation error on s390x (fedora and suse).

The compilation error was retrieved thanks to archeological research
done by Christian Borntraeger: without this include, the following was given:
  error: 'PT_ENDREGS' undeclared
There was also some errors on ppc64 around the same time:
  error: 'PTRACE_GETREGS' undeclared

Currently, the inclusion of linux/ptrace.h gives a problem on amd64/fedora20:
/usr/include/linux/ptrace.h:58:8: error: redefinition of ‘struct ptrace_peeksiginfo_args’
/usr/include/sys/ptrace.h:191:8: note: originally defined here

According to man ptrace, it is good enough to include sys/ptrace.h
(which should avoid the problem on amd64/f20).

The linux/ptrace.h is deemed not necessary anymore as:
1. Christian has tested on sles11sp2 on s390x.
2. since linux/ptrace.h was added in vgdb.c, #ifdef PT_ENDREGS and
  #ifdef PTRACE_GETREGS were added

=> remove the linux/ptrace.h
(tested on x86/f12, ppc64/f18, amd64/deb6, sles11sp2/s390x)

Thanks to Christian for the investigations

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

12 years agomips32: Add support for mips32 DSP instruction set.
Dejan Jevtic [Thu, 25 Jul 2013 08:22:08 +0000 (08:22 +0000)] 
mips32: Add support for mips32 DSP instruction set.

Add support for mips32 DSP and DSP revision 2 ASE.
More details about the mips32 DSP(r2) ASE:
http://www.mips.com/media/files/MD00566-2B-MIPSDSP-QRC-01.00.pdf
Applied patch provided by Maja Gagic <maja.gagic@rt-rk.com>

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

12 years agofix incorrect lineno in supp error msgs+ -v give filename+lineno of used supp.
Philippe Waroquiers [Mon, 22 Jul 2013 22:00:13 +0000 (22:00 +0000)] 
fix incorrect lineno in supp error msgs+ -v give filename+lineno of used supp.

If a suppression file contains an error, the lineno reported could be wrong.
Also, give filename and lineno of the used suppressions in -v debugging output.

The fix consists in ensuring that tool specific read_extra function gets
the Int* lineno pointer, together with other VG_(get_line) parameters.

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

12 years agoannounce in NEWS fix for 321960
Philippe Waroquiers [Sun, 21 Jul 2013 16:05:30 +0000 (16:05 +0000)] 
announce in NEWS fix for 321960

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

12 years agofix 321960 pthread_create() then alloca() causing invalid stack write errors
Philippe Waroquiers [Sun, 21 Jul 2013 16:04:05 +0000 (16:04 +0000)] 
fix 321960 pthread_create() then alloca() causing invalid stack write errors

Problem created by a discrepancy between the initial main stack
anon segment, and the main stack registered in m_stacks.c

Looking at some tracing; we see that there are two pages of stack:
--9078:2:main       tell tool about 0ffefff000-0fff000fff rw-
The stack between the base and the current sp is marked as not accessible:
--9078:2:main       mark stack inaccessible 0ffefff000-0fff0004bf

This is matching the aspacemgr view:
--9078:1:aspacem   22: RSVN 0ffe801000-0ffeffefff 8380416 ----- SmUpper
--9078:1:aspacem   23: anon 0ffefff000-0fff000fff    8192 rw---
(all the above is normal/as expected)

However, the main stack is registered in m_stacks.c as having only one page:
--9078:2:stacks     register 0xFFF000000-0xFFF000FFF as stack 0

When the main stack is grown, m_stacks.c is informed by m_signals.c
that the stack is grown. This is done by trapping the signal 11
when a not mapped page is accessed.
However, the 2nd page does not cause a signal (as it is mapped).
So, m_stacks.c still believes the main has one page stack.
This then gives problems in the tracking of the SP and current_stack
in m_stacks.c.

Only one page was registered for the main stack, as the registration
was done with values computed before possibly adding a page
needed for the ABI redzone.

The fix is to properly register the main stack with the size of
the stack segment, once all aspects have been taken into account.
With the fix, the stack is registered as:
--31501:2:stacks     register 0xFFEFFF000-0xFFF000FFF as stack 0

  Another possible fix would be to always register the main stack with the
  full size of the aspacemgr stack segment (i.e. the anon+RSVN above)
  (idea is that this is similar to non main threads, for which the
  full thread stack is registered from the beginning, even if not fully
  used yet).
  The first fix was preferred, assuming it is better to keep registering
  the main stack "physical" size (and not its maximal size).

Test memcheck/tests/thread_alloca added, based on reproducer
done by Daniel Stodden.
The bug might be triggered or not depending on the initial value
of the SP, which is influenced by the size of the "env".
So, the test execs itself, growing each time the environment.
This has given a reasonable chance/way to reproduce the bug on Ubuntu 12
and on a Debian 6.
(tested on amd64/Ubuntu 12 and Debian 6
           x86/fedora12
           ppc64/fedora18

Note that while investigating this bug, another strange thing was seen:
thread stacks are registered in m_stacks.c but are never unregistered.
It is not very clear that it is needed or not to unregister them:
thread stack segments are not freed when a thread terminates :
when a thread slot is re-used, its thread stack will also be re-used.
(Is that good for address space mgt ? A process that has created many
temporary threads will have the thread stacks lost forever ???).

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

12 years agochange macro names to properly indicate that current_stack is set
Philippe Waroquiers [Sat, 20 Jul 2013 11:15:02 +0000 (11:15 +0000)] 
change macro names to properly indicate that current_stack is set
(and not current stack)

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

12 years agoremove two not used global variables:
Philippe Waroquiers [Fri, 19 Jul 2013 22:18:02 +0000 (22:18 +0000)] 
remove two not used global variables:
Addr  VG_(client_base) = 0;       /* client address space limits */
Addr  VG_(client_end)  = 0;

These 2 vars are unused, and there is a comment just before
telling:
 // TODO: get rid of as many of these as possible.

So, let's do the easy part :)

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

12 years agoThe FIOCLEX and FIONCLEX ioctls are architecture specific.
Tom Hughes [Thu, 18 Jul 2013 11:22:10 +0000 (11:22 +0000)] 
The FIOCLEX and FIONCLEX ioctls are architecture specific.

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

12 years agoSocket option constants are architecture specific.
Tom Hughes [Thu, 18 Jul 2013 11:15:41 +0000 (11:15 +0000)] 
Socket option constants are architecture specific.

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

12 years agoHandle FIOCLEX and FIONCLEX ioctls. Patch from Ben Noordhuis. BZ#305170.
Tom Hughes [Wed, 17 Jul 2013 14:57:18 +0000 (14:57 +0000)] 
Handle FIOCLEX and FIONCLEX ioctls. Patch from Ben Noordhuis. BZ#305170.

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

12 years agoHandle setsockopt(SOL_SOCKET, SO_ATTACH_FILTER) better. Based
Tom Hughes [Wed, 17 Jul 2013 14:36:57 +0000 (14:36 +0000)] 
Handle setsockopt(SOL_SOCKET, SO_ATTACH_FILTER) better. Based
on patch from Guy Harris on BZ#318203.

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

12 years agoAdd support for fanotify_init and fanotify_mark, based on patches
Tom Hughes [Wed, 17 Jul 2013 13:58:59 +0000 (13:58 +0000)] 
Add support for fanotify_init and fanotify_mark, based on patches
from Heinrich Schuchardt. BZ#320895.

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

12 years agoAdd support for open_by_handle_at and fix name_to_handle_at
Tom Hughes [Wed, 17 Jul 2013 13:25:08 +0000 (13:25 +0000)] 
Add support for open_by_handle_at and fix name_to_handle_at
to check the file handle argument correctly. BZ#316761.

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

12 years agoHandle the sethostname system call. BZ#311922.
Tom Hughes [Wed, 17 Jul 2013 12:43:30 +0000 (12:43 +0000)] 
Handle the sethostname system call. BZ#311922.

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

12 years agomips64: Wrong address size.
Dejan Jevtic [Wed, 17 Jul 2013 09:56:24 +0000 (09:56 +0000)] 
mips64: Wrong address size.

On MIPS64 address of 'undefined' can be 64-bit width.
When we are trying to access that address we need to use 0x%lx
instead of 0x%x.
Fixes gdbserver_tests/mcvabits for MIPS64.

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

12 years agomips64: Add a test case for mips64.
Dejan Jevtic [Wed, 17 Jul 2013 09:34:51 +0000 (09:34 +0000)] 
mips64: Add a test case for mips64.

Add a function in the memcheck/tests/leak-segv-jmp.c for MIPS64
that execute the syscall. Because we added the mips64 case we
need to change the line number in *.exp file.
Fixes memcheck/tests/leak-segv-jmp for MIPS64.

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

12 years agomips64: Correct the value for the VG_MIN_MALLOC_SZB
Dejan Jevtic [Wed, 17 Jul 2013 08:51:53 +0000 (08:51 +0000)] 
mips64: Correct the value for the VG_MIN_MALLOC_SZB

The VG_MIN_MALLOC_SZB was incorrectly defined for MIPS64.
The incorrect value was 8 and the correct value is 16.
Fixes massif/tests/big-alloc for MIPS64.

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

12 years agomips64: Update list of ignore files
Dejan Jevtic [Tue, 16 Jul 2013 15:25:46 +0000 (15:25 +0000)] 
mips64: Update list of ignore files

Update list of ignore files for directory none/tests/mips64.

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

12 years agomips32: Update list of ignore files
Petar Jovanovic [Mon, 15 Jul 2013 11:27:45 +0000 (11:27 +0000)] 
mips32: Update list of ignore files

Update list of ignore files for directory none/tests/mips32.

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

12 years agomips32: add missing exp file for Bug#320057
Petar Jovanovic [Mon, 15 Jul 2013 10:16:09 +0000 (10:16 +0000)] 
mips32: add missing exp file for Bug#320057

r13450 misses the exp file.

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

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