]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
14 years agodrd: Add a stress test for the barrier implementation
Bart Van Assche [Fri, 29 Jul 2011 12:32:53 +0000 (12:32 +0000)] 
drd: Add a stress test for the barrier implementation

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

14 years agodrd: Remove an unused member variable from the barrier implementation
Bart Van Assche [Fri, 29 Jul 2011 12:31:33 +0000 (12:31 +0000)] 
drd: Remove an unused member variable from the barrier implementation

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

14 years agodrd: drd_thread.c source code cleanup
Bart Van Assche [Fri, 29 Jul 2011 12:30:43 +0000 (12:30 +0000)] 
drd: drd_thread.c source code cleanup

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

14 years agodrd, bitmap node allocator: recognize root node size properly
Bart Van Assche [Fri, 29 Jul 2011 07:26:01 +0000 (07:26 +0000)] 
drd, bitmap node allocator: recognize root node size properly

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

14 years agodrd/tests/pth_barrier[23]: Filter output such that only the error count is kept
Bart Van Assche [Fri, 29 Jul 2011 07:22:29 +0000 (07:22 +0000)] 
drd/tests/pth_barrier[23]: Filter output such that only the error count is kept

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

14 years agoYet another thread test scheduler sensitivity fix
Bart Van Assche [Fri, 29 Jul 2011 06:58:16 +0000 (06:58 +0000)] 
Yet another thread test scheduler sensitivity fix

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

14 years agodrd/tests/pth_once: Restrict the number of callers to three.
Bart Van Assche [Fri, 29 Jul 2011 06:54:22 +0000 (06:54 +0000)] 
drd/tests/pth_once: Restrict the number of callers to three.

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

14 years agodrd: Remove a too strict assert() statement
Bart Van Assche [Fri, 29 Jul 2011 06:30:23 +0000 (06:30 +0000)] 
drd: Remove a too strict assert() statement

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

14 years agoYet another thread test scheduler sensitivity fix
Bart Van Assche [Fri, 29 Jul 2011 06:12:51 +0000 (06:12 +0000)] 
Yet another thread test scheduler sensitivity fix

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

14 years agodrd/tests/pth_detached_sem: Send regression test output to stderr instead of stdout
Bart Van Assche [Fri, 29 Jul 2011 05:44:38 +0000 (05:44 +0000)] 
drd/tests/pth_detached_sem: Send regression test output to stderr instead of stdout

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

14 years agoYet another threading tool regression test scheduler sensitivity fix
Bart Van Assche [Thu, 28 Jul 2011 18:46:38 +0000 (18:46 +0000)] 
Yet another threading tool regression test scheduler sensitivity fix

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

14 years agoVerify drd/tests/pth_detached stderr output instead of the stdout output.
Bart Van Assche [Thu, 28 Jul 2011 18:06:44 +0000 (18:06 +0000)] 
Verify drd/tests/pth_detached stderr output instead of the stdout output.

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

14 years agoYet another regression test scheduling sensitivity fix
Bart Van Assche [Thu, 28 Jul 2011 17:48:48 +0000 (17:48 +0000)] 
Yet another regression test scheduling sensitivity fix

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

14 years agoTwo more scheduler sensitivity fixes for thread tool regression tests
Bart Van Assche [Thu, 28 Jul 2011 17:41:49 +0000 (17:41 +0000)] 
Two more scheduler sensitivity fixes for thread tool regression tests

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

14 years agoMicro-optimize the matinv regression test
Bart Van Assche [Thu, 28 Jul 2011 17:40:49 +0000 (17:40 +0000)] 
Micro-optimize the matinv regression test

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

14 years agodrd: Make drd_pthread_intercepts.c compile again on systems where
Bart Van Assche [Thu, 28 Jul 2011 15:04:08 +0000 (15:04 +0000)] 
drd: Make drd_pthread_intercepts.c compile again on systems where
FUTEX_PRIVATE_FLAG has not been defined in <linux/futex.h>, e.g. older System z
systems.

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

14 years agoMake test 1 output independent of scheduler variations.
Bart Van Assche [Thu, 28 Jul 2011 15:01:01 +0000 (15:01 +0000)] 
Make test 1 output independent of scheduler variations.

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

