ambi/valgrind.git
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

11 years agoChange uname based arch-check to match machine hardware name in sgcheck.
petarj [Thu, 4 Oct 2012 23:53:03 +0000 (23:53 +0000)]
Change uname based arch-check to match machine hardware name in sgcheck.

Some hardware platforms will return "unknown" for 'uname -i', so it is more
accurate and common to run 'uname -m' which returns machine hardware name.
This way, some platforms that do not support sgcheck will avoid running tests
for it.

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

11 years agoAllow a null pointer as the second argument to capget.
tom [Thu, 4 Oct 2012 21:38:27 +0000 (21:38 +0000)]
Allow a null pointer as the second argument to capget.
Patch from Mark Wielaard to fix BZ#307101.

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

11 years agoFilter out memcpy symbol versions from test results.
tom [Thu, 4 Oct 2012 20:41:12 +0000 (20:41 +0000)]
Filter out memcpy symbol versions from test results.
Patch from Mark Wielaard to fix BZ#307290.

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

11 years agoImplement a fake /proc/self/auxv file for linux systems.
tom [Thu, 4 Oct 2012 20:27:38 +0000 (20:27 +0000)]
Implement a fake /proc/self/auxv file for linux systems.
Patch from Mark Wielaard to fix BZ#253519.

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

11 years agoFix valt_load_address value in pkgconfig file.
tom [Thu, 4 Oct 2012 20:01:50 +0000 (20:01 +0000)]
Fix valt_load_address value in pkgconfig file.
Patch from Mark Wielaard to fix BZ#307729.

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

11 years agoUnbreak build on ppc64 (error: ‘EmWarn_PPC64_redir_underflow’ undeclared)
philippe [Tue, 2 Oct 2012 20:35:21 +0000 (20:35 +0000)]
Unbreak build on ppc64 (error: â€˜EmWarn_PPC64_redir_underflow’ undeclared)

coregrind/m_translate.c does not compile on ppc64 (ppc32 maybe also?)
due to missing include file.
Note: libvex_emnote.h is unconditionally included, even if only
useful for ppc. I suppose we do not want #ifdef for that.

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

11 years agoAdd include file.
florian [Sun, 30 Sep 2012 20:30:40 +0000 (20:30 +0000)]
Add include file.

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

11 years agofix n-i-bz report error for vgdb snapshot requested before execution
philippe [Mon, 24 Sep 2012 21:50:16 +0000 (21:50 +0000)]
fix n-i-bz    report error for vgdb snapshot requested before execution
Massif does not accept to take snapshots of heap before execution has started.
So, if such a snapshot is requested (using vgdb and option --vgdb-error=0),
then such a snapshot must be refused rather than causing an assert.
(problem reported by dark_footix@yahoo.fr)

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

11 years agoUnbreak build on Mac_OS where __NR_mprotect is not defined.
philippe [Mon, 24 Sep 2012 21:37:02 +0000 (21:37 +0000)]
Unbreak build on Mac_OS where __NR_mprotect is not defined.
The test is not executed on Darwin but should compile.
(based on fix suggestion by Rich Coe)

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

11 years agofix 307155 filter_gdb should filter out syscall-template.S T_PSEUDO
philippe [Mon, 24 Sep 2012 21:12:41 +0000 (21:12 +0000)]
fix 307155 filter_gdb should filter out syscall-template.S T_PSEUDO

With some glibc version (e.g. on fedora 16), gdb output contains
a line with T_PSEUDO which should be filtered out.

Patch from Mark Wielaard.

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

11 years agos390: Add testcase for some integer comparison insns
florian [Sun, 23 Sep 2012 00:42:49 +0000 (00:42 +0000)]
s390: Add testcase for some integer comparison insns

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

11 years agoA new post.exp file that provides more details for overloaded-new test.
petarj [Fri, 21 Sep 2012 22:44:45 +0000 (22:44 +0000)]
A new post.exp file that provides more details for overloaded-new test.

Valgrind for MIPS will give more details on the heap allocation functions
(operator new) than the existing post.exp presents.
This fixes massif/tests/overloaded-new for MIPS and likely other arch if they
provide the info.

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

11 years agoImplement some extra DW_OPs - more constants and some unary operators.
tom [Fri, 21 Sep 2012 09:12:30 +0000 (09:12 +0000)]
Implement some extra DW_OPs - more constants and some unary operators.
Patch from Mark Wielaard on BZ#307038.

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

