valgrind:mainlinemirror.git
13 years agoThis commit was manufactured by cvs2svn to create tag VALGRIND_PRE_VKI_CHANGES
(no author) [Sun, 31 Oct 2004 11:31:16 +0000 (11:31 +0000)]
This commit was manufactured by cvs2svn to create tag
'VALGRIND_PRE_VKI_CHANGES'.

git-svn-id: svn://svn.valgrind.org/valgrind/tags/VALGRIND_PRE_VKI_CHANGES@2883 a5019735-40e9-0310-863c-91ae7b9d1cf9

13 years agoAdd some alternate test results for glibc 2.2.5 systems.
thughes [Sun, 31 Oct 2004 11:31:16 +0000 (11:31 +0000)]
Add some alternate test results for glibc 2.2.5 systems.

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

13 years agoAdded some extra data race suppressions for glibc 2.3.2.
thughes [Sun, 31 Oct 2004 10:18:23 +0000 (10:18 +0000)]
Added some extra data race suppressions for glibc 2.3.2.

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

13 years agoAdd some more data race suppressions for glibc 2.2.5.
thughes [Sun, 31 Oct 2004 10:13:18 +0000 (10:13 +0000)]
Add some more data race suppressions for glibc 2.2.5.

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

13 years agoSuppress data race in glibc 2.2.4.
thughes [Sat, 30 Oct 2004 20:39:10 +0000 (20:39 +0000)]
Suppress data race in glibc 2.2.4.

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

13 years agoImplement pthread_condattr_setpshared and pthread_condattr_getpshared.
thughes [Fri, 29 Oct 2004 18:22:38 +0000 (18:22 +0000)]
Implement pthread_condattr_setpshared and pthread_condattr_getpshared.

BUG: 92264

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

13 years agoAdd AM_PROG_CC_C_O to configure.in to check for cc -c -o support as this
thughes [Fri, 29 Oct 2004 18:02:13 +0000 (18:02 +0000)]
Add AM_PROG_CC_C_O to configure.in to check for cc -c -o support as this
is needed for some of the constructs we now use in the Makefile's.

BUG: 92331

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

13 years agowhoops
nethercote [Fri, 29 Oct 2004 13:17:36 +0000 (13:17 +0000)]
whoops

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

13 years agoFix typo that meant --signal-polltime was not being accepted.
nethercote [Fri, 29 Oct 2004 11:17:21 +0000 (11:17 +0000)]
Fix typo that meant --signal-polltime was not being accepted.

MERGE TO STABLE

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

13 years agoWhen a thread is cancelled only abort pending system calls if
thughes [Thu, 28 Oct 2004 15:56:55 +0000 (15:56 +0000)]
When a thread is cancelled only abort pending system calls if
the thread is set for asynchronous cancellation and cancellation
is enabled. This fixes a long standing occasional failure in
the pth_cancel2 test.

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

13 years agoUpdate expected output for pth_once in memcheck tests.
thughes [Thu, 28 Oct 2004 13:52:51 +0000 (13:52 +0000)]
Update expected output for pth_once in memcheck tests.

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

13 years agoAdd -fno-omit-frame-pointer when building libpthread.so as that gets
thughes [Thu, 28 Oct 2004 13:47:14 +0000 (13:47 +0000)]
Add -fno-omit-frame-pointer when building libpthread.so as that gets
loaded into the user's program and we want to be able to trace the
stack properly. Also add -fpic given that the code is going into a
shared library.

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

13 years agoRemove the thread numbers from the messages output by pth_once so that
thughes [Thu, 28 Oct 2004 13:39:52 +0000 (13:39 +0000)]
Remove the thread numbers from the messages output by pth_once so that
the order the threads run in doesn't affect the output.

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

13 years agoFixed get_height to ensure that SK_MAXHEIGHT-1 is the maximum level we
thughes [Thu, 28 Oct 2004 08:09:05 +0000 (08:09 +0000)]
Fixed get_height to ensure that SK_MAXHEIGHT-1 is the maximum level we
will allocate for a skip list entry as many routines use arrays of
size SK_MAXHEIGHT to hold a set of level pointers which means that a
level of SK_MAXHEIGHT is not valid due to C arrays being zero based.

