ambi/valgrind.git
11 years agoChar/HChar fixups for m_debuginfo and m_gdbserver. master
florian [Thu, 15 Nov 2012 04:27:04 +0000 (04:27 +0000)]
Char/HChar fixups for m_debuginfo and m_gdbserver.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd missing files. They should have been added in r13120.
florian [Sun, 11 Nov 2012 13:59:54 +0000 (13:59 +0000)]
Add missing files. They should have been added in r13120.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13121 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate s390_features.c for DFP.
florian [Sat, 10 Nov 2012 22:35:24 +0000 (22:35 +0000)]
Update s390_features.c for DFP.
Add a testcase.
Patch by Maran (maranp@linux.vnet.ibm.com).
Part of fixing BZ 307113.
See also VEX r2560.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13120 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix more Char/HChar mixups. Closing in...
florian [Sat, 10 Nov 2012 22:29:54 +0000 (22:29 +0000)]
Fix more Char/HChar mixups. Closing in...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate list of ignored files.
florian [Sat, 10 Nov 2012 20:11:14 +0000 (20:11 +0000)]
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13118 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoadd BLKPBSZGET ioctl
cborntra [Fri, 9 Nov 2012 16:01:38 +0000 (16:01 +0000)]
add BLKPBSZGET ioctl

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13117 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd missing EXTRA DIST statement
cborntra [Fri, 9 Nov 2012 08:35:50 +0000 (08:35 +0000)]
Add missing EXTRA DIST statement

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13116 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoGETREGSET was introduced with 2.6.33.
cborntra [Fri, 9 Nov 2012 08:06:14 +0000 (08:06 +0000)]
GETREGSET was introduced with 2.6.33.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13115 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAnnounce fix for BZ 308886.
florian [Thu, 8 Nov 2012 23:04:16 +0000 (23:04 +0000)]
Announce fix for BZ 308886.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13114 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoalso wire up arm, x86 and amd64 regarding ptrace regsets
cborntra [Thu, 8 Nov 2012 20:27:05 +0000 (20:27 +0000)]
also wire up arm, x86 and amd64 regarding ptrace regsets
original patch from
Andreas Arnez <arnez AT  linux DOT vnet DOT ibm DOT com>

Seems that ppc and mips dont have ptrace support....

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13113 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoadd s390 specific fix for getregset
cborntra [Thu, 8 Nov 2012 20:10:10 +0000 (20:10 +0000)]
add s390 specific fix for getregset

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13112 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agowire up testcase
cborntra [Thu, 8 Nov 2012 19:46:29 +0000 (19:46 +0000)]
wire up testcase

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13111 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd ptrace getreset testcase from Andreas Arnez
cborntra [Thu, 8 Nov 2012 19:42:00 +0000 (19:42 +0000)]
Add ptrace getreset testcase from Andreas Arnez
arnez AT  linux DOT vnet DOT ibm DOT com

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13110 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoIgnore ELF sections that have zero size. Fixes #309600.
sewardj [Thu, 8 Nov 2012 15:45:16 +0000 (15:45 +0000)]
Ignore ELF sections that have zero size.  Fixes #309600.
(Dragos Tatulea, dragos.tatulea@gmail.com)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13109 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoImprove accuracy of definedness tracking through the x86 PMOVMSKB and
sewardj [Thu, 8 Nov 2012 10:58:16 +0000 (10:58 +0000)]
Improve accuracy of definedness tracking through the x86 PMOVMSKB and
BSF instructions, as the lack of it causes false positives (Valgrind
side).  Fixes #308627.  (Patrick J. LoPresti <lopresti@gmail.com>)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13108 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoSame idea as for mips. sem_post does not fail on s390
cborntra [Wed, 7 Nov 2012 13:42:36 +0000 (13:42 +0000)]
Same idea as for mips. sem_post does not fail on s390

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13107 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agos390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite
cborntra [Wed, 7 Nov 2012 07:57:01 +0000 (07:57 +0000)]
s390x machines z196 and zec12 have 4 levels of caches. Adopt the test suite

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13106 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofix n-i-bz same as 303624 (fixed in 3.8.0), but for x86 android
philippe [Tue, 6 Nov 2012 22:47:00 +0000 (22:47 +0000)]
fix n-i-bz same as 303624 (fixed in 3.8.0), but for x86 android

