8634 Commits

Author SHA1 Message Date
Julian Seward
080c67f88d Avoid excessive fragmentation in m_mallocfree facility by munmapping
unused superblocks in some circumstances.  Bug 250101 (==269884,
==275852)
(Philippe Waroquiers, philippe.waroquiers@skynet.be)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11911
2011-07-24 17:39:10 +00:00
Julian Seward
42ada29286 Add a new client request and pair of macros,
VALGRIND_{DISABLE,ENABLE}_ERROR_REPORTING, which allow a thread to
temporarily disable reporting of errors it makes.  This is useful for
making Memcheck behave sanely in the presence of some MPI
implementations.  Also mark up libmpiwrap.c accordingly.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11910
2011-07-24 16:02:33 +00:00
Julian Seward
ddd692389a Change this file to be a symlink to the identical version
in the 32-bit equivalent directory
(none/tests/ppc32/test_isa_2_06_part1.c).  Bug #277199.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11909
2011-07-24 14:35:58 +00:00
Julian Seward
e1e9809117 Add support for IBM Power ISA 2.06 -- stage 2 (testcases).
Bug 276784.  (Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11908
2011-07-24 14:20:11 +00:00
Julian Seward
b7ff107848 Add support for IBM Power ISA 2.06 -- stage 2 (handle new
primops in Memcheck).  Bug 276784.
(Maynard Johnson, maynardj@us.ibm.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11907
2011-07-24 14:15:54 +00:00
Josef Weidendorfer
3bb3954eb5 Update ugly Callgrind hack for supporting instrumentation modes
To support different instrumentation modes, callgrind calls
VG_(discard_translations), which up to now does not belong to the
functions allowed to call from tools, as this is unsafe if
called from generated code.

Callgrind hacks around that by defining the prototype itself.
However, in r4789 (from Sep 27 2005!) a 3rd arg was added for
debugging output. Thus, callgrind could crash if called
with "-d -d".

As the "instrumentation off" feature seems to be used quite often,
it really would be nice to have VG_(discard_translations) callable
from tools...

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11906
2011-07-21 20:24:54 +00:00
Josef Weidendorfer
bd379979b8 callgrind_control: fix parsing of vgdb -l
If valgrind is called with absolute path (as qtcreator does),
callgrind_control found nothing, as it looked for
"... for valgrind ...", thus breaking qtcreator.

This also fixes expected behavior with client commands called with
absolute path. For "/usr/bin/valgrind --tool callgrind /usr/bin/foo",
running "callgrind_control foo" should catch this callgrind command.
Instead, you previously had to include the absolute path.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11905
2011-07-21 18:58:37 +00:00
Tom Hughes
ca6a8e8db9 DWARF comparisons should be signed. Patch from Jakub Jelinek.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11904
2011-07-21 15:07:26 +00:00
Julian Seward
492f3fd0d1 Add test cases for bug 277780. (fix for VMOV.F32).
Bug 277780.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11903
2011-07-19 15:49:55 +00:00
Julian Seward
79cc4f3d4d Fix regtest: the delta value printed by the VSTn with register
post-index is bogus due to an accidental stringification in the macro.
Bug 277689.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11902
2011-07-19 08:10:38 +00:00
Julian Seward
61b540db5e Add test cases for NEON VMUL by float scalar.
Bug 277663.  (Mans Rullgard, mans@mansr.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11901
2011-07-19 07:39:18 +00:00
Florian Krohm
ab6d49caae Update list of files to be ignored by svn.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11900
2011-07-18 20:32:20 +00:00
Florian Krohm
c5db2d607e Enable chasing of unconditional jumps/calls for s390x.
Tune function chase_into_ok to not chase into EX/EXRL
insn.
Observed speedups on performance tests were:
none      -6% ... -12%
memcheck  -3% ... -8%


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11899
2011-07-16 02:09:36 +00:00
Bart Van Assche
9c8728c421 drd/tests/annotate_smart_pointer2: Filter out offset
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11898
2011-07-13 16:46:18 +00:00
Bart Van Assche
b15c0697f9 Add gdb.pic to the Subversion ignore list
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11897
2011-07-13 10:45:02 +00:00
Bart Van Assche
458f87ca2f drd: add a test that verifies that a race is reported for the annotate_smart_pointer test program with annotations disabled
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11896
2011-07-13 10:43:49 +00:00
Bart Van Assche
cc4bc378ca drd/tests/annotate_smart_pointer: remove a superfluous initialization
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11895
2011-07-13 10:43:05 +00:00
Tom Hughes
8bfecb71da Cast llseek argument to avoid warning.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11894
2011-07-13 10:05:24 +00:00
Tom Hughes
a7524aa184 Allow core dumps on 32 bit architectures to go over 2Gb in size. BZ#277610.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11893
2011-07-13 09:02:14 +00:00
Florian Krohm
5e08a97bfe Make the location for temporary files configurable at runtime.
To that effect observe the environment variable TMPDIR. If defined,
its value takes precedence over VG_TMPDIR.
Because the directory name is no longer a compile time constant,
VG_(err_config_error) was changed to take a variable argument list.
Fixes #267020.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11892
2011-07-12 19:07:05 +00:00
Julian Seward
32dce3364d Reinstate inclusion of signal.h, removed in r11886.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11891
2011-07-12 17:41:50 +00:00
Julian Seward
8a76636455 Reinstate inclusion of unistd.h, removed in r11886.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11890
2011-07-12 17:28:39 +00:00
Julian Seward
8941601fef Un-break the build on most platforms following r11888. Oops.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11889
2011-07-12 13:50:59 +00:00
Julian Seward
634a591426 Add a file containing information on how to cross-compile for Android.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11888
2011-07-12 13:34:31 +00:00
Julian Seward
5eabf446b4 Fix up preload code so that on Android it doesn't try to call anything
else -- that seems to give a runtime link failure.  In particular,
avoid calling _exit, getpagesize or __libc_freeres.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11887
2011-07-12 13:33:00 +00:00
Julian Seward
1db7ec42de Fix Linux build breakage caused by header rearrangement in r11885, sigh.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11886
2011-07-12 11:59:11 +00:00
Julian Seward
30d2b29153 Build system fixes so as to temporarily disable the GDBserver on
Android.  Making that work will require a bit of extra effort due to
minor glibc-vs-bionic differences.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11885
2011-07-12 11:46:24 +00:00
Julian Seward
207ec5bf77 Conditionalise code that uses some ELF constants that Android doesn't
know about, and remove three unnecessary #defines.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11884
2011-07-12 10:59:27 +00:00
Julian Seward
00977fac18 Disable stabs reading on Android; it's uncompilable, and there's no
point.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11883
2011-07-12 07:27:23 +00:00
Julian Seward
0ef7dc3c2f Make this compilable on Android.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11882
2011-07-12 07:14:47 +00:00
Julian Seward
3d0958fc38 Allow selection of an alternative location for temporary files at
configure time, via the --with-tmpdir flag.  The configure.in part of
this was mistakenly committed already in r11872 as first hunk of the
configure.in change.  Bug 266035 comment 11.  (Kenny Root,
kroot@google.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11881
2011-07-12 06:58:55 +00:00
Julian Seward
f6da406ce1 Duh, do r11879 correctly (Android doesn't have an auxv entry called
AT_FPUCW.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11880
2011-07-12 06:29:00 +00:00
Julian Seward
c6760643d3 Android doesn't have an auxv entry called AT_FPUCW.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11879
2011-07-12 06:26:04 +00:00
Julian Seward
d3bb08f53b Ignore ELF phdrs that have a p_memsz of zero, as appears to happen
on Android.  Bug 266035 comment 30.  (John Reiser, jreiser@bitwagon.com)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11878
2011-07-12 06:24:23 +00:00
Julian Seward
dc3f94c3e9 /bin/sh lives at /system/bin/sh on Android.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11877
2011-07-12 06:19:05 +00:00
Julian Seward
5d0c673532 Stop gcc on Android giving bogus function-has-no-return-value warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11876
2011-07-12 06:13:08 +00:00
Julian Seward
eea9337891 The pthread.h on Android has no definition for pthread_rwlock_t, which
makes the associated intercepts in Helgrind and DRD un-compilable.
Add a configure test for it, and use them to guard the aforementioned
intercepts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11875
2011-07-11 22:11:58 +00:00
Julian Seward
faa7e66524 Pass platform-variant tags (-DVGPV_blah_blah_blah) to regtest
compiles.  Also, fix some $(NAME) stuff which looks like it should
have been @NAME@ all along.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11874
2011-07-11 22:10:14 +00:00
Julian Seward
887fed8e7b Add a suppression file for Android's libc (bionic).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11873
2011-07-11 20:52:10 +00:00
Julian Seward
d136f187bb Introduce the concept of platform variants. These allow further
qualification of the normal (arch, os) pairings used to factorise the
code base via the VGP_ defines.  With this change, a new define
VGPV_<arch>_<os>_<variant> is also passed to each compile.  The
initial motivation is to allow clean factorisation of Android-specific
code, which is a minor variant of arm-linux, without having to
introduce a complete new platform.  In all other cases the supplied
tag is simply "vanilla".

Also add configure.in stuff to recognise Android at configure time.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11872
2011-07-11 20:42:34 +00:00
Julian Seward
2420f2b5ce Handle sigaction, sigsuspend, sigprocmask on arm-linux; comment-only
changes for x86-linux and ppc32-linux.  Derived from patch in bug
266035 comment 10 (Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11871
2011-07-11 18:23:09 +00:00
Julian Seward
5ce93a8654 Remove identical copies of convert_sigset_to_rt, PRE(sys_sigaction)
and POST(sys_sigaction) in syswrap-x86-linux.c and
syswrap-ppc32-linux.c, and replace them with a single version in
syswrap-linux.c instead.  Derived from patch in bug 266035 comment 10
(Jeff Brown, jeffbrown@google.com).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11870
2011-07-11 17:48:24 +00:00
Bart Van Assche
718bde7682 drd/tests/matinv: Add missing return statement in an error path.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11869
2011-07-11 16:25:37 +00:00
Julian Seward
9aacfb0e51 Remove a commented-out copy of the sys_sigaction wrappers
that also are duplicated for x86-linux and ppc32-linux.
(No functional change.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11868
2011-07-11 16:07:01 +00:00
Josef Weidendorfer
5eb8c47884 Port callgrind_control to vgdb
Same functionality, apart from "-l" to show "long information".
This only printed the current working directory of the callgrind run,
which currently is not available any longer, but not really needed.

The port to vgdb has an important benefit:
callgrind can now be controlled by callgrind_control also when
the client program is blocked/sleeping in a system call. This was
not possible before as a command file was polled only while the
client was running.

Ubuntu by default restricts PTRACE (used by vgdb) to parent processes,
making Ubuntu show similar behavior as before: vgdb is not allowed
to attach by PTRACE when the client is blocked/sleeping, so
callgrind_control works similar to before this change on Ubuntu.

A final patch, which gets rid of command file polling, will be
submitted after Valgrind 3.7, as KCachegrind currently writes
command files directly, and needs to be changed to rely on
callgrind_control instead.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11867
2011-07-11 14:46:44 +00:00
Josef Weidendorfer
4a3ad5c4fc callgrind: add vgdb commands needed for porting callgrind_control
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11866
2011-07-11 14:46:41 +00:00
Julian Seward
ed80c32ae5 Add / fix up test cases for {LD,ST}REX{,B,H,D} on ARM. Works for both
ARM and Thumb encodings.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11865
2011-07-11 11:46:52 +00:00
Florian Krohm
210fd226e2 Valgrind-side changes to fix bug #271776.
Add testcase for s390x's STFLE instruction.
Patch provided by Divya Vyas <divyvyas@linux.vnet.ibm.com>


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11864
2011-07-11 01:51:39 +00:00
Julian Seward
3898fc46fc Add regression tests for {ADD,SUB}W reg, reg, #uimm12 (vex r2170)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11863
2011-07-08 15:46:33 +00:00
Florian Krohm
5747998699 Allow optional specification of cpu models on the command line
and test whether the host machine matches one of those. This is
needed  to fix Bug #271776.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11862
2011-07-07 22:09:41 +00:00