14 years agoRevert r11916, r11917, r11918 and r11923.
Bart Van Assche [Thu, 28 Jul 2011 10:00:38 +0000 (10:00 +0000)] 
Revert r11916, r11917, r11918 and r11923.

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

14 years agodrd: Delay deletion of memory access information of joined threads in order not
Bart Van Assche [Thu, 28 Jul 2011 09:54:37 +0000 (09:54 +0000)] 
drd: Delay deletion of memory access information of joined threads in order not
to miss any races caused by these threads.

To do: refine handling of pthread_once() again.

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

14 years agoMore thread test scheduler sensitivity fixes
Bart Van Assche [Thu, 28 Jul 2011 09:33:55 +0000 (09:33 +0000)] 
More thread test scheduler sensitivity fixes

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

14 years agoDo not access addresses that belong to the client executable.
Florian Krohm [Wed, 27 Jul 2011 20:40:22 +0000 (20:40 +0000)] 
Do not access addresses that belong to the client executable.
It might not be there when we use VEX outside valgrind.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2185

14 years agoEliminate a superfluous sleep() call and check the pthread_cond_wait() return value
Bart Van Assche [Wed, 27 Jul 2011 08:49:47 +0000 (08:49 +0000)] 
Eliminate a superfluous sleep() call and check the pthread_cond_wait() return value

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

14 years agoMore thread tool regression test scheduler sensitivity fixes
Bart Van Assche [Wed, 27 Jul 2011 08:49:12 +0000 (08:49 +0000)] 
More thread tool regression test scheduler sensitivity fixes

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

14 years agoRename some local variables 'signal' to 'zignal' since gcc complains they
Julian Seward [Tue, 26 Jul 2011 23:29:25 +0000 (23:29 +0000)] 
Rename some local variables 'signal' to 'zignal' since gcc complains they
shadow global function signal() on OSX 10.6.

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

14 years agoUn-break the build on OSX following r11910.
Julian Seward [Tue, 26 Jul 2011 23:02:10 +0000 (23:02 +0000)] 
Un-break the build on OSX following r11910.

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

14 years agodrd/Linux: eliminate busy waiting when starting a thread
Bart Van Assche [Tue, 26 Jul 2011 19:30:28 +0000 (19:30 +0000)] 
drd/Linux: eliminate busy waiting when starting a thread

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

14 years agodrd: Add a suppression pattern
Bart Van Assche [Tue, 26 Jul 2011 19:29:23 +0000 (19:29 +0000)] 
drd: Add a suppression pattern

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

14 years agodrd/tests/atomic_var: Reduce scheduler sensitivity
Bart Van Assche [Tue, 26 Jul 2011 19:28:52 +0000 (19:28 +0000)] 
drd/tests/atomic_var: Reduce scheduler sensitivity

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

14 years agoDisable drd/tests/tc19_shadowmem because too scheduler sensitive
Bart Van Assche [Tue, 26 Jul 2011 19:28:31 +0000 (19:28 +0000)] 
Disable drd/tests/tc19_shadowmem because too scheduler sensitive

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

14 years agohelgrind/tests/tc08_hbl2: Reduce scheduler sensitivity
Bart Van Assche [Tue, 26 Jul 2011 19:27:29 +0000 (19:27 +0000)] 
helgrind/tests/tc08_hbl2: Reduce scheduler sensitivity

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

14 years agoUnbreak lackey --detailed-counts=yes after r11604
Josef Weidendorfer [Tue, 26 Jul 2011 18:10:35 +0000 (18:10 +0000)] 
Unbreak lackey --detailed-counts=yes after r11604

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

14 years agoUpdate Subversion ignore list
Bart Van Assche [Mon, 25 Jul 2011 08:46:56 +0000 (08:46 +0000)] 
Update Subversion ignore list

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

14 years agovalgrind.h: Remove a superfluous cast. See also #278454.
Bart Van Assche [Mon, 25 Jul 2011 08:45:45 +0000 (08:45 +0000)] 
valgrind.h: Remove a superfluous cast. See also #278454.

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

14 years agoThe cmpxchg16b tests in this need to have 16-aligned addresses;
Julian Seward [Sun, 24 Jul 2011 21:41:41 +0000 (21:41 +0000)] 
The cmpxchg16b tests in this need to have 16-aligned addresses;
make it so.  Else they die with segfaults on F15.

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