11 years agoRename CfiOp to CfiBinop in preparation for adding unary operators.
tom [Fri, 21 Sep 2012 09:04:27 +0000 (09:04 +0000)]
Rename CfiOp to CfiBinop in preparation for adding unary operators.

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

11 years agoWhen processing DW_OP_plus_uconst make sure we record an add, not
tom [Fri, 21 Sep 2012 08:57:46 +0000 (08:57 +0000)]
When processing DW_OP_plus_uconst make sure we record an add, not
whatever binary operation we happened to see last.

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

11 years agoUpdate due to file renaming in VEX r2541.
florian [Thu, 20 Sep 2012 01:22:53 +0000 (01:22 +0000)]
Update due to file renaming in VEX r2541.

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

11 years agoUpdate URLs for new Principles of Operations (SA22-7832-09).
florian [Wed, 19 Sep 2012 16:43:30 +0000 (16:43 +0000)]
Update URLs for new Principles of Operations (SA22-7832-09).

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

11 years agoUpdate list of ignored files.
florian [Wed, 19 Sep 2012 14:29:42 +0000 (14:29 +0000)]
Update list of ignored files.

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

11 years agoAnother exp file for tc23_bogus_condwait.c.
petarj [Wed, 19 Sep 2012 12:48:09 +0000 (12:48 +0000)]
Another exp file for tc23_bogus_condwait.c.

struct pthread_mutex_t is different on MIPS32 and x86_64, and thus passing a
bogus mutex pthread_cond_wait (line 72) will corrupt memory in a different way
on two platforms. This causes the subsequent call to pthread_cond_wait to fail
on MIPS and i386 but not on x86_64.

This change fixes helgrind/tests/tc23_bogus_condwait on MIPS and i386.

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

11 years agoAdding tc19_shadowmem.stderr.exp-mips32 to match different output.
petarj [Wed, 19 Sep 2012 11:51:31 +0000 (11:51 +0000)]
Adding tc19_shadowmem.stderr.exp-mips32 to match different output.

Writing to a double is done via two store-word instructions on MIPS platforms.
Thus, Helgrind will report "Possible data race during write of size 4" twice on
subsequent locations on MIPS instead of a single "Possible data race during
write of size 8". New exp file is added to cover this case.
This fixes helgrind/tests/tc19_shadowmem on MIPS.

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

11 years agoUpdates for hfp insns.
florian [Tue, 18 Sep 2012 21:15:54 +0000 (21:15 +0000)]
Updates for hfp insns.

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

11 years agoAdd exp file for tc20_verifywrap due to different errno values on MIPS.
petarj [Tue, 18 Sep 2012 21:02:59 +0000 (21:02 +0000)]
Add exp file for tc20_verifywrap due to different errno values on MIPS.

Different error numbers on MIPS require us to add an extra exp file for this
test. EDEADLK is 45 on MIPS (and not 35), and EOPNOTSUPP is 122 (and not 95).
Furthermore, sem_post will pass due to different implementation on MIPS (in
comparison to x86_64), and thus one error less has to be reported in the log.

This fixes helgrind/tests/tc20_verifywrap.

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

11 years agos390: Add testcases for srnm and srnmb. Update opcode status list.
florian [Tue, 18 Sep 2012 20:25:23 +0000 (20:25 +0000)]
s390: Add testcases for srnm and srnmb. Update opcode status list.

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

11 years agoEnable wrappers for sys_settimeofday and sys_stime on MIPS.
petarj [Tue, 18 Sep 2012 17:19:36 +0000 (17:19 +0000)]
Enable wrappers for sys_settimeofday and sys_stime on MIPS.

Enable wrappers for MIPS for the following two system calls:

- sys_settimeofday, and
- sys_stime.

Resolves https://bugs.kde.org/show_bug.cgi?id=306783
Patch contributed bederic M. <dark_footix@yahoo.fr>

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

11 years agoUpdate for 3.8.1.
sewardj [Tue, 18 Sep 2012 07:03:27 +0000 (07:03 +0000)]
Update for 3.8.1.

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

11 years agoUpon successful run, remove temporary files.
florian [Mon, 17 Sep 2012 21:20:06 +0000 (21:20 +0000)]
Upon successful run, remove temporary files.

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

11 years agoAdd missing header files. Building from tarball works again.
florian [Mon, 17 Sep 2012 18:54:44 +0000 (18:54 +0000)]
Add missing header files. Building from tarball works again.

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