(note: this might be a candidate if a 3.8.2 is done).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13105 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofactorise sys_socketcall
philippe [Sun, 4 Nov 2012 20:40:33 +0000 (20:40 +0000)]
factorise sys_socketcall
sys_socketcall was duplicated in syswrap-{ppc64|ppc32|arm|mips32|s390x}-linux.c
=>
* Similarly for what was done for sys_ipc, factorise the code in syswrap-linux.c
* re-enabled PRE_MEM_READ for VKI_SYS_SENDMSG and VKI_SYS_RECVMSG
  (PRE_MEM_READ calls were commented out around 2003, for what
   was supposed a glibc bug.
   The PRE_MEM_READ calls were already re-enabled in s390x)
* s390x also had some more checking to verify the addressibility of
  the args and fail the syscall with EFAULT if not addressable
  => same checks are now done for all platforms.

(tested on x86/amd64/mips32/s390x/ppc32/ppc64,
 compiled for arm-android-emulator)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13104 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix Char/HChar mixups and constness in m_scheduler.
florian [Sat, 3 Nov 2012 19:32:28 +0000 (19:32 +0000)]
Fix Char/HChar mixups and constness in m_scheduler.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13103 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix Char/HChar mixups and constness in m_initimg.
florian [Sat, 3 Nov 2012 19:18:10 +0000 (19:18 +0000)]
Fix Char/HChar mixups and constness in m_initimg.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13102 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoChar/HChar and constness fixes in m_ume
florian [Sat, 3 Nov 2012 18:28:20 +0000 (18:28 +0000)]
Char/HChar and constness fixes in m_ume

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13101 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agos390: Autodetect cache info. These are the final bits to fix BZ 275800.
florian [Fri, 2 Nov 2012 22:00:59 +0000 (22:00 +0000)]
s390: Autodetect cache info. These are the final bits to fix BZ 275800.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13100 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoTweak VG_(machine_get_cache_info).
florian [Fri, 2 Nov 2012 21:36:39 +0000 (21:36 +0000)]
Tweak VG_(machine_get_cache_info).
Better messages. Always write cache info when in debug mode.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13099 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoEnsure vgdb.c is warningless with -Wpointer-sign
philippe [Thu, 1 Nov 2012 17:00:12 +0000 (17:00 +0000)]
Ensure vgdb.c is warningless with -Wpointer-sign
* use normal 'char' (when possible) rather than 'unsigned char'
* fix bug in case a character val >= 128 is given in a -c command

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13098 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofix arena size wrongly printed in debugmsg on 32 bits platforms when > 2Gb.
philippe [Wed, 31 Oct 2012 22:10:47 +0000 (22:10 +0000)]
fix arena size wrongly printed in debugmsg on 32 bits platforms when > 2Gb.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13097 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofor debuglevel >=2, ensure write_buf debug output only writes the req nr of char
philippe [Wed, 31 Oct 2012 15:07:39 +0000 (15:07 +0000)]
for debuglevel >=2, ensure write_buf debug output only writes the req nr of char

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13096 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoCachegrind: introduce special case for Ir
weidendo [Tue, 30 Oct 2012 00:28:29 +0000 (00:28 +0000)]
Cachegrind: introduce special case for Ir

Because most Ir accesses touch only one line, and this
can be detected at instrumentation time, use a special
handler for that. This handler does not need to check
cache line crossing at runtime.

This does not change the results of the simulator at all,
but improves runtime by around 15% on perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13095 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoCallgrind: use memory block number as tag for simple model
weidendo [Mon, 29 Oct 2012 21:47:45 +0000 (21:47 +0000)]
Callgrind: use memory block number as tag for simple model

