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

11 years agoRestore unwind regs structure if VG_(use_CF_info) fails on MIPS.
petarj [Sun, 9 Sep 2012 01:56:56 +0000 (01:56 +0000)]
Restore unwind regs structure if VG_(use_CF_info) fails on MIPS.

If VG_(use_CF_info) fails to find the next frame using loaded debug symbols, it
will still change the data in uregs. Thus, we need to have uregs_copy before
calling VG_(use_CF_info), and restore uregs if the call returns wrong data.
This fixes drd/tests/tc04_free_lock on MIPS.

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

11 years agoUpdate Subversion ignore list
bart [Thu, 6 Sep 2012 14:29:24 +0000 (14:29 +0000)]
Update Subversion ignore list

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

11 years agodrd: Suppress race reports on .got sections too
bart [Thu, 6 Sep 2012 14:08:26 +0000 (14:08 +0000)]
drd: Suppress race reports on .got sections too

This is a slightly modified version of a patch provided by Petar Jovanovic
<petar.jovanovic@rt-rk.com>.

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

11 years agoAnnounce bug fix in NEWS.
florian [Thu, 6 Sep 2012 03:26:50 +0000 (03:26 +0000)]
Announce bug fix in NEWS.

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

11 years agos390: Add a testcase for condition code computation for
florian [Thu, 6 Sep 2012 03:22:16 +0000 (03:22 +0000)]
s390: Add a testcase for condition code computation for
convert-to-fixed. See VEX r2516. Part of fixing bugzilla #306054.

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

11 years agoEnable testing of primops on ARM platforms. (Florian Krohm)
sewardj [Mon, 3 Sep 2012 21:59:28 +0000 (21:59 +0000)]
Enable testing of primops on ARM platforms.  (Florian Krohm)

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

11 years agoUse "orr r9,r9,r9" as the magic insn for IR injection on ARM and
sewardj [Mon, 3 Sep 2012 21:51:02 +0000 (21:51 +0000)]
Use "orr r9,r9,r9" as the magic insn for IR injection on ARM and
Thumb, since r13 is disallowed for many instructions in the Thumb
encoding.

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

11 years agoUpdate testcase as a followup to VEX r2509.
florian [Mon, 3 Sep 2012 17:45:15 +0000 (17:45 +0000)]
Update testcase as a followup to VEX r2509.

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

11 years agos390: Ensure proper size when calling get_otrack_shadow_offset_wrk.
florian [Mon, 3 Sep 2012 17:34:22 +0000 (17:34 +0000)]
s390: Ensure proper size when calling get_otrack_shadow_offset_wrk.
Also handle EMNOTE.

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

11 years agoAdd bugzilla number.
florian [Mon, 3 Sep 2012 15:39:19 +0000 (15:39 +0000)]
Add bugzilla number.

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

11 years agoUpdate, tracking merged-to-3_8 fixes.
sewardj [Mon, 3 Sep 2012 07:24:30 +0000 (07:24 +0000)]
Update, tracking merged-to-3_8 fixes.

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

11 years agoUpdate.
sewardj [Sun, 2 Sep 2012 21:53:17 +0000 (21:53 +0000)]
Update.

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

11 years agoUpdate.
sewardj [Sun, 2 Sep 2012 21:20:27 +0000 (21:20 +0000)]
Update.

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

11 years ago"Fix" stack bounds check when compiled by Clang 4.0. Fix from Andrew
sewardj [Sun, 2 Sep 2012 21:17:36 +0000 (21:17 +0000)]
"Fix" stack bounds check when compiled by Clang 4.0.  Fix from Andrew
Morrow, analysis by Florian Krohm.

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

11 years agoImprove callgrind performance by 4 to 8% using UNLIKELY
philippe [Sun, 2 Sep 2012 20:26:23 +0000 (20:26 +0000)]
Improve callgrind performance by 4 to 8% using UNLIKELY
Performance improvements from 4 to 8% obtained on amd64 on the perf tests by:
1. using UNLIKELY inside tracing macros
2. avoid calling CLG_(switch_thread)(tid) on the hot patch setup_bbcc
   unless tid differs from CLG_(current_tid).

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