11 years agoUpdate.
sewardj [Mon, 17 Sep 2012 18:20:29 +0000 (18:20 +0000)]
Update.

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

11 years agoFix inconsistent comment (== BRANCH_3_8 r12987)
sewardj [Mon, 17 Sep 2012 18:20:06 +0000 (18:20 +0000)]
Fix inconsistent comment (== BRANCH_3_8 r12987)

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

11 years agoInclude autogen.sh in the tarfile. See #306310.
sewardj [Mon, 17 Sep 2012 17:17:00 +0000 (17:17 +0000)]
Include autogen.sh in the tarfile.  See #306310.

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

11 years agoIntercept __GI_memmove on Linux. Fixes #306612.
sewardj [Mon, 17 Sep 2012 15:44:15 +0000 (15:44 +0000)]
Intercept __GI_memmove on Linux.  Fixes #306612.

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

11 years agoAdd tests for: uqsub16 shadd16 uhsub8 uhsub16. See #304035.
sewardj [Mon, 17 Sep 2012 15:29:53 +0000 (15:29 +0000)]
Add tests for: uqsub16 shadd16 uhsub8 uhsub16.  See #304035.

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

11 years agoHandle Iop_QSub16Ux2, needed in fix for #304035.
sewardj [Mon, 17 Sep 2012 15:28:46 +0000 (15:28 +0000)]
Handle Iop_QSub16Ux2, needed in fix for #304035.

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

11 years agoAdd test cases for PCMPxSTRx variant $0x46. See #306664.
sewardj [Mon, 17 Sep 2012 13:43:57 +0000 (13:43 +0000)]
Add test cases for PCMPxSTRx variant $0x46.  See #306664.

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

11 years agoUpdate.
sewardj [Mon, 17 Sep 2012 08:37:33 +0000 (08:37 +0000)]
Update.

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

11 years agoBe more flexible by allowing the compile command to be prefixed,
florian [Sat, 15 Sep 2012 19:31:07 +0000 (19:31 +0000)]
Be more flexible by allowing the compile command to be prefixed,
e.g. ccache gcc whatever... This fixes bugzilla #252955.
Patch from  Stephen McCamant <smcc@CS.Berkeley.EDU>.

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

11 years agoAdding new exp file for tc18_semabuse in helgrind.
petarj [Sat, 15 Sep 2012 02:36:21 +0000 (02:36 +0000)]
Adding new exp file for tc18_semabuse in helgrind.

The existing tc18_semabuse.stderr.exp expects that sem_post on a bogus semaphore
will fail, yet it does not on platforms such as MIPS or ARM. This is specific to
implementation of sem_post for i386/x86_64 that has some assumptions such as that
'private' field is not clobbered. This will eventually result in different
parameter passed to syscall and thus different output is encountered.
This change fixes helgrind/tests/tc18_semabuse for MIPS.

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

11 years agos390: Add a testcase for 32/64-bit bfp comparison insns.
florian [Sat, 15 Sep 2012 02:22:46 +0000 (02:22 +0000)]
s390: Add a testcase for 32/64-bit bfp comparison insns.

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

11 years agoSetup correct minimum malloc'd block size for MIPS.
petarj [Sat, 15 Sep 2012 01:04:06 +0000 (01:04 +0000)]
Setup correct minimum malloc'd block size for MIPS.

Correct minimum malloc's block size for MIPS is 8.
This fixes massif/tests/big-alloc.

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

11 years agoMark revision 12964 to be merged in 3.8.1
philippe [Fri, 14 Sep 2012 21:18:00 +0000 (21:18 +0000)]
Mark revision 12964 to be merged in 3.8.1
(this revision fixes some missing files in the release tarball)

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

11 years agoAdd a test which checks the leak search recovery mechanism
philippe [Fri, 14 Sep 2012 21:10:15 +0000 (21:10 +0000)]
Add a test which checks the leak search recovery mechanism

The leak search must recover if unreadable pages are scanned.
This test creates such unreadable pages by doing non SIMD mprotect
syscall (not seen by the aspacemgr).

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

11 years agoUpdate for s390.
florian [Fri, 14 Sep 2012 16:07:37 +0000 (16:07 +0000)]
Update for s390.

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