Same as in Cachegrind. Gives a slight speedup.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13094 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUse always_inline attribute also in Callgrinds simulator
weidendo [Mon, 29 Oct 2012 21:28:05 +0000 (21:28 +0000)]
Use always_inline attribute also in Callgrinds simulator

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13093 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoGet rid of compiler warning
weidendo [Mon, 29 Oct 2012 21:28:03 +0000 (21:28 +0000)]
Get rid of compiler warning

In addition to "__attribute__((always_inline))", gcc wants
"__inline__" to be used, otherwise the warning

  warning: always_inline function might not be inlinable

is printed. However, this does not have any effect on
performance (probably "static" makes gcc 4.7 already inlining
the functions?).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13092 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoValgrind, ppc: Fix test for 32-bit testsuite.
carll [Mon, 29 Oct 2012 20:39:18 +0000 (20:39 +0000)]
Valgrind, ppc:  Fix test for 32-bit testsuite.

The 32-bit testsuite executes the 64-bit class instruction prtyd.  This
instruction should not be tested in 32-bit mode.  The change also updates
the expected output for the test.  Note, 32-bit HW will generate a SIGILL
when the prtyd instruction is executed.  However, the 64-bit HW executing
a 32-bit application does execute the instruction but only the lower 32-bits
of the result are valid.  In general, the 64-bit class instructions should
not be executed in 32-bit binaries.

This fix accompanies the VEX fix in revision 2558 to add the 64-bit mode test
to make sure the 64-bit class instructions are only executed in 64-bit mode.
The VEX bugzilla is:

Bug 308573 - Internal Valgrind error on 64-bit instruction executed in
32-bit mode

Carl Love cel@us.ibm.com

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13091 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUnbreak testcase.
florian [Sun, 28 Oct 2012 20:26:04 +0000 (20:26 +0000)]
Unbreak testcase.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13090 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoChar/HChar and constness fixes. Mostly cost center
florian [Sat, 27 Oct 2012 23:07:42 +0000 (23:07 +0000)]
Char/HChar and constness fixes. Mostly cost center
on allocators which is always a const HChar *

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13089 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoMore Char/HChar fixes and constification.
florian [Sat, 27 Oct 2012 18:39:11 +0000 (18:39 +0000)]
More Char/HChar fixes and constification.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate list of ignore files. This time with the correct name.
florian [Sat, 27 Oct 2012 17:46:44 +0000 (17:46 +0000)]
Update list of ignore files. This time with the correct name.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13087 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate list of ignored files.
florian [Sat, 27 Oct 2012 16:34:31 +0000 (16:34 +0000)]
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13086 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix fpconv.c to unbreak the build on z10ec.
florian [Sat, 27 Oct 2012 14:25:28 +0000 (14:25 +0000)]
Fix fpconv.c to unbreak the build on z10ec.
Add rounding-6.c to test rounding modes for convert-to-fixed per m3
field. (The previous fpconv gave the impression of testing this but
in fact did not).
Add rounding.h to establish symbolic names for the various rounding
modes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13085 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdditional refinement in PRE(sys_ipc).
petarj [Fri, 26 Oct 2012 16:16:43 +0000 (16:16 +0000)]
Additional refinement in PRE(sys_ipc).

Additional refinement in PRE(sys_ipc) on which arguments to check for the call.
This is still a simplistic check, yet it should resolve additional cases.
One of the resolved cases is memcheck/tests/sem on MIPS.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13084 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate with latest bugmail header lines.
sewardj [Fri, 26 Oct 2012 10:28:24 +0000 (10:28 +0000)]
Update with latest bugmail header lines.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13083 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofix 123837 semctl system call: 4rth argument is optional, depending on cmd
philippe [Tue, 23 Oct 2012 21:38:52 +0000 (21:38 +0000)]
fix 123837 semctl system call: 4rth argument is optional, depending on cmd