11 years agoAdd testcase to check the emulation warning for new supported opcodes
florian [Sun, 2 Sep 2012 18:10:34 +0000 (18:10 +0000)]
Add testcase to check the emulation warning for new supported opcodes
on hosts without floating point extension facility.
See companion patch VEX r2501.
Part of fixing bugzilla #306098.

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

11 years agoChange s390-features to allow testing for absence of a feature.
florian [Sun, 2 Sep 2012 03:30:38 +0000 (03:30 +0000)]
Change s390-features to allow testing for absence of a feature.
This is infintely less painful than to find out how to invert
the condition in a test prerequisite.

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

11 years agoFix an uninitialised variable found be BEAM.
florian [Sat, 1 Sep 2012 23:48:09 +0000 (23:48 +0000)]
Fix an uninitialised variable found be BEAM.

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

11 years agoFix Makefile.am for fpext_fail testcase.
florian [Sat, 1 Sep 2012 23:43:03 +0000 (23:43 +0000)]
Fix Makefile.am for fpext_fail testcase.

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

11 years agoUpdate.
sewardj [Sat, 1 Sep 2012 20:33:46 +0000 (20:33 +0000)]
Update.

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

11 years agoMark two fixes for s390x as [390] because they weren't fixed for 3.8.0
florian [Sat, 1 Sep 2012 20:23:59 +0000 (20:23 +0000)]
Mark two fixes for s390x as [390] because they weren't fixed for 3.8.0

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

11 years agoGuard against negative symbol sizes in ELF symbol tables, which
sewardj [Sat, 1 Sep 2012 20:08:35 +0000 (20:08 +0000)]
Guard against negative symbol sizes in ELF symbol tables, which
lead to assertion failures in ML_(find_rx_mapping).  Most closely
related to #304980.

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

11 years agos390: Add testcase for emulation failure.
florian [Sat, 1 Sep 2012 17:55:10 +0000 (17:55 +0000)]
s390: Add testcase for emulation failure.

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

11 years agos390: Valgrind-side changes to fixing bugzilla #274695:
florian [Sat, 1 Sep 2012 00:15:45 +0000 (00:15 +0000)]
s390: Valgrind-side changes to fixing bugzilla #274695:
Testcase, vbit tester update, memcheck support for the new IROps,
NEWS announcement and opcode list update.
Patch by Christian Borntraeger (borntraeger@de.ibm.com).
Vbit tester tweaks by myself.
Fixes bugzilla #274695.
See also companion patch VEX r2496.

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

11 years agos390: Detect floating point extension facility. Update s390-features.c
florian [Thu, 30 Aug 2012 20:30:32 +0000 (20:30 +0000)]
s390: Detect floating point extension facility. Update s390-features.c

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

11 years agoAdd FAC_BIT macro to simplify correct testing for facility bits.
florian [Thu, 30 Aug 2012 18:47:56 +0000 (18:47 +0000)]
Add FAC_BIT macro to simplify correct testing for facility bits.

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

11 years agoUpdate filter_stderr due to changed warning message.
florian [Thu, 30 Aug 2012 15:29:48 +0000 (15:29 +0000)]
Update filter_stderr due to changed warning message.
Unbreaks callgrind regtests on s390.

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

11 years agoFix build on Darwin. Patch by Rich Coe (rcoe@wi.rr.com).
florian [Thu, 30 Aug 2012 15:12:59 +0000 (15:12 +0000)]
Fix build on Darwin. Patch by Rich Coe (rcoe@wi.rr.com).

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

11 years agoEnable V-bit testing on x86.
florian [Wed, 29 Aug 2012 22:40:50 +0000 (22:40 +0000)]
Enable V-bit testing on x86.

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

11 years agoAdd list of files to svn:ignore here
florian [Wed, 29 Aug 2012 18:41:58 +0000 (18:41 +0000)]
Add list of files to svn:ignore here

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