This led to a number of subtle and hard to locate problems caused by
stack based arrays being overflowed by one entry when a node was
allocated with the maximum level. As each node only has a one in two
million or so chance of getting a level of SK_MAXHEIGHT this didn't
actually happen all that often.

BUG: 91028

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

13 years agoMake exec-sigmask more robust.
nethercote [Wed, 27 Oct 2004 14:06:56 +0000 (14:06 +0000)]
Make exec-sigmask more robust.

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

13 years agoJump through a hoop to make vgtest_ume work again on PIE-supporting systems.
nethercote [Wed, 27 Oct 2004 12:05:59 +0000 (12:05 +0000)]
Jump through a hoop to make vgtest_ume work again on PIE-supporting systems.

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

13 years agowhitespace change only
nethercote [Wed, 27 Oct 2004 12:05:38 +0000 (12:05 +0000)]
whitespace change only

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

13 years agoFix bad undefined value error, thanks to Tom.
nethercote [Tue, 26 Oct 2004 17:03:54 +0000 (17:03 +0000)]
Fix bad undefined value error, thanks to Tom.

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

13 years agoMake as_shm less brittle.
nethercote [Tue, 26 Oct 2004 16:31:19 +0000 (16:31 +0000)]
Make as_shm less brittle.

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

13 years agoTweak as_mmap for the possibility of a PIE-supporting system with a 4GB user
nethercote [Tue, 26 Oct 2004 16:30:01 +0000 (16:30 +0000)]
Tweak as_mmap for the possibility of a PIE-supporting system with a 4GB user
space.

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

13 years agoLeave frame pointers in for the code in lib_replace_malloc.a as
thughes [Tue, 26 Oct 2004 15:55:46 +0000 (15:55 +0000)]
Leave frame pointers in for the code in lib_replace_malloc.a as
valgrind likes to be able to trace the stack out of malloc etc.

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

13 years agowhoops, unbreak build
nethercote [Tue, 26 Oct 2004 15:04:39 +0000 (15:04 +0000)]
whoops, unbreak build

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

13 years ago64-bit cleanness tweaks.
nethercote [Tue, 26 Oct 2004 13:37:48 +0000 (13:37 +0000)]
64-bit cleanness tweaks.

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

13 years agoCode formatting improvement.
nethercote [Tue, 26 Oct 2004 13:32:11 +0000 (13:32 +0000)]
Code formatting improvement.

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

13 years agoCode formatting changes only.
nethercote [Tue, 26 Oct 2004 13:00:12 +0000 (13:00 +0000)]
Code formatting changes only.

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

13 years agoComment cleanups only.
nethercote [Tue, 26 Oct 2004 12:56:58 +0000 (12:56 +0000)]
Comment cleanups only.

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

13 years ago64-bit cleanness tweaks.
nethercote [Tue, 26 Oct 2004 11:44:46 +0000 (11:44 +0000)]
64-bit cleanness tweaks.

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

13 years agocomment wibble
nethercote [Tue, 26 Oct 2004 11:24:29 +0000 (11:24 +0000)]
comment wibble

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

13 years agoArch-abstraction:
nethercote [Tue, 26 Oct 2004 11:18:32 +0000 (11:18 +0000)]
Arch-abstraction:
- move some asm things into x86/
- also added a check at the start of init_tt_tc() to make sure that
  VG_CODE_OFFSET is correct.

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

13 years ago64-bit cleanness tweaks.
nethercote [Tue, 26 Oct 2004 10:57:24 +0000 (10:57 +0000)]
64-bit cleanness tweaks.

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

13 years agoComment fix only
nethercote [Tue, 26 Oct 2004 10:19:30 +0000 (10:19 +0000)]
Comment fix only

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

13 years agoArch-abstraction:
nethercote [Tue, 26 Oct 2004 09:59:49 +0000 (09:59 +0000)]
Arch-abstraction:
- removed some x86-specific var/function names

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

13 years agoArch-abstraction:
nethercote [Mon, 25 Oct 2004 20:44:09 +0000 (20:44 +0000)]
Arch-abstraction:
- use less x86-specific var names

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

13 years agocomment wibbles
nethercote [Mon, 25 Oct 2004 20:43:14 +0000 (20:43 +0000)]
comment wibbles

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