Depending on the semctl command (arg3), arg4 might or might not be needed.
The PRE(sys_ipc) multiplexed syscall for semctl was always checking
all 4 args.

The fix consists in dereferencing the 4th arg (which in sys_ipc is ARG5)
only if the semctl syscall cmd implies 4 arguments.
This avoids the false positive on linux x86.

Note that PRE(sys_ipc) is still too simplistic as it assumes
that 6 args are always read, which is not the case.
This seems to cause false positive on mips:
  memcheck on none/tests/sem gives:
     Syscall param ipc(fifth) contains uninitialised byte(s)

It would be nice to implement the multiplexed PRE(sys_ipc) by
calling the PRE(sys_xxxx) similar PRE, depending on ARG1 of sys_ipc.
This would then avoid the simplistic PRE(sys_ipc) logic without duplicating
the logic in PRE(sys_semctl) (and all other sys_ipc multiplexed syscalls).
However, I found no easy way to do that.

With the current fix, some logic about semctl is partially duplicated between
the PRE(sys_ipc) (for platforms such as x86 having a multiplexed sys call)
and PRE(sys_semctl) (for platforms such as amd64, having a direct sys call)
to fix the false positive encountered on x86.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13082 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoRemove build dependency on Xen header files - closes #308495
bart [Tue, 23 Oct 2012 18:03:28 +0000 (18:03 +0000)]
Remove build dependency on Xen header files - closes #308495

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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13081 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoReserve space for frame header in disp_run_translations for MIPS.
petarj [Mon, 22 Oct 2012 17:43:57 +0000 (17:43 +0000)]
Reserve space for frame header in disp_run_translations for MIPS.

Reserve space for frame header in disp_run_translations, as some optimizations
may decide to use it. This should fix issue #307141.

Related link:
https://bugs.kde.org/show_bug.cgi?id=307141

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13080 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFollow-up to sys_ipc restructuration
philippe [Sun, 21 Oct 2012 21:49:33 +0000 (21:49 +0000)]
Follow-up to sys_ipc restructuration
Rev 13078 removed a PRE call (for SEMCTL) in the POST(sys_ipc).
This commit adds the correct POST call for SEMCTL in POST(sys_ipc).
(note: some tests are missing in this area, as removing PRE
and adding POST did not cause any test result to change).

This is the last patch to restructure the sys_ipc code.

After this patch, should be able to do the real fix
for 23837 (semctl GETVAL false positive)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13079 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFollow-up to sys_ipc restructuration
philippe [Sun, 21 Oct 2012 21:13:39 +0000 (21:13 +0000)]
Follow-up to sys_ipc restructuration
Now that the PRE/POS(sys_ipc) code is not duplicated anymore,
fix two strange things in this code:

* PRE(sys_ipc) : add missing ; after the call PRE_REG_READ6
  (strange that this was compiling without it ???)

* POST(sys_ipc) : it seems there was a copy/paste of
  the  PRE(sys_ipc) code for VKI_SEMCTL.
  Cannot understand why we would need to call again
  deref_Addr and ML_(generic_PRE_sys_semctl) in the POST(sys_ipc).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13078 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix 308711 - give more info about aspacemgr and arenas in out_of_memory
philippe [Sun, 21 Oct 2012 21:03:11 +0000 (21:03 +0000)]
Fix 308711 - give more info about aspacemgr and arenas in out_of_memory
In case of out of memory, Valgrind will output
the state of the address space manager and of the arena.
Then it will output a message to inform the user about the out of memory.

In case out of memory happens again while outputting the aspacemgr
or arena info, then another trial is done to only output the user msg.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13077 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agorestructure code for future fixing of 123837 (semctl GETVAL false positive)
philippe [Sun, 21 Oct 2012 20:21:17 +0000 (20:21 +0000)]
restructure code for future fixing of 123837 (semctl GETVAL false positive)