11 years agoEnable pre-wrapper for sys_shutdown for MIPS.
petarj [Fri, 14 Sep 2012 13:12:37 +0000 (13:12 +0000)]
Enable pre-wrapper for sys_shutdown for MIPS.

Small change to enable wrapper for sys_shutdown for MIPS.

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

11 years agoAdjust the vbit tester to deal with shift operations that require
florian [Thu, 13 Sep 2012 19:41:12 +0000 (19:41 +0000)]
Adjust the vbit tester to deal with shift operations that require
an immediate constant as the shift amount. This is needed for
powerpc Iop_ShlD64 etc. What it basically means that we do not
iterate over the bits in the 2nd operand because there are no
V-bits to set. An immediate constant is always completely defined.
Fixes bugzilla #305948.

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

11 years agos390: Add testcase for bfp multiply-and-add/sub
florian [Thu, 13 Sep 2012 15:09:53 +0000 (15:09 +0000)]
s390: Add testcase for bfp multiply-and-add/sub

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

11 years agos390: Add testcase for square root and load positive/negative/complement.
florian [Thu, 13 Sep 2012 03:04:23 +0000 (03:04 +0000)]
s390: Add testcase for square root and load positive/negative/complement.
Tests are for 32/64-bit values only.

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

11 years agos390x: Testcases for floating point 32/64-bit. Related to VEX r2525.
florian [Wed, 12 Sep 2012 19:40:14 +0000 (19:40 +0000)]
s390x: Testcases for floating point 32/64-bit. Related to VEX r2525.

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

11 years agos390: Fix FOC width. It's 4 bytes not 8.
florian [Tue, 11 Sep 2012 23:06:02 +0000 (23:06 +0000)]
s390: Fix FOC width. It's 4 bytes not 8.

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

11 years agoFix 306310 3.8.0 release tarball missing some files
philippe [Tue, 11 Sep 2012 19:53:01 +0000 (19:53 +0000)]
Fix 306310 3.8.0 release tarball missing some files

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

11 years agovalgrind: Support Xen toolstack process ioctls
bart [Sun, 9 Sep 2012 18:30:17 +0000 (18:30 +0000)]
valgrind: Support Xen toolstack process ioctls

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

Under Xen the toolstack is responsible for managing the domains in
the system, e.g. creating, destroying, and otherwise manipulating
them.

To do this it uses a number of ioctls on the /proc/xen/privcmd
device. Most of these (the MMAPBATCH ones) simply set things up such
that a subsequenct mmap call will map the desired guest memory. Since
valgrind has no way of knowing what the memory contains we assume
that it is all initialised (to do otherwise would require valgrind to
be observing the complete state of the system and not just the given
process).

The most interesting ioctl is XEN_IOCTL_PRIVCMD_HYPERCALL which
allows the toolstack to make arbitrary hypercalls. Although the
mechanism here is specific to the OS of the guest running the
toolstack the hypercalls themselves are defined solely by the
hypervisor. Therefore I have split support for this ioctl into a part
in syswrap-linux.c which handles the ioctl itself and passes things
onto a new syswrap-xen.c which handles the specifics of the
hypercalls themselves. Porting this to another OS should just be a
matter of wiring up syswrap-$OS.c to decode the ioctl and call into
syswrap-xen.c. In the future we may want to split this into
syswrap-$ARCH-xen.c but for now this is x86 only.

The hypercall coverage here is pretty small but is enough to get
reasonable(-ish) results out of the xl toolstack when listing,
creating and destroying domains.

One issue is that the hypercalls which are exlusively used by the
toolstacks (as opposed to those used by guest operating systems) are
not considered a stable ABI, since the hypervisor and the lowlevel
tools are considered a matched pair. This covers the sysctl and
domctl hypercalls which are a fairly large chunk of the support
here. I'm not sure how to solve this without invoking a massive
amount of duplication. Right now this targets the Xen unstable
interface (which will shortly be released as Xen 4.2), perhaps I can
get away with deferring this problem until the first change .

On the plus side the vast majority of hypercalls are not of interest
to the toolstack (they are used by guests) so we can get away without
implementing them.

Note: a hypercall only reads as many words from the ioctl arg
struct as there are actual arguments to that hypercall and the
toolstack only initialises the arguments which are used. However
there is no space in the DEFN_PRE_TEMPLATE prototype to allow this to
be communicated from syswrap-xen.c back to syswrap-linux.c. Since a
hypercall can have at most 5 arguments I have hackily stolen ARG8 for
this purpose.

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