14 years agoAvoid excessive fragmentation in m_mallocfree facility by munmapping
Julian Seward [Sun, 24 Jul 2011 17:39:10 +0000 (17:39 +0000)] 
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

14 years agoAdd a new client request and pair of macros,
Julian Seward [Sun, 24 Jul 2011 16:02:33 +0000 (16:02 +0000)] 
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

14 years agoChange this file to be a symlink to the identical version
Julian Seward [Sun, 24 Jul 2011 14:35:58 +0000 (14:35 +0000)] 
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

14 years agoAdd support for IBM Power ISA 2.06 -- stage 2 (testcases).
Julian Seward [Sun, 24 Jul 2011 14:20:11 +0000 (14:20 +0000)] 
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

14 years agoAdd support for IBM Power ISA 2.06 -- stage 2 (handle new
Julian Seward [Sun, 24 Jul 2011 14:15:54 +0000 (14:15 +0000)] 
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

14 years agoAdd support for IBM Power ISA 2.06 -- stage 2. Bug 276784.
Julian Seward [Sun, 24 Jul 2011 14:13:21 +0000 (14:13 +0000)] 
Add support for IBM Power ISA 2.06 -- stage 2.  Bug 276784.
(Maynard Johnson, maynardj@us.ibm.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2184

14 years agoComparing a boolean value for != 0 yields a result that is identical
Florian Krohm [Sat, 23 Jul 2011 00:23:02 +0000 (00:23 +0000)] 
Comparing a boolean value for != 0 yields a result that is identical
to the value being compared. So we can simplify e.g

   CmpNE32( 1Uto32(CmpEQ64(p,q)), 0 )   -->   CmpEQ64(p,q).

And likewise for CmpNEZ operations.
This revision adds tree patterns to optimise some of those
comparisons.

This is particularly beneficial for s390x where moving the
condition code into a GPR is an expensive operation. With this
optimisation an up to 8% reduction in generated code was observed.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2183

14 years agoRemove a redundant assert. Minor code tweaks.
Florian Krohm [Fri, 22 Jul 2011 02:12:28 +0000 (02:12 +0000)] 
Remove a redundant assert. Minor code tweaks.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2182

14 years agoNeon loads/stores: rename some vars, plus the main function, and add
Julian Seward [Thu, 21 Jul 2011 22:45:42 +0000 (22:45 +0000)] 
Neon loads/stores: rename some vars, plus the main function, and add
comments.  Non-functional change.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2181

14 years agoUpdate ugly Callgrind hack for supporting instrumentation modes
Josef Weidendorfer [Thu, 21 Jul 2011 20:24:54 +0000 (20:24 +0000)] 
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

14 years agocallgrind_control: fix parsing of vgdb -l
Josef Weidendorfer [Thu, 21 Jul 2011 18:58:37 +0000 (18:58 +0000)] 
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

14 years agoAdd algebraic simplification as follows:
Florian Krohm [Thu, 21 Jul 2011 16:21:58 +0000 (16:21 +0000)] 
Add algebraic simplification as follows:
  Add64(0,x) ==> x
  Add32(0,x) ==> x
  Sub64(x,0) ==> x

Add helper functions: isZeroU32 and isZeroU64.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2180

14 years agoDWARF comparisons should be signed. Patch from Jakub Jelinek.
Tom Hughes [Thu, 21 Jul 2011 15:07:26 +0000 (15:07 +0000)] 
DWARF comparisons should be signed. Patch from Jakub Jelinek.

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

14 years agoAdd support for Thumb2 encodings of PLD and PLDW. Bug 277653.
Julian Seward [Thu, 21 Jul 2011 06:17:21 +0000 (06:17 +0000)] 
Add support for Thumb2 encodings of PLD and PLDW.  Bug 277653.
(Mans Rullgard, mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2179

14 years agoAdd test cases for bug 277780. (fix for VMOV.F32).
Julian Seward [Tue, 19 Jul 2011 15:49:55 +0000 (15:49 +0000)] 
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

14 years agoMake VMOV.F32 load the correct value into the destination register.
Julian Seward [Tue, 19 Jul 2011 15:48:29 +0000 (15:48 +0000)] 
Make VMOV.F32 load the correct value into the destination register.
Bug 277780.  (Mans Rullgard, mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2178

14 years agoFix BLX r14 in ARM mode, which was broken due to incorrect sequencing
Julian Seward [Tue, 19 Jul 2011 08:20:24 +0000 (08:20 +0000)] 
Fix BLX r14 in ARM mode, which was broken due to incorrect sequencing
of guest r14 reading vs writing.  Thumb mode does not have the same
problem.  Bug 277694.  (Mans Rullgard, mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2177

14 years agoFix regtest: the delta value printed by the VSTn with register
Julian Seward [Tue, 19 Jul 2011 08:10:38 +0000 (08:10 +0000)] 
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

14 years agoAdd test cases for NEON VMUL by float scalar.
Julian Seward [Tue, 19 Jul 2011 07:39:18 +0000 (07:39 +0000)] 
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

14 years agoFix NEON VMUL by float scalar. Bug 277663.
Julian Seward [Tue, 19 Jul 2011 07:37:03 +0000 (07:37 +0000)] 
Fix NEON VMUL by float scalar.  Bug 277663.
(Mans Rullgard, mans@mansr.com)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2176

14 years agoUpdate list of files to be ignored by svn.
Florian Krohm [Mon, 18 Jul 2011 20:32:20 +0000 (20:32 +0000)] 
Update list of files to be ignored by svn.

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

14 years agoUpdate a FIXME. Should have been included in r2174
Florian Krohm [Sun, 17 Jul 2011 14:16:41 +0000 (14:16 +0000)] 
Update a FIXME. Should have been included in r2174

git-svn-id: svn://svn.valgrind.org/vex/trunk@2175

14 years agoVEX-side changes to enable chasing of unconditional jumps/calls
Florian Krohm [Sat, 16 Jul 2011 02:11:50 +0000 (02:11 +0000)] 
VEX-side changes to enable chasing of unconditional jumps/calls
for s390x.  See also valgrind r11899.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2174

14 years agoEnable chasing of unconditional jumps/calls for s390x.
Florian Krohm [Sat, 16 Jul 2011 02:09:36 +0000 (02:09 +0000)] 
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

14 years agodrd/tests/annotate_smart_pointer2: Filter out offset
Bart Van Assche [Wed, 13 Jul 2011 16:46:18 +0000 (16:46 +0000)] 
drd/tests/annotate_smart_pointer2: Filter out offset

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

14 years agoAdd gdb.pic to the Subversion ignore list
Bart Van Assche [Wed, 13 Jul 2011 10:45:02 +0000 (10:45 +0000)] 
Add gdb.pic to the Subversion ignore list

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

14 years agodrd: add a test that verifies that a race is reported for the annotate_smart_pointer...
Bart Van Assche [Wed, 13 Jul 2011 10:43:49 +0000 (10:43 +0000)] 
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

14 years agodrd/tests/annotate_smart_pointer: remove a superfluous initialization
Bart Van Assche [Wed, 13 Jul 2011 10:43:05 +0000 (10:43 +0000)] 
drd/tests/annotate_smart_pointer: remove a superfluous initialization

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

14 years agoCast llseek argument to avoid warning.
Tom Hughes [Wed, 13 Jul 2011 10:05:24 +0000 (10:05 +0000)] 
Cast llseek argument to avoid warning.

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

14 years agoAllow core dumps on 32 bit architectures to go over 2Gb in size. BZ#277610.
Tom Hughes [Wed, 13 Jul 2011 09:02:14 +0000 (09:02 +0000)] 
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

14 years agoMake the location for temporary files configurable at runtime.
Florian Krohm [Tue, 12 Jul 2011 19:07:05 +0000 (19:07 +0000)] 
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

14 years agoReinstate inclusion of signal.h, removed in r11886.
Julian Seward [Tue, 12 Jul 2011 17:41:50 +0000 (17:41 +0000)] 
Reinstate inclusion of signal.h, removed in r11886.

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

14 years agoReinstate inclusion of unistd.h, removed in r11886.
Julian Seward [Tue, 12 Jul 2011 17:28:39 +0000 (17:28 +0000)] 
Reinstate inclusion of unistd.h, removed in r11886.

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

14 years agoUn-break the build on most platforms following r11888. Oops.
Julian Seward [Tue, 12 Jul 2011 13:50:59 +0000 (13:50 +0000)] 
Un-break the build on most platforms following r11888.  Oops.

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

14 years agoAdd a file containing information on how to cross-compile for Android.
Julian Seward [Tue, 12 Jul 2011 13:34:31 +0000 (13:34 +0000)] 
Add a file containing information on how to cross-compile for Android.

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

14 years agoFix up preload code so that on Android it doesn't try to call anything
Julian Seward [Tue, 12 Jul 2011 13:33:00 +0000 (13:33 +0000)] 
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

14 years agoFix Linux build breakage caused by header rearrangement in r11885, sigh.
Julian Seward [Tue, 12 Jul 2011 11:59:11 +0000 (11:59 +0000)] 
Fix Linux build breakage caused by header rearrangement in r11885, sigh.

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

14 years agoBuild system fixes so as to temporarily disable the GDBserver on
Julian Seward [Tue, 12 Jul 2011 11:46:24 +0000 (11:46 +0000)] 
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

14 years agoConditionalise code that uses some ELF constants that Android doesn't
Julian Seward [Tue, 12 Jul 2011 10:59:27 +0000 (10:59 +0000)] 
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

14 years agoDisable stabs reading on Android; it's uncompilable, and there's no
Julian Seward [Tue, 12 Jul 2011 07:27:23 +0000 (07:27 +0000)] 
Disable stabs reading on Android; it's uncompilable, and there's no
point.

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

14 years agoMake this compilable on Android.
Julian Seward [Tue, 12 Jul 2011 07:14:47 +0000 (07:14 +0000)] 
Make this compilable on Android.

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

14 years agoAllow selection of an alternative location for temporary files at
Julian Seward [Tue, 12 Jul 2011 06:58:55 +0000 (06:58 +0000)] 
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

14 years agoDuh, do r11879 correctly (Android doesn't have an auxv entry called
Julian Seward [Tue, 12 Jul 2011 06:29:00 +0000 (06:29 +0000)] 
Duh, do r11879 correctly (Android doesn't have an auxv entry called
AT_FPUCW.)

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

14 years agoAndroid doesn't have an auxv entry called AT_FPUCW.
Julian Seward [Tue, 12 Jul 2011 06:26:04 +0000 (06:26 +0000)] 
Android doesn't have an auxv entry called AT_FPUCW.

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

14 years agoIgnore ELF phdrs that have a p_memsz of zero, as appears to happen
Julian Seward [Tue, 12 Jul 2011 06:24:23 +0000 (06:24 +0000)] 
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

14 years ago/bin/sh lives at /system/bin/sh on Android.
Julian Seward [Tue, 12 Jul 2011 06:19:05 +0000 (06:19 +0000)] 
/bin/sh lives at /system/bin/sh on Android.

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

14 years agoStop gcc on Android giving bogus function-has-no-return-value warnings.
Julian Seward [Tue, 12 Jul 2011 06:13:08 +0000 (06:13 +0000)] 
Stop gcc on Android giving bogus function-has-no-return-value warnings.

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

14 years agoThe pthread.h on Android has no definition for pthread_rwlock_t, which
Julian Seward [Mon, 11 Jul 2011 22:11:58 +0000 (22:11 +0000)] 
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

14 years agoPass platform-variant tags (-DVGPV_blah_blah_blah) to regtest
Julian Seward [Mon, 11 Jul 2011 22:10:14 +0000 (22:10 +0000)] 
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

14 years agoAdd a suppression file for Android's libc (bionic).
Julian Seward [Mon, 11 Jul 2011 20:52:10 +0000 (20:52 +0000)] 
Add a suppression file for Android's libc (bionic).

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

14 years agoIntroduce the concept of platform variants. These allow further
Julian Seward [Mon, 11 Jul 2011 20:42:34 +0000 (20:42 +0000)] 
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

14 years agoHandle sigaction, sigsuspend, sigprocmask on arm-linux; comment-only
Julian Seward [Mon, 11 Jul 2011 18:23:09 +0000 (18:23 +0000)] 
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

14 years agoRemove identical copies of convert_sigset_to_rt, PRE(sys_sigaction)
Julian Seward [Mon, 11 Jul 2011 17:48:24 +0000 (17:48 +0000)] 
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

14 years agodrd/tests/matinv: Add missing return statement in an error path.
Bart Van Assche [Mon, 11 Jul 2011 16:25:37 +0000 (16:25 +0000)] 
drd/tests/matinv: Add missing return statement in an error path.

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

14 years agoRemove a commented-out copy of the sys_sigaction wrappers
Julian Seward [Mon, 11 Jul 2011 16:07:01 +0000 (16:07 +0000)] 
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

14 years agoTighten up an instruction decoding exception for
Julian Seward [Mon, 11 Jul 2011 15:49:39 +0000 (15:49 +0000)] 
Tighten up an instruction decoding exception for
add.w reg, sp, #constT.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2173

14 years agoPort callgrind_control to vgdb
Josef Weidendorfer [Mon, 11 Jul 2011 14:46:44 +0000 (14:46 +0000)] 
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

14 years agocallgrind: add vgdb commands needed for porting callgrind_control
Josef Weidendorfer [Mon, 11 Jul 2011 14:46:41 +0000 (14:46 +0000)] 
callgrind: add vgdb commands needed for porting callgrind_control

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

14 years agoAdd / fix up test cases for {LD,ST}REX{,B,H,D} on ARM. Works for both
Julian Seward [Mon, 11 Jul 2011 11:46:52 +0000 (11:46 +0000)] 
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

14 years agoComplete the implementation of ARM atomic ops: {LD,ST}REX{,B,H,D} in
Julian Seward [Mon, 11 Jul 2011 11:43:38 +0000 (11:43 +0000)] 
Complete the implementation of ARM atomic ops: {LD,ST}REX{,B,H,D} in
both ARM and Thumb encodings, for NEON and non-NEON capable backends.
Bug 266035 comments 4, 43, 51.  Derived from patches by Jeff Brown
<jeffbrown@google.com>, Igor Saenko <igor.saenko@gmail.com> and
Dr. David Alan Gilbert <david.gilbert@linaro.org>.

git-svn-id: svn://svn.valgrind.org/vex/trunk@2172

14 years agoValgrind-side changes to fix bug #271776.
Florian Krohm [Mon, 11 Jul 2011 01:51:39 +0000 (01:51 +0000)] 
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

14 years agoSupport the STFLE instruction via a dirty helper.
Florian Krohm [Mon, 11 Jul 2011 01:48:02 +0000 (01:48 +0000)] 
Support the STFLE instruction via a dirty helper.
VEX-side changes to fix bug #271776.
Patch provided by Divya Vyas <divyvyas@linux.vnet.ibm.com>

git-svn-id: svn://svn.valgrind.org/vex/trunk@2171

14 years agoAdd regression tests for {ADD,SUB}W reg, reg, #uimm12 (vex r2170)
Julian Seward [Fri, 8 Jul 2011 15:46:33 +0000 (15:46 +0000)] 
Add regression tests for {ADD,SUB}W reg, reg, #uimm12 (vex r2170)

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

14 years agoAdd support for Thumb ADDW reg, reg, #uimm12 and SUBW ditto. Bug
Julian Seward [Fri, 8 Jul 2011 15:36:59 +0000 (15:36 +0000)] 
Add support for Thumb ADDW reg, reg, #uimm12 and SUBW ditto.  Bug
266035 comments 7 and 8.  (Jeff Brown, jeffbrown@google.com and Kenny
Root.)

git-svn-id: svn://svn.valgrind.org/vex/trunk@2170

14 years agoAllow optional specification of cpu models on the command line
Florian Krohm [Thu, 7 Jul 2011 22:09:41 +0000 (22:09 +0000)] 
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

14 years agoPipe CFLAGS through to the compile run for genoffsets.c, which is a
Julian Seward [Thu, 7 Jul 2011 14:05:39 +0000 (14:05 +0000)] 
Pipe CFLAGS through to the compile run for genoffsets.c, which is a
bit special.  CFLAGS is already piped through to everywhere else.
This is needed for working with semi-broken cross-compile setups that
need CFLAGS set to special values in order to work.

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