Regrouped identical code (except for indentation)
from syswrap-ppc64-linux.c, syswrap-ppc32-linux.c,syswrap-mips32-linux.c
  syswrap-x86-linux.c, syswrap-s390x-linux.c
into
  syswrap-linux.c

(compiled/regtested on x86, amd64, ppc64, mips32, s390x)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13076 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix memory leak.
florian [Sun, 21 Oct 2012 19:58:04 +0000 (19:58 +0000)]
Fix memory leak.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13075 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFirst round of Char/HChar fixups for coregrind and memcheck.
florian [Sun, 21 Oct 2012 19:43:43 +0000 (19:43 +0000)]
First round of Char/HChar fixups for coregrind and memcheck.
Little bit of ripple in tools, too.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13074 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoIntroduce a test to reproduce bug 123837 (semctl GETVAL false positive)
philippe [Sun, 21 Oct 2012 18:46:09 +0000 (18:46 +0000)]
Introduce a test to reproduce  bug 123837 (semctl GETVAL false positive)
The test succeeds on amd64, but fails on x86, with the following diff:

+Syscall param semctl(arg) points to uninitialised byte(s)
+   at 0x........: semctl@@GLIBC_2.2 (semctl.c:109)
+   by 0x........: main (sem.c:36)
+ Address 0x........ is on thread 1's stack
+
+Syscall param semctl(arg) points to uninitialised byte(s)
+   at 0x........: semctl@@GLIBC_2.2 (semctl.c:109)
+   by 0x........: main (sem.c:43)
+ Address 0x........ is on thread 1's stack
+

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13073 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix 308644 vgdb command for having the info for the track-fds option
philippe [Sun, 21 Oct 2012 14:37:14 +0000 (14:37 +0000)]
Fix 308644 vgdb command for having the info for the track-fds option

(allows to have the list of opened fds and the associated info
on request from GDB or from the shell, using vgdb)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13072 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFirst round of Char/HChar fixes for memcheck.
florian [Sun, 21 Oct 2012 03:43:20 +0000 (03:43 +0000)]
First round of Char/HChar fixes for memcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13071 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix Char/HChar mixups in helgrind and then some.
florian [Sun, 21 Oct 2012 03:23:36 +0000 (03:23 +0000)]
Fix Char/HChar mixups in helgrind and then some.
Also fix all usages of the wordFM data structure. Once upon a time
wordFM used Words but now it uses UWords.
Likewise for WordBag.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13070 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix a few Char/HChar mixups in callgrind.
florian [Sun, 21 Oct 2012 02:55:56 +0000 (02:55 +0000)]
Fix a few Char/HChar mixups in callgrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13069 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix a few Char/HChar mixups for cachegrind.
florian [Sun, 21 Oct 2012 02:39:42 +0000 (02:39 +0000)]
Fix a few Char/HChar mixups for cachegrind.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13068 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix a few compiler warnings.
florian [Sun, 21 Oct 2012 02:30:18 +0000 (02:30 +0000)]
Fix a few compiler warnings.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13067 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFollowup to constification of VEX's external interface (VEX r2555).
florian [Sun, 21 Oct 2012 02:19:35 +0000 (02:19 +0000)]
Followup to constification of VEX's external interface (VEX r2555).

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13066 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFirst round of Char/HChar fixups for massif
florian [Sat, 20 Oct 2012 19:57:16 +0000 (19:57 +0000)]
First round of Char/HChar fixups for massif

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13065 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd a FIXME
florian [Sat, 20 Oct 2012 19:52:14 +0000 (19:52 +0000)]
Add a FIXME

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13064 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoexp-dhat Char/HChar fixes.
florian [Sat, 20 Oct 2012 19:34:13 +0000 (19:34 +0000)]
exp-dhat Char/HChar fixes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13063 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoChar/HChar fixes for lackey.
florian [Sat, 20 Oct 2012 19:30:54 +0000 (19:30 +0000)]
Char/HChar fixes for lackey.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13062 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoThe listener does not use VEX types anywhere else. So this
florian [Sat, 20 Oct 2012 19:28:13 +0000 (19:28 +0000)]
The listener does not use VEX types anywhere else. So this
change fixes the copy-and-pasted panic functions to use
native C types.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13061 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFollow-up to cache reorg: update trace cache warning
philippe [Sat, 20 Oct 2012 17:18:35 +0000 (17:18 +0000)]
Follow-up to cache reorg: update trace cache warning
Update trace cache warning so that it is the same as before the cache reorg
(avoid failure of some tests on Pentium4 as the warning output
must match what is filtered by cachegrind/tests/filter_stderr)

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13060 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd a proper support for several MIPS instructions that generate SigFPE.
petarj [Fri, 19 Oct 2012 14:45:17 +0000 (14:45 +0000)]
Add a proper support for several MIPS instructions that generate SigFPE.