13 years agocomment wibbles
nethercote [Mon, 25 Oct 2004 20:21:47 +0000 (20:21 +0000)]
comment wibbles

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

13 years agoAvoid strange warnings about dereferencing type-punned pointers that occurs
nethercote [Mon, 25 Oct 2004 19:46:07 +0000 (19:46 +0000)]
Avoid strange warnings about dereferencing type-punned pointers that occurs
with GCC 3.3+.

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

13 years agotweak
nethercote [Mon, 25 Oct 2004 19:33:26 +0000 (19:33 +0000)]
tweak

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

13 years agoArch-abstraction:
nethercote [Mon, 25 Oct 2004 19:20:14 +0000 (19:20 +0000)]
Arch-abstraction:
- factor out varying ASM flags

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

13 years agoRevert last commit because stupid older versions (eg. 1.6.3) of automake can't
nethercote [Mon, 25 Oct 2004 19:13:41 +0000 (19:13 +0000)]
Revert last commit because stupid older versions (eg. 1.6.3) of automake can't
handle it.  Pah.

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

13 years agoFix up stage2's dependencies.
nethercote [Mon, 25 Oct 2004 17:59:43 +0000 (17:59 +0000)]
Fix up stage2's dependencies.

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

13 years agowhoops
nethercote [Mon, 25 Oct 2004 17:28:26 +0000 (17:28 +0000)]
whoops

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

13 years agoIf PIE (position-independent executables) are supported, build valgrind's
nethercote [Mon, 25 Oct 2004 17:18:24 +0000 (17:18 +0000)]
If PIE (position-independent executables) are supported, build valgrind's
stage2 as one.  This means that we're not hard-wiring stage2 in at 0xb0000000,
which means our memory layout is a bit more flexible, yay.

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

13 years agoActually call VGA_(has_tls) rather than just testing the function
thughes [Mon, 25 Oct 2004 16:59:46 +0000 (16:59 +0000)]
Actually call VGA_(has_tls) rather than just testing the function
address - this replaces Nick's replacing of the has_tls call with
an inline version.

BUG: 91844

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

13 years agoRename two params named 'syscall' as 'syscallname' to avoid clashes with a new
nethercote [Mon, 25 Oct 2004 15:43:21 +0000 (15:43 +0000)]
Rename two params named 'syscall' as 'syscallname' to avoid clashes with a new
name in recent headers.

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

13 years agoDon't bother with -fomit-frame-pointer for the demangler.
nethercote [Mon, 25 Oct 2004 15:32:09 +0000 (15:32 +0000)]
Don't bother with -fomit-frame-pointer for the demangler.

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

13 years agoArch-abstraction:
nethercote [Mon, 25 Oct 2004 15:21:00 +0000 (15:21 +0000)]
Arch-abstraction:
- factor out different CFLAGS in Makefiles

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

13 years agoArch-abstraction:
nethercote [Mon, 25 Oct 2004 14:05:56 +0000 (14:05 +0000)]
Arch-abstraction:
- factor out KICKSTART_BASE

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

13 years agoFix for 91844...
nethercote [Mon, 25 Oct 2004 11:25:22 +0000 (11:25 +0000)]
Fix for 91844...

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

13 years agoFix "make check" for when src_dir != build_dir
nethercote [Thu, 21 Oct 2004 14:07:58 +0000 (14:07 +0000)]
Fix "make check" for when src_dir != build_dir

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

13 years agoBuild vg_replace_malloc.c into a library, because it makes the Makefiles a bit
nethercote [Wed, 20 Oct 2004 18:40:40 +0000 (18:40 +0000)]
Build vg_replace_malloc.c into a library, because it makes the Makefiles a bit
neater.  Also remove some dodgy CFLAGS+= lines.

I had to change the expected output of pth_once.c, because the change has
altered the order of the (non-deterministic) output.

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

13 years agoFix typo, courtesy of Aleksander Salwa.
nethercote [Wed, 20 Oct 2004 14:22:58 +0000 (14:22 +0000)]
Fix typo, courtesy of Aleksander Salwa.

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