11 years agoEnable V-bit testing on ppc32.
florian [Wed, 29 Aug 2012 17:45:13 +0000 (17:45 +0000)]
Enable V-bit testing on ppc32.

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

11 years agoFix printf formats for uint64_t values.
florian [Wed, 29 Aug 2012 15:21:15 +0000 (15:21 +0000)]
Fix printf formats for uint64_t values.

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

11 years agoAdd VALGRIND_VEX_INJECT_IR for ppc32. Should have been included
florian [Wed, 29 Aug 2012 14:59:13 +0000 (14:59 +0000)]
Add VALGRIND_VEX_INJECT_IR for ppc32. Should have been included
in r12906.

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

11 years agos390: Fix the default cache configuration. As z10-EC has an L3
florian [Wed, 29 Aug 2012 02:50:56 +0000 (02:50 +0000)]
s390: Fix the default cache configuration. As z10-EC has an L3
cache, use that instead of the L2 -- bringing the code in synch
with documentation.
Also improve the warning message to be more meaningful.

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

11 years agovbit tester: Disable Iop_CmpLT64S and Iop_CmpLE64S for ppc because
florian [Tue, 28 Aug 2012 23:38:49 +0000 (23:38 +0000)]
vbit tester: Disable Iop_CmpLT64S and Iop_CmpLE64S for ppc because
they cause assertion failures.
Do not test Iop_CmpORDxyz on ppc because the vbit tester does not
support them. This is just so we don't have to add another .exp file for ppc.

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

11 years agoRemove .deps directory.
florian [Tue, 28 Aug 2012 18:37:40 +0000 (18:37 +0000)]
Remove .deps directory.

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

11 years agodrd/tests: Add a test that verifies whether the pthread_cancel() intercept works
bart [Tue, 28 Aug 2012 18:17:27 +0000 (18:17 +0000)]
drd/tests: Add a test that verifies whether the pthread_cancel() intercept works

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

11 years agodrd: Re-enable the pthread_cancel() intercept now that the CALL_FN_*() ABI
bart [Tue, 28 Aug 2012 17:57:09 +0000 (17:57 +0000)]
drd: Re-enable the pthread_cancel() intercept now that the CALL_FN_*() ABI
violation has been fixed (r12811).

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

11 years agoAdd a tester for V-bit propagation through IROps.
florian [Tue, 28 Aug 2012 16:50:39 +0000 (16:50 +0000)]
Add a tester for V-bit propagation through IROps.
The tester is located in memcheck/tests/vbit-test.
It needs the following support on the valgrind / VEX side:
(1) a new client request VG_USERREQ__VEX_INIT_FOR_IRI
(2) a new "special instruction" on all architectures inserted via
    VALGRIND_VEX_INJECT_IR
(3) VEX changes to detect the special insn and insert IR (ir_inject.c)

The README file in vbit-test has some more information.
See also VEX r2490.  Fixes bugzilla #300102.

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

11 years agos390: Add zEC12 machine model. Fix spelling for some older models.
florian [Tue, 28 Aug 2012 13:33:10 +0000 (13:33 +0000)]
s390: Add zEC12 machine model. Fix spelling for some older models.

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

11 years agoFix EXTRA_DIST. Add dummy .exp file to satisfy the consistency checker
florian [Tue, 28 Aug 2012 00:38:47 +0000 (00:38 +0000)]
Fix EXTRA_DIST. Add dummy .exp file to satisfy the consistency checker

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

11 years agos390: Add testcase for the ecag insn. Based on patch by
florian [Sun, 26 Aug 2012 19:05:06 +0000 (19:05 +0000)]
s390: Add testcase for the ecag insn. Based on patch by
Divya Vyas (divyvyas@linux.vnet.ibm.com). Update opcode list.

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

11 years agoOn s390: detect presence of stckf hardware facility.
florian [Sun, 26 Aug 2012 04:23:08 +0000 (04:23 +0000)]
On s390: detect presence of stckf hardware facility.

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