Add support to properly handle TEQ, ADD and SUB instructions that generate
exceptions on MIPS platforms. A SignalException test for MIPS32 has also been
added, so we can cover more cases.

This resolves:

none/tests/faultstatus
gdbserver_tests/mcsignopass
gdbserver_tests/mcsigpass

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13059 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoIssue warning about missing L2 cache only if there are any
florian [Fri, 19 Oct 2012 03:20:37 +0000 (03:20 +0000)]
Issue warning about missing L2 cache only if there are any
caches in the first place.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13058 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix some Char/HChar mixups in exp-bbv
florian [Thu, 18 Oct 2012 03:50:57 +0000 (03:50 +0000)]
Fix some Char/HChar mixups in exp-bbv

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13057 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix a few Char/Hchar mixups in exp-sgcheck.
florian [Thu, 18 Oct 2012 03:46:42 +0000 (03:46 +0000)]
Fix a few Char/Hchar mixups in exp-sgcheck.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13056 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix VG_(cpuid) invocations.
florian [Thu, 18 Oct 2012 03:33:05 +0000 (03:33 +0000)]
Fix VG_(cpuid) invocations.
Also call cache_info_is_sensible. I forgot to do that in r13053.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13055 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix some prototypes.
florian [Thu, 18 Oct 2012 03:17:32 +0000 (03:17 +0000)]
Fix some prototypes.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13054 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoChange cache detection for x86/amd64 to fill in VexCacheInfo directly.
florian [Thu, 18 Oct 2012 03:16:45 +0000 (03:16 +0000)]
Change cache detection for x86/amd64 to fill in VexCacheInfo directly.
New function write_cache_info to dump what was detected for debugging
purposes.
New function cache_info_is_sensible to ensure that autodetected
cache info lives up to the promises made in libvex.h.
Moved the trace-cache related kludgery to cachegrind where it belongs.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13053 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix 308341 vgdb should report process exit (or fatal signal)
philippe [Wed, 17 Oct 2012 21:32:03 +0000 (21:32 +0000)]
Fix 308341 vgdb should report process exit (or fatal signal)
patch from Mark Wielaard.
(with small modifications).
Also clarified some comments related to the resume reply.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13052 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate list of ignored files.
florian [Tue, 16 Oct 2012 01:27:54 +0000 (01:27 +0000)]
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13051 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoxen: include arg struct field names when marking memory as read.
bart [Mon, 15 Oct 2012 18:46:08 +0000 (18:46 +0000)]
xen: include arg struct field names when marking memory as read.

Makes it easier to figure out what was not initialised.

Thanks, once again, to Julien Grall.

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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13050 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoxen: Remove cast of ARG* to unsigned int before pointer conversion.
bart [Mon, 15 Oct 2012 18:45:28 +0000 (18:45 +0000)]
xen: Remove cast of ARG* to unsigned int before pointer conversion.

This is pretty dodgy on 64 bit systems.

Thanks to Julien Grall.

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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13049 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoxen: adding missing break.
bart [Mon, 15 Oct 2012 18:44:59 +0000 (18:44 +0000)]
xen: adding missing break.