13 years agoMake tests that cause coredumps remove them. Don't need the core entries in
nethercote [Wed, 20 Oct 2004 13:33:07 +0000 (13:33 +0000)]
Make tests that cause coredumps remove them.  Don't need the core entries in
.cvsignore any more as a result.

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 13:21:54 +0000 (13:21 +0000)]
Arch-abstraction:
- conditionally compile x86-specific line within yield.c.

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

13 years agowhoops
nethercote [Wed, 20 Oct 2004 13:02:21 +0000 (13:02 +0000)]
whoops

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 12:36:47 +0000 (12:36 +0000)]
Arch-abstraction:
- Factor out remaining x86-specific regtests in none/ into an x86/ subdir.

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

13 years agoWhen nuking threads we set their status to VgTs_Empty. This patch
thughes [Wed, 20 Oct 2004 12:25:59 +0000 (12:25 +0000)]
When nuking threads we set their status to VgTs_Empty. This patch
ensures that any associated mutex and conditional variable pointers
are also cleared so that the thread state appears sane.

BUG: 91599

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 11:43:01 +0000 (11:43 +0000)]
Arch-abstraction:
- move remaining x86-specific Memcheck tests into an x86/ subdir.

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 11:05:34 +0000 (11:05 +0000)]
Arch-abstraction:
- Abstractify one remaining mention of the stack pointer.

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 10:58:09 +0000 (10:58 +0000)]
Arch-abstraction:
- Make Helgrind totally arch-agnostic.

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

13 years agoArch-abstraction:
nethercote [Wed, 20 Oct 2004 10:37:00 +0000 (10:37 +0000)]
Arch-abstraction:
- Make Lackey talk about "machine instructions" rather than "x86 instructions".

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

13 years agoas_shm wasn't being included in 'make dist'.
nethercote [Tue, 19 Oct 2004 19:39:59 +0000 (19:39 +0000)]
as_shm wasn't being included in 'make dist'.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 19:39:39 +0000 (19:39 +0000)]
Arch-abstraction:
- final fix for insn_* test moving;  they now work correctly

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 19:12:21 +0000 (19:12 +0000)]
Arch-abstraction:
- Forgot to move the insn_*.def files when moving the insn_* tests.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 19:07:32 +0000 (19:07 +0000)]
Arch-abstraction:
- things I forgot to do when moving the insn_* tests...

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 18:54:11 +0000 (18:54 +0000)]
Arch-abstraction:
- Moved all the insn_* tests into x86/ subdirectories.  What are the chances of
  me getting this right on the first attempt?

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

13 years agoreadability fiddle
nethercote [Tue, 19 Oct 2004 17:54:02 +0000 (17:54 +0000)]
readability fiddle

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

13 years agoForgot to cvs remove this when I moved it to x86/.
nethercote [Tue, 19 Oct 2004 17:49:39 +0000 (17:49 +0000)]
Forgot to cvs remove this when I moved it to x86/.

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

13 years agoUpdate
nethercote [Tue, 19 Oct 2004 17:30:47 +0000 (17:30 +0000)]
Update

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

13 years agoWhoops, forgot this file.
nethercote [Tue, 19 Oct 2004 17:30:25 +0000 (17:30 +0000)]
Whoops, forgot this file.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 17:00:59 +0000 (17:00 +0000)]
Arch-abstraction:
- Move x86-specific regtests for Cachegrind into an x86/ subdir.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 16:56:41 +0000 (16:56 +0000)]
Arch-abstraction:
- Change regtest script to print a message if a test is skipped due to the cpu
  being of the wrong type.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 16:29:30 +0000 (16:29 +0000)]
Arch-abstraction:
- Rewrote tests/cputest.c so that it can apply to different kinds of
  processors.  The idea being that any arch-specific tests have a cpu_test:
  label in their .vgtest file, so they'll only get executed if the right
  machine is being used.
- Rewrote a bunch of .vgtest files accordingly.

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

13 years agoUse "ppc" rather than "powerpc" -- it's less typing.
nethercote [Tue, 19 Oct 2004 14:24:42 +0000 (14:24 +0000)]
Use "ppc" rather than "powerpc" -- it's less typing.

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