Thanks to Julien Grall.

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

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13048 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoxen: Useful messages for sys/domctl interface_version mismatch
bart [Mon, 15 Oct 2012 18:44:18 +0000 (18:44 +0000)]
xen: Useful messages for sys/domctl interface_version mismatch

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13047 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoadd vgtest file
cborntra [Mon, 15 Oct 2012 14:21:22 +0000 (14:21 +0000)]
add vgtest file

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13046 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agomake use of opcodes.h. The is part of extended immediate facility
cborntra [Mon, 15 Oct 2012 14:20:46 +0000 (14:20 +0000)]
make use of opcodes.h. The is part of  extended immediate facility

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13045 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoAdd testcase for checking the ltg + jhe handling
cborntra [Mon, 15 Oct 2012 14:01:31 +0000 (14:01 +0000)]
Add testcase for checking the ltg + jhe handling

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13044 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofix 308321 testsuite memcheck filter interferes with gdb_filter
philippe [Sun, 14 Oct 2012 18:16:41 +0000 (18:16 +0000)]
fix 308321 testsuite memcheck filter interferes with gdb_filter

Patch from Mark Wielaard.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13043 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix some more Char / HChar mixups
florian [Sun, 14 Oct 2012 16:45:23 +0000 (16:45 +0000)]
Fix some more Char / HChar mixups

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13042 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate list of ignored files.
florian [Sun, 14 Oct 2012 16:43:45 +0000 (16:43 +0000)]
Update list of ignored files.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13041 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix compile errors following function prototype change.
florian [Sun, 14 Oct 2012 02:58:42 +0000 (02:58 +0000)]
Fix compile errors following function prototype change.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13040 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoChar/ HChar cleanup: The various panic and printf-like functions
florian [Sun, 14 Oct 2012 00:16:28 +0000 (00:16 +0000)]
Char/ HChar cleanup: The various panic and printf-like functions
all take const HChar * arguments.
__FILE__ and __func__ expand into string literals (or character
arrays initialised by them), as do strings created by the preprocessor
e.g. #stuff.
This change reduces the number of warnings from 17000+ to ~5500

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13039 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoRough initial triage for bugs that appeared in the past month or so.
sewardj [Fri, 12 Oct 2012 22:49:50 +0000 (22:49 +0000)]
Rough initial triage for bugs that appeared in the past month or so.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13038 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoSome wrong options silently ignored if starting with same letters as valid option
philippe [Fri, 12 Oct 2012 21:46:55 +0000 (21:46 +0000)]
Some wrong options silently ignored if starting with same letters as valid option

For example, options below are silently "accepted"+ignored:
  valgrind --profile-heaps=yes --max-stackframes=35 memcheck/tests/trivialleak
  valgrind --profile-heaps=oui --max-stackframes=3.141592654 memcheck/tests/trivialleak

Also fixed the on-line --help output for option --core-redzone-size

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13037 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUpdate.
sewardj [Thu, 11 Oct 2012 16:57:27 +0000 (16:57 +0000)]
Update.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13036 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agonewer versions of devel headers expose CLONE flags only with _GNU_SOURCE
cborntra [Mon, 8 Oct 2012 20:35:13 +0000 (20:35 +0000)]
newer versions of devel headers expose CLONE flags only with _GNU_SOURCE
defined

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13035 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agofix parent and child tid pointer mixup:
cborntra [Mon, 8 Oct 2012 20:26:48 +0000 (20:26 +0000)]
fix parent and child tid pointer mixup:
The linux kernel has parent tid pointer first.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13034 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix syntax error from r13028.
petarj [Mon, 8 Oct 2012 10:07:08 +0000 (10:07 +0000)]
Fix syntax error from r13028.