13 years agoWhoops, syscall.S is platform-specific, and so must go in x86-linux/ rather
nethercote [Tue, 19 Oct 2004 14:23:46 +0000 (14:23 +0000)]
Whoops, syscall.S is platform-specific, and so must go in x86-linux/ rather
than x86/.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 13:48:06 +0000 (13:48 +0000)]
Arch-abstraction:
- Moved all assembly files in coregrind/ into coregrind/x86/.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 13:18:00 +0000 (13:18 +0000)]
Arch-abstraction:
- Factored out the remaining arch-specific code from vg_libpthread.c.
- Also fixed up the build process for x86/libpthread.c, which was done
  wrongly in the previous commit.

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

13 years agoArch-abstraction:
nethercote [Tue, 19 Oct 2004 11:38:48 +0000 (11:38 +0000)]
Arch-abstraction:
- Started out x86-specific libpthread code; began with spinlocks.

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

13 years agoReally fix statically initialised read-write locks this time...
thughes [Mon, 18 Oct 2004 23:03:24 +0000 (23:03 +0000)]
Really fix statically initialised read-write locks this time...

BUG: 91604

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

13 years agoUse tgkill instead of tkill if it is available. This is the newer and
thughes [Mon, 18 Oct 2004 18:56:25 +0000 (18:56 +0000)]
Use tgkill instead of tkill if it is available. This is the newer and
safer kernel interface to signalling a particular thread and it ensures
you can only send a signal to one of your own threads.

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

13 years agoArch-abstraction: fix up valgrind.h for future inclusion of other
nethercote [Mon, 18 Oct 2004 18:07:49 +0000 (18:07 +0000)]
Arch-abstraction: fix up valgrind.h for future inclusion of other
architectures.  Had to recast it as valgrind.h.in;  now at configure time the
appropriate #define is set so that the appropriate snippet of assembly code is
chosen.  It's done this way rather than with x86/ etc. directories like the
rest of Valgrind, because this header file must stand alone for inclusion by
other programs.

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

13 years agoTweak type of VGA_(thread_syscall), and related variable name changes.
nethercote [Mon, 18 Oct 2004 17:41:36 +0000 (17:41 +0000)]
Tweak type of VGA_(thread_syscall), and related variable name changes.

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

13 years agoArch-abstraction:
nethercote [Mon, 18 Oct 2004 17:36:40 +0000 (17:36 +0000)]
Arch-abstraction:
- factor out the horrid thread_syscall() function, which is written in assembly
  code.

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

13 years agoBack-out accidental commit.
thughes [Mon, 18 Oct 2004 17:35:35 +0000 (17:35 +0000)]
Back-out accidental commit.

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

13 years agoMake statically initialised read-write locks work.
thughes [Mon, 18 Oct 2004 17:34:43 +0000 (17:34 +0000)]
Make statically initialised read-write locks work.

BUG: 91604

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

13 years agoArch-abstraction:
nethercote [Mon, 18 Oct 2004 17:00:30 +0000 (17:00 +0000)]
Arch-abstraction:
- factor out the setting of syscall results, which can be more complicated
  than just putting a value in the result register (eg. PPC has to fiddle with
  multiple registers).

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

13 years agoIncrease the size of M_VG_ERRTXT from 512B to 4KB, increasing the size of C++
nethercote [Mon, 18 Oct 2004 15:47:18 +0000 (15:47 +0000)]
Increase the size of M_VG_ERRTXT from 512B to 4KB, increasing the size of C++
names that can be demangled.

MERGE TO STABLE

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

13 years agoArch-abstraction:
nethercote [Mon, 18 Oct 2004 15:34:14 +0000 (15:34 +0000)]
Arch-abstraction:
- factor out code for restarting syscalls

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

13 years agoArch-abstraction:
nethercote [Mon, 18 Oct 2004 14:47:48 +0000 (14:47 +0000)]
Arch-abstraction:
- account for x86's strange argument passing (via memory) for mmap()

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

13 years agoArch-abstraction:
nethercote [Mon, 18 Oct 2004 14:08:16 +0000 (14:08 +0000)]
Arch-abstraction:
- just a couple more constants moved

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

13 years agoAdd a couple of lines that were missed out in the long timeouts patch.
thughes [Mon, 18 Oct 2004 12:11:23 +0000 (12:11 +0000)]
Add a couple of lines that were missed out in the long timeouts patch.

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

13 years agoArch-abstraction: a nice change that removes the need for ume_entry.S. Instead
nethercote [Mon, 18 Oct 2004 11:52:17 +0000 (11:52 +0000)]
Arch-abstraction: a nice change that removes the need for ume_entry.S.  Instead
of using an assembly hack to find the stack pointer at startup, we find it from
argv.  It's much simpler, avoids linking games, is platform independent, and
works on PPC.

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

13 years agoFix problems with very long timeouts given when waiting on a mutex or
thughes [Sun, 17 Oct 2004 15:18:22 +0000 (15:18 +0000)]
Fix problems with very long timeouts given when waiting on a mutex or
condition variable. The pthread routines now use a timeout of 0xfffffffe
if the user asks for something longer than that otherwise we will wrap
around and actually get a much shorter timeout.

The scheduler has also been changed so that it it now limits itself to
a timeout of 0x7fffffff when working how how long to poll for. This won't
affect how long a thread actually sleeps for as we'll just wind up waiting
a bit more on the next pass round the loop.

This fixes bug 76845.

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

13 years agoImplement pthread_mutex_timedlock. This resolves bug 78422.
thughes [Sun, 17 Oct 2004 15:00:20 +0000 (15:00 +0000)]
Implement pthread_mutex_timedlock. This resolves bug 78422.

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

13 years agoWhen returning from handling a signal check whether any mutex that the
thughes [Sat, 16 Oct 2004 16:50:14 +0000 (16:50 +0000)]
When returning from handling a signal check whether any mutex that the
thread was waiting on has been unlocked while the signal handler was
running and resume the thread if it was.

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

13 years agoIf a thread is waiting on a mutex or condition variable when a signal is
thughes [Sat, 16 Oct 2004 16:17:06 +0000 (16:17 +0000)]
If a thread is waiting on a mutex or condition variable when a signal is
delivered that the thread state is temporarily changed from WaitMX or WaitCV
to Running while the signal handler is running. The original state is then
restored when the handler returns.

This patch forces the associated_mx and associated_cv values to be cleared
at the same time and the original values restored afterwards. Without this
the scheduler state will not be considered sane while the handler is running.

This is based on a patch from Kenneth Schalk and fixes a problem he had
with posting to a semaphore in a signal handler. It also allows a couple
of assertions in the scheduler sanity check to be uncommented.

BUG: 72082

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

13 years agoRemove unnecessary glibc #includes; use VKI_O_RDONLY instead of O_RDONLY as
nethercote [Sat, 16 Oct 2004 15:31:49 +0000 (15:31 +0000)]
Remove unnecessary glibc #includes;  use VKI_O_RDONLY instead of O_RDONLY as
appropriate with VG_(open).

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

13 years agoRemove the limit on the number of pthread read/write locks. This works
thughes [Sat, 16 Oct 2004 14:49:53 +0000 (14:49 +0000)]
Remove the limit on the number of pthread read/write locks. This works
in a similar way to the previous patch that removed the limit on the
number of semaphores and fixes bug 86264.

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

13 years agoAdd a dummy implementation of pthread_attr_getinheritsched.
thughes [Sat, 16 Oct 2004 14:24:43 +0000 (14:24 +0000)]
Add a dummy implementation of pthread_attr_getinheritsched.

BUG: 79495

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

13 years agoSuppress .stderr.diff2 files as well as .stderr.diff files.
thughes [Sat, 16 Oct 2004 11:02:33 +0000 (11:02 +0000)]
Suppress .stderr.diff2 files as well as .stderr.diff files.

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

13 years agoWhen signal routing is in use (because we are running on an older kernel
thughes [Sat, 16 Oct 2004 10:59:49 +0000 (10:59 +0000)]
When signal routing is in use (because we are running on an older kernel
that doesn't route signals to the correct threads properly) the siginfo
data was not being propagated to any signal handlers installed by the
client program.

This is because the main thread routes the signal to the proxy LWP by
using the tkill system call but that then appears in the proxy as a user
initiated signal and the original siginfo data is lost.

This patch adds a small queue of siginfo data for pending sigals to
each thread's state so that when the proxy LWP passes the signal back
to the main thread the relevant siginfo data can be recovered and passed
on to any signal handlers. Thix fixes bug 91325.

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