Typo in r130128 broke the build on MIPS arch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13033 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agos390: Consolidate information about caches for older machines levels.
florian [Mon, 8 Oct 2012 00:09:22 +0000 (00:09 +0000)]
s390: Consolidate information about caches for older machines levels.
Unfortunately, there is only incomplete L2 data.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13032 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoThis is the 2nd installment of the cache info reorganisation.
florian [Sun, 7 Oct 2012 21:59:42 +0000 (21:59 +0000)]
This is the 2nd installment of the cache info reorganisation.
The host's VexArchInfo is passed to the tool instrumentation
functions. Purely mechanic patch.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13031 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoUse last-level cache for simulation. Even if there are more than
florian [Sun, 7 Oct 2012 21:03:27 +0000 (21:03 +0000)]
Use last-level cache for simulation. Even if there are more than
3 cache levels. Update documentation.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13030 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoFix compile error on ppc. Followup to r13028
florian [Sun, 7 Oct 2012 20:27:38 +0000 (20:27 +0000)]
Fix compile error on ppc. Followup to r13028

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13029 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoThis patch is the first installment of the cache info reorganisation.
florian [Sun, 7 Oct 2012 19:47:04 +0000 (19:47 +0000)]
This patch is the first installment of the cache info reorganisation.
It's reorg only. No new cache autodetection stuff has been added.

coregrind
pub_tool_cpuid.h is removed as it is no longer exposed to tools.
Its contents has moved to pub_core_cpuid.h.
New file: coregrind/m_cache.c to contain the autodetect code for
cache configurations and define other cache characteristics that
cannot be autodetected (i.e. icaches_maintain_coherence). Most of
cg-arch/x86-amd64.c was moved here. The cache detection code for
x86-64 needs to be fixed to properly initialise VexCacheInfo. It
currently has cachegrind bias.
m_cache.c exports a single function (to coregrind):
   VG_(machine_get_cache_info)(VexArchInfo *vai)
This function is called from VG_(machine_get_hwcaps) after hwcaps have
been detected.

cachegrind
Remove cachegrind/cg-{ppc32,ppc43,arm,mips32,s390x,x86-amd64}.c
With the exception of x86/mamd64 those were only establishing a
default cache configuration and that is so small a code snippet that
a separate file is no longer warranted. So, the code was moved to
cg-arch.c. Code was added to extract the relevant info from
x86-amd64.
New function maybe_tweak_LLc which captures the code to massage the
LLc cache configuration into something the simulator can handle. This
was originally in cg-x86-amd64.c but should be used to all architectures.
Changed warning message about missing cache auto-detect feature
to be more useful. Adapted filter-stderr scripts accordingly.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13028 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agos390: Add a few more test from olden times.
florian [Sun, 7 Oct 2012 04:00:48 +0000 (04:00 +0000)]
s390: Add a few more test from olden times.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13027 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agos390: Add a few more testcases from long time ago.
florian [Sat, 6 Oct 2012 18:02:46 +0000 (18:02 +0000)]
s390: Add a few more testcases from long time ago.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13026 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoCachegrind: use memory block numbers as tags.
weidendo [Fri, 5 Oct 2012 23:58:23 +0000 (23:58 +0000)]
Cachegrind: use memory block numbers as tags.

This saves instructions in hot path, resulting in
3% improvement on average with perf benchmarks.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13025 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agocachegrind: replace huge macro with inlined functions
weidendo [Fri, 5 Oct 2012 23:58:17 +0000 (23:58 +0000)]
cachegrind: replace huge macro with inlined functions

Makes modifications simpler in the future, and
should result in the same code.

This patch was already discussed some time ago on the
dev mailing list, and did not make a difference on
various architectures.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13024 a5019735-40e9-0310-863c-91ae7b9d1cf9

11 years agoSome older kernels on s390 do not provide AT_PLATFORM.
florian [Fri, 5 Oct 2012 23:29:38 +0000 (23:29 +0000)]
Some older kernels on s390 do not provide AT_PLATFORM.
Add a prerequisite condition to make sure it's there.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13023 a5019735-40e9-0310-863c-91ae7b9d1cf9