]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
20 years agoFix incorrect info about using GDB on Valgrind. svn/VALGRIND_2_2_0_BRANCH
Nicholas Nethercote [Thu, 18 Nov 2004 18:35:02 +0000 (18:35 +0000)] 
Fix incorrect info about using GDB on Valgrind.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3047

20 years agoReplace magic number with proper constant.
Nicholas Nethercote [Thu, 18 Nov 2004 12:48:46 +0000 (12:48 +0000)] 
Replace magic number with proper constant.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3042

20 years agoChange VG_(nuke_all_threads) to disassociate the the stacks of the threads
Tom Hughes [Wed, 17 Nov 2004 00:02:04 +0000 (00:02 +0000)] 
Change VG_(nuke_all_threads) to disassociate the the stacks of the threads
being killed from the threads rather than marking them as inaccessible.

This should fix the problem with the environment (and other data from the
stacks of other threads) causing warnings after a fork. I believe that
VG_(nuke_all_threads) is only called in places where this is the behaviour
that we want or where it doesn't matter because we're about to exit anyway.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3033

20 years agoThe calculation used to round the size of a new thread's stack to a
Tom Hughes [Tue, 16 Nov 2004 19:44:06 +0000 (19:44 +0000)] 
The calculation used to round the size of a new thread's stack to a
multiple of the page size had an off by one error. Fixed it to use
the PGROUNDUP macro instead of trying to do the calculation itself
and then get it wrong.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3032

20 years agoThis commit was manufactured by cvs2svn to create branch
no author [Tue, 16 Nov 2004 19:40:05 +0000 (19:40 +0000)] 
This commit was manufactured by cvs2svn to create branch
'VALGRIND_2_2_0_BRANCH'.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3031

20 years agoFixed bug #93328, by using the right sized types in sigprocmask(), and
Nicholas Nethercote [Mon, 15 Nov 2004 19:07:14 +0000 (19:07 +0000)] 
Fixed bug #93328, by using the right sized types in sigprocmask(), and
converting them as necessary.

Fixed some compiler warnings by renaming two variables, too.

(partly) MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@3014

20 years agoDon't silently ignore any suppression contexts beyond the 4th -- instead abort
Nicholas Nethercote [Mon, 8 Nov 2004 13:31:29 +0000 (13:31 +0000)] 
Don't silently ignore any suppression contexts beyond the 4th -- instead abort
with a warning.  Addresses part of bug #77922.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2947

20 years agoFix some GNAT related stabs parsing problems.
Tom Hughes [Thu, 4 Nov 2004 13:24:33 +0000 (13:24 +0000)] 
Fix some GNAT related stabs parsing problems.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2913

20 years agoAdd support for the settimeofday system call.
Tom Hughes [Thu, 4 Nov 2004 13:20:15 +0000 (13:20 +0000)] 
Add support for the settimeofday system call.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2912

20 years agoMake sure we are using perl 5.6.0 as earlier versions won't work.
Tom Hughes [Tue, 2 Nov 2004 09:49:17 +0000 (09:49 +0000)] 
Make sure we are using perl 5.6.0 as earlier versions won't work.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2904

20 years agoUse -w instead of "use warnings" to enable warnings so that older
Tom Hughes [Tue, 2 Nov 2004 09:45:19 +0000 (09:45 +0000)] 
Use -w instead of "use warnings" to enable warnings so that older
versions of perl can handle the script.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2902

20 years agoMake sure source-location mapping entries of size zero are converted
Tom Hughes [Mon, 1 Nov 2004 17:37:08 +0000 (17:37 +0000)] 
Make sure source-location mapping entries of size zero are converted
to size one even if verbose more is off.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2895

20 years agoWhen a thread is cancelled only abort pending system calls if
Tom Hughes [Fri, 29 Oct 2004 18:36:17 +0000 (18:36 +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.

MERGE TO STABLE

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2878

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

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2874

20 years agoFix off-by-one error with VKI_GDT_TLS_MAX.
Nicholas Nethercote [Thu, 28 Oct 2004 16:53:51 +0000 (16:53 +0000)] 
Fix off-by-one error with VKI_GDT_TLS_MAX.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2872

20 years agoCope with arguments over 510 characters in length when writing the
Tom Hughes [Thu, 28 Oct 2004 08:18:54 +0000 (08:18 +0000)] 
Cope with arguments over 510 characters in length when writing the
cachegrind output file.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2867

20 years agoDon't free the interpreter structure until we've actually finished
Tom Hughes [Thu, 28 Oct 2004 08:17:57 +0000 (08:17 +0000)] 
Don't free the interpreter structure until we've actually finished
using it... Possible fix for bug 89663 spotted by Mike Cavins.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2866

20 years agoYet another attempt to quash the assertions in the pthread forwarding code.
Tom Hughes [Thu, 28 Oct 2004 08:16:38 +0000 (08:16 +0000)] 
Yet another attempt to quash the assertions in the pthread forwarding code.

It appears that the resolution of the address is to forward to is now
working properly but that on some systems the second part of the assertion
fails because the dynamic linker resolves the name of the function being
forwarded to the glibc version rather than the version in valgrind's pthread
library.

The solution is to use dlopen to explicitly obtain a handle to valgrind's
pthread library and then lookup the symbol with dlsym when doing the
comparison in the assertion.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2865

20 years agoThe fix for bug 85811 added decoding of many extra negative type
Tom Hughes [Thu, 28 Oct 2004 08:15:38 +0000 (08:15 +0000)] 
The fix for bug 85811 added decoding of many extra negative type
numbers in stabs and also removed the expectation of a trailing
semicolon after the type number as gcc didn't seem to be putting
one in. It seems that older gcc's do add one however, so we now
skip one if it is there.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2864

20 years agoFixed get_height to ensure that SK_MAXHEIGHT-1 is the maximum level we
Tom Hughes [Thu, 28 Oct 2004 08:09:53 +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.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2863

20 years agoWhen augmenting the argument vector from the VALGRIND_OPTS environment
Tom Hughes [Thu, 28 Oct 2004 07:56:44 +0000 (07:56 +0000)] 
When augmenting the argument vector from the VALGRIND_OPTS environment
variable and/or the .valgrindrc files, make sure that enough space is
allocated for all the old arguments, not just those that are arguments
to valgrind itself.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2861

20 years agoFix typo, courtesy of Aleksander Salwa.
Nicholas Nethercote [Wed, 20 Oct 2004 14:24:49 +0000 (14:24 +0000)] 
Fix typo, courtesy of Aleksander Salwa.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2824

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

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2788

20 years agoReplace glibc header with equivalent kernel header, which fixes a compile
Nicholas Nethercote [Thu, 14 Oct 2004 11:20:19 +0000 (11:20 +0000)] 
Replace glibc header with equivalent kernel header, which fixes a compile
problem seen by Sefer Tov.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2768

20 years agoAdd a new CPUID cache configuration for more recent Pentiums.
Nicholas Nethercote [Wed, 13 Oct 2004 11:31:25 +0000 (11:31 +0000)] 
Add a new CPUID cache configuration for more recent Pentiums.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2747

20 years agoFix for bug 91162: cope with jumps to bogus addresses when there is a SEGV
Nicholas Nethercote [Wed, 13 Oct 2004 09:58:53 +0000 (09:58 +0000)] 
Fix for bug 91162:  cope with jumps to bogus addresses when there is a SEGV
signal handler present -- previously, Valgrind would abort unnecessarily on
this case.

Added a regression test for it.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2745

20 years agoThis commit was manufactured by cvs2svn to create branch
no author [Wed, 13 Oct 2004 09:58:53 +0000 (09:58 +0000)] 
This commit was manufactured by cvs2svn to create branch
'VALGRIND_2_2_0_BRANCH'.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2744

20 years agoAdd README_DEVELOPERS to the 'make dist' tarball (since it's mentioned in
Nicholas Nethercote [Sat, 9 Oct 2004 16:00:58 +0000 (16:00 +0000)] 
Add README_DEVELOPERS to the 'make dist' tarball (since it's mentioned in
README), and add some instructions about attaching GDB to Valgrind itself
within it.

This fixes bug 90138.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2739

20 years agoImprove error message.
Nicholas Nethercote [Fri, 8 Oct 2004 14:02:57 +0000 (14:02 +0000)] 
Improve error message.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2737

20 years agoAll newlines are borked -- fix.
Nicholas Nethercote [Mon, 13 Sep 2004 20:51:10 +0000 (20:51 +0000)] 
All newlines are borked -- fix.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2718

20 years agoFix grammar
Nicholas Nethercote [Mon, 13 Sep 2004 11:18:52 +0000 (11:18 +0000)] 
Fix grammar

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2709

20 years agoFix minor off-by-one error.
Nicholas Nethercote [Sat, 11 Sep 2004 23:27:58 +0000 (23:27 +0000)] 
Fix minor off-by-one error.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2702

20 years agoTo get 32-bit programs working on Opteron, VG_(valgrind_end) was recently
Nicholas Nethercote [Fri, 10 Sep 2004 13:56:13 +0000 (13:56 +0000)] 
To get 32-bit programs working on Opteron, VG_(valgrind_end) was recently
changed to name the last byte in Valgrind's section, rather than one past the
last byte.  This was because the last byte is 0xffffffff, and so one past gave
0x0, which screwed things up.

However, when this change was made, all the places where VG_(valgrind_end) is
used weren't adjusted appropriately.  So this commit makes those adjustments.
It also renames the variable as VG_(valgrind_last), which makes the difference
between it and the other VG_(*_end) variables much clearer.

MERGED FROM HEAD

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2680

20 years agoThis commit was manufactured by cvs2svn to create branch
no author [Fri, 10 Sep 2004 13:56:13 +0000 (13:56 +0000)] 
This commit was manufactured by cvs2svn to create branch
'VALGRIND_2_2_0_BRANCH'.

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_2_2_0_BRANCH@2679

20 years ago--> 2.2.0
Julian Seward [Tue, 31 Aug 2004 00:15:19 +0000 (00:15 +0000)] 
--> 2.2.0

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

20 years agoversion -> 2.2.0
Julian Seward [Tue, 31 Aug 2004 00:15:02 +0000 (00:15 +0000)] 
version -> 2.2.0

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

20 years agoHopefully final changes for 2.2.0.
Julian Seward [Tue, 31 Aug 2004 00:14:02 +0000 (00:14 +0000)] 
Hopefully final changes for 2.2.0.

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

20 years agoAdd comments about limitations wrt self-modifying code.
Julian Seward [Tue, 31 Aug 2004 00:13:10 +0000 (00:13 +0000)] 
Add comments about limitations wrt self-modifying code.

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

20 years agoAdd vki_itimerspec definition for POSIX timer support.
Tom Hughes [Mon, 30 Aug 2004 20:31:35 +0000 (20:31 +0000)] 
Add vki_itimerspec definition for POSIX timer support.

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

20 years agoAdd support for POSIIX clocks and timers.
Tom Hughes [Mon, 30 Aug 2004 19:50:02 +0000 (19:50 +0000)] 
Add support for POSIIX clocks and timers.

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

20 years agoPrint a message if shadow memory cannot be allocated, rather than just
Nicholas Nethercote [Mon, 30 Aug 2004 19:36:42 +0000 (19:36 +0000)] 
Print a message if shadow memory cannot be allocated, rather than just
asserting.

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

20 years agoAvoid divisions by zero. This fixes bug 78765.
Nicholas Nethercote [Mon, 30 Aug 2004 19:15:12 +0000 (19:15 +0000)] 
Avoid divisions by zero.  This fixes bug 78765.

Also renamed two of the XPt fields so that things are clearer.

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

20 years agoTry to summarise 2.0.0 -> 2.2.0 changes.
Julian Seward [Mon, 30 Aug 2004 18:15:37 +0000 (18:15 +0000)] 
Try to summarise 2.0.0 -> 2.2.0 changes.

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

20 years agoDocument 2.1.2 -> 2.2.0 deltas (2.0.0 -> 2.2.0 not yet done)
Julian Seward [Mon, 30 Aug 2004 18:04:42 +0000 (18:04 +0000)] 
Document 2.1.2 -> 2.2.0 deltas (2.0.0 -> 2.2.0 not yet done)

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

20 years agoRecognise X.Org servers and treat them the same as XFree86 4.x servers. This
Tom Hughes [Mon, 30 Aug 2004 10:31:21 +0000 (10:31 +0000)] 
Recognise X.Org servers and treat them the same as XFree86 4.x servers. This
avoids warnings from configure about an unknown X server type on recent Linux
distributions that use X.Org instead of XFree86.

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

20 years agoSwitch to using the newer forms of AC_INIT and AM_INIT_AUTOMAKE so that
Tom Hughes [Sun, 29 Aug 2004 09:46:38 +0000 (09:46 +0000)] 
Switch to using the newer forms of AC_INIT and AM_INIT_AUTOMAKE so that
configure can print the package name correctly.

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

20 years agoWhen delivering SIGFPE make sure we patch up si_addr in any siginfo
Tom Hughes [Thu, 26 Aug 2004 23:09:26 +0000 (23:09 +0000)] 
When delivering SIGFPE make sure we patch up si_addr in any siginfo
structure to match the address of the instruction in the client program
which caused the fault.

CCMAIL: 88115-done@bugs.kde.org

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

20 years agoInclude the filename in the system call trace for the access syscall.
Tom Hughes [Thu, 26 Aug 2004 12:26:27 +0000 (12:26 +0000)] 
Include the filename in the system call trace for the access syscall.

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

20 years agoIf we return from a signal handler to a thread that was waiting to
Tom Hughes [Wed, 25 Aug 2004 18:58:04 +0000 (18:58 +0000)] 
If we return from a signal handler to a thread that was waiting to
rendezvous with another thread before the signal arrived then check
whether the rendezvous is now complete or we may deadlock.

CCMAIL: 77369-done@bugs.kde.org

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

20 years agoChange things so that stage2's location is controlled by a single variable.
Nicholas Nethercote [Wed, 25 Aug 2004 16:16:56 +0000 (16:16 +0000)] 
Change things so that stage2's location is controlled by a single variable.

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

20 years agoFix problem with brk(). Thanks to Paull Mackerras for the patch.
Nicholas Nethercote [Wed, 25 Aug 2004 13:43:44 +0000 (13:43 +0000)] 
Fix problem with brk().  Thanks to Paull Mackerras for the patch.
Added a regression test for it.

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

20 years agoRemove three unnecessary compile-time warnings.
Nicholas Nethercote [Wed, 25 Aug 2004 13:33:17 +0000 (13:33 +0000)] 
Remove three unnecessary compile-time warnings.

Two were trivial.  The one for strncmp is slightly trickier;  you have to be
careful with the signedness of chars when comparing them... but the code
already casts s1 and s2 to (unsigned char*) before comparing them, so it's not
a problem.

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

20 years agoRemoved comma at the end of an enumerator list - this is allowed
Tom Hughes [Wed, 25 Aug 2004 13:25:30 +0000 (13:25 +0000)] 
Removed comma at the end of an enumerator list - this is allowed
in C99 but not in C89 except as a GNU extension so it's probably
best not to rely on it.

Patch from Jeroen N. Witmond <jnw@xs4all.nl>.

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

20 years agoFix symlinking -- the old code worked, but worked for the wrong reason; the
Nicholas Nethercote [Wed, 25 Aug 2004 11:57:21 +0000 (11:57 +0000)] 
Fix symlinking -- the old code worked, but worked for the wrong reason;  the
bit before "$(subdir)" has to specify the path from .in_place/ to the root.
It just so happened that $(top_builddir) was the same for all directories at
the same level in the hierarchy as .in_place/ (ie. one deep).

(I haven't bothered changing it in all the tool Makefile.am files, because I'll
do that when I factor out all their common bits into a single file, be it
before or after 2.2.0 is released.)

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

20 years agoMinor fixups:
Nicholas Nethercote [Wed, 25 Aug 2004 11:50:46 +0000 (11:50 +0000)] 
Minor fixups:
- introduce $(inplacedir) like everywhere else
- valgrind.spec doesn't need to be included in "make dist", because it gets
  built from valgrind.spec.in at configure-time.

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

20 years agoPutting "dist_" in front of a "_DATA" variable means it is included in "make
Nicholas Nethercote [Wed, 25 Aug 2004 11:40:07 +0000 (11:40 +0000)] 
Putting "dist_" in front of a "_DATA" variable means it is included in "make
dist".  This avoids the need to put it in "EXTRA_DIST", and saves a few lines
in all the docs Makefile.am files.

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

20 years agoOnly check whether linux/mii.h can be processed so that we don't
Tom Hughes [Tue, 24 Aug 2004 23:09:07 +0000 (23:09 +0000)] 
Only check whether linux/mii.h can be processed so that we don't
generate ugly warnings by trying to compile it.

Patch from Eric Estievenart <eric.estievenart@free.fr>

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

20 years agoAdd a reassuring warnings about the linux/mii.h warning.
Nicholas Nethercote [Tue, 24 Aug 2004 14:38:53 +0000 (14:38 +0000)] 
Add a reassuring warnings about the linux/mii.h warning.

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

20 years agoUpdate for filename change.
Nicholas Nethercote [Tue, 24 Aug 2004 13:56:54 +0000 (13:56 +0000)] 
Update for filename change.

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

20 years agoThe size passed to VG_(st_mkfloat) should be in bytes, not bits.
Tom Hughes [Mon, 23 Aug 2004 23:18:57 +0000 (23:18 +0000)] 
The size passed to VG_(st_mkfloat) should be in bytes, not bits.

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

20 years agoAdded code to decode a number of additional negative type numbers
Tom Hughes [Mon, 23 Aug 2004 22:29:31 +0000 (22:29 +0000)] 
Added code to decode a number of additional negative type numbers
in STABS debug information based on the stabs specification at:

  http://sources.redhat.com/cygwin/stabs.html

CCMAIL: 85811-done@bugs.kde.org

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

20 years agoPrevent a memcpy of zero bytes from complaining if one or both of the
Tom Hughes [Mon, 23 Aug 2004 18:39:09 +0000 (18:39 +0000)] 
Prevent a memcpy of zero bytes from complaining if one or both of the
pointers given as arguments is uninitialised.

CCMAIL: 86989-done@bugs.kde.org

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

20 years agoAdd explanatory comment.
Robert Walsh [Mon, 23 Aug 2004 18:15:12 +0000 (18:15 +0000)] 
Add explanatory comment.

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

20 years agoFix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does
Robert Walsh [Mon, 23 Aug 2004 18:13:16 +0000 (18:13 +0000)] 
Fix to allow 32-bit Valgrind to run on AMD64 boxes.  Note: this does
NOT allow Valgrind to work with 64-bit executables - only with 32-bit
executables on an AMD64 box.

VG_(valgrind_end) now has a slightly different meaning to all the other
VG_(*_end) vars -- ie. it names the last byte, whereas the others go
one byte past the end.

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

20 years agoDon't version the sem_xxx symbols that have more than one version in
Tom Hughes [Mon, 23 Aug 2004 18:05:51 +0000 (18:05 +0000)] 
Don't version the sem_xxx symbols that have more than one version in
glibc - it doesn't matter for valgrind as we only have one version and
by not versioning them we work no matter what version is asked for.

CCMAIL: 86289-done@bugs.kde.org

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

20 years agoHere's a couple more I missed in the last commit.
Nicholas Nethercote [Mon, 23 Aug 2004 16:39:42 +0000 (16:39 +0000)] 
Here's a couple more I missed in the last commit.

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

20 years agoUse SYSNO and res, etc, instead of tst->m_eax in a few places to make things
Nicholas Nethercote [Mon, 23 Aug 2004 16:36:09 +0000 (16:36 +0000)] 
Use SYSNO and res, etc, instead of tst->m_eax in a few places to make things
less x86-specific.

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

20 years agoMakefile.am minor correction
Nicholas Nethercote [Mon, 23 Aug 2004 15:42:21 +0000 (15:42 +0000)] 
Makefile.am minor correction

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

20 years agoSmall step in factoring out arch-specific code: replace
Nicholas Nethercote [Mon, 23 Aug 2004 15:06:23 +0000 (15:06 +0000)] 
Small step in factoring out arch-specific code:  replace
__attribute((regparm(n))) with REGPARM(n) everywhere.  REGPARM() is defined in
vg_skin.h, but will eventually be defined separately for each arch.

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

20 years agoTweak configure.in in preparation for arch and OS ports -- we now have
Nicholas Nethercote [Mon, 23 Aug 2004 14:54:40 +0000 (14:54 +0000)] 
Tweak configure.in in preparation for arch and OS ports -- we now have
variables VG_ARCH, VG_OS and VG_PLATFORM (which equals ${VG_ARCH}-${VG_OS}).
Also added a check for the platform (arch/OS) combination.

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

20 years agoRemoving the example tool 'example' -- it's almost identical to Nulgrind,
Nicholas Nethercote [Mon, 23 Aug 2004 14:15:29 +0000 (14:15 +0000)] 
Removing the example tool 'example' -- it's almost identical to Nulgrind,
except it doesn't actually get built and so ex_main.c and the Makefile.am tend
to get out of date.  Changed the docs to refer to Nulgrind as the example tool
for if you start writing a new one.

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

20 years agoMake some changes to Nulgrind -- it looks like Jeremy made some changes to it
Nicholas Nethercote [Mon, 23 Aug 2004 14:10:36 +0000 (14:10 +0000)] 
Make some changes to Nulgrind -- it looks like Jeremy made some changes to it
as part of FV, but then later these changes become unnecessary.  Anyway, it now
looks more like the other tools again.

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

20 years agoRemove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Nicholas Nethercote [Mon, 23 Aug 2004 14:02:03 +0000 (14:02 +0000)] 
Remove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Makefile.am files.

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

20 years agoFix bug, courtesy of Paul Mackerras: when giving find_map_space an address
Nicholas Nethercote [Mon, 23 Aug 2004 09:28:37 +0000 (09:28 +0000)] 
Fix bug, courtesy of Paul Mackerras: when giving find_map_space an address
lower than that of any existing segment, it got it wrong due to the confusing
SkipList API.  I wonder how many more bugs like that there are...?

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

20 years agoMore fixes for the cancellation wrappers in libpthread - if looking
Tom Hughes [Sun, 22 Aug 2004 22:56:25 +0000 (22:56 +0000)] 
More fixes for the cancellation wrappers in libpthread - if looking
for the original function with RTLD_NEXT doesn't work then try looking
for the __libc_ version of the function the RTLD_DEFAULT instead.

The reason for this is that, contrary to the dlsym documentation, it
seems that RTLD_NEXT doesn't always seem to find the definition that
would have been used if it weren't for the override. This is particularly
common wihen libpthread is pulled in implicitly by a dependency from
another library.

This should hopefully fix bug #85658.

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

20 years agoAdd support for a --time-stamp option that causes each message output
Tom Hughes [Sat, 21 Aug 2004 11:10:44 +0000 (11:10 +0000)] 
Add support for a --time-stamp option that causes each message output
by valgrind to include a time stamp. This fixes bug #70587.

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

20 years agoRename VGOFF_(tls) to VGOFF_(tls_ptr) to make it clear it's not the same as
Nicholas Nethercote [Wed, 18 Aug 2004 23:11:45 +0000 (23:11 +0000)] 
Rename VGOFF_(tls) to VGOFF_(tls_ptr) to make it clear it's not the same as
ThreadState.tls.

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

20 years agoRemove 3 identical and self-admittedly spurious assertions.
Nicholas Nethercote [Wed, 18 Aug 2004 22:26:01 +0000 (22:26 +0000)] 
Remove 3 identical and self-admittedly spurious assertions.

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

20 years agoCleaned up the syscall wrappers a bit:
Nicholas Nethercote [Wed, 18 Aug 2004 14:37:17 +0000 (14:37 +0000)] 
Cleaned up the syscall wrappers a bit:
- corrected a few mistakes, eg. when printing them out, in prototypes
- made printing of "%p(%s)" args consistent
- removed 'sizeof_struct_user_fpxregs_struct' from PRE(ptrace)/POST(ptrace)
- allowing for the two different versions of open()

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

20 years agoMinor rejigging of includes to help compilation on Debian systems.
Tom Hughes [Wed, 18 Aug 2004 08:11:34 +0000 (08:11 +0000)] 
Minor rejigging of includes to help compilation on Debian systems.

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

20 years agogetgroups can't block
Nicholas Nethercote [Tue, 17 Aug 2004 13:26:52 +0000 (13:26 +0000)] 
getgroups can't block

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

20 years agoAdd support for the parallel port ioctls.
Tom Hughes [Mon, 16 Aug 2004 19:46:55 +0000 (19:46 +0000)] 
Add support for the parallel port ioctls.

CCMAIL: 86407-done@bugs.kde.org

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

20 years agoTreat a thread which is waiting to be reaped (ie one with a status
Tom Hughes [Sun, 15 Aug 2004 14:34:02 +0000 (14:34 +0000)] 
Treat a thread which is waiting to be reaped (ie one with a status
of VgTs_WaitJoiner) as non-existent for the purposes of cancellation.

This ensures that pthread_cancel returns ESRCH instead of trying to
cancel the thread, which would lead to the thread cleanup code being
run twice.

CCMAIL: 86730-done@bugs.kde.org

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

20 years agoBack out yesterday's change to the symbol versioning in the pthread
Tom Hughes [Sun, 15 Aug 2004 14:11:12 +0000 (14:11 +0000)] 
Back out yesterday's change to the symbol versioning in the pthread
library - it seems that I misunderstood hom the versioning works and
a system looking for a GLIBC_PRIVATE version of the clock routines
would not find the GLIB_2.2.3 one even with the inheritance. It only
seemed to be working on glibc 2.3 systems because of the version
overrides in the source code, but it failed on glibc 2.2.5 systems.

The new approach is to explicity create two versions of the routines
in question, one with a version of GLIBC_2.2.3 and one with a version
of GLIBC_PRIVATE instead. This has been tested on six different systems
and appears to work everywhere.

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

20 years agoAdd support for the POSIX message queue system calls.
Tom Hughes [Sat, 14 Aug 2004 18:52:27 +0000 (18:52 +0000)] 
Add support for the POSIX message queue system calls.

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

20 years agoMaek init_global_thread_specific_state as a constructor to try and ensure
Tom Hughes [Sat, 14 Aug 2004 15:37:59 +0000 (15:37 +0000)] 
Maek init_global_thread_specific_state as a constructor to try and ensure
that it is called as soon as libpthread.so is loaded even if pthread_create
is never called.

This ensures that pthread_exit will work correctly, and I think will also
cure the famous memory leak in the pthread specifics for the main thread.

CCMAIL: 86730-done@bugs.kde.org

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

20 years agoRather surprisingly we weren't actually calling pre_mem_write for the buffer
Tom Hughes [Sat, 14 Aug 2004 12:10:49 +0000 (12:10 +0000)] 
Rather surprisingly we weren't actually calling pre_mem_write for the buffer
argument to the read system call...

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

20 years agoUpdated list of system calls from the list in a 2.6.7 kernel.
Tom Hughes [Sat, 14 Aug 2004 10:49:43 +0000 (10:49 +0000)] 
Updated list of system calls from the list in a 2.6.7 kernel.

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

20 years agoMove __pthread_clock_gettime and __pthread_clock_settime back to
Tom Hughes [Fri, 13 Aug 2004 22:49:11 +0000 (22:49 +0000)] 
Move __pthread_clock_gettime and __pthread_clock_settime back to
the GLIBC_2.2.3 section which is where they were in glibc before
they were moved to GLIBC_PRIVATE around the 2.2.5 time frame.

This makes older systems work correctly as librt will be looking
for the symbols with that version. In order to make newer systems
work we make GLIBC_PRIVATE a child of the most recent version in
the file (currently GLIBC_2.3.3) so that a librt which is looking
for the symbols with a version of GLIBC_PRIVATE will find them.

The real glibc pthread libraries have GLIBC_PRIVATE as a child of
the most recent version anyway, so this shouldn't cause any problems
and with this change librt seems to be OK both on old RedHat 7.1 systems
with glibc 2.2.3 and on Fedora Core 2 systems with glibc 2.3.3.

Hopefully this will fix FAQ 3.4 but I haven't removed that just yet.

CCMAIL: 86696-done@bugs.kde.org

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

20 years agoImprove handling of semctl, msgctl and shmctl so that all relevant
Tom Hughes [Fri, 13 Aug 2004 22:21:51 +0000 (22:21 +0000)] 
Improve handling of semctl, msgctl and shmctl so that all relevant
opcodes are properly validated. Using memcheck on ipcs now produces
no warnings on my machine.

This commit fixes bug #86987.

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

21 years agoBig overhaul of the allocator. Much of the structure is the same, but
Nicholas Nethercote [Wed, 11 Aug 2004 09:40:52 +0000 (09:40 +0000)] 
Big overhaul of the allocator.  Much of the structure is the same, but
lots of the details changed.  Made the following generalisations:

- Recast everything to be entirely terms of bytes, instead of a mixture
  of (32-bit) words and bytes.  This is a bit easier to understand, and
  made the following generalisations possible...

- Almost 64-bit clean;  no longer assuming 32-bit words/pointers.  Only
  (I think) non-64-bit clean part is that VG_(malloc)() et al take an
  Int as the size arg, and size_t is 64-bits on 64-bit machines.

- Made the alignment of blocks returned by malloc() et al completely
  controlled by a single value, VG_MIN_MALLOC_SZB.  (Previously there
  were various magic numbers and assumptions about block alignment
  scattered throughout.) I tested this, all the regression tests pass
  with VG_MIN_MALLOC_SZB of 4, 8, 16, 32, 64.  One thing required for
  this was to make redzones elastic;  the asked-for redzone size is now
  the minimum size;  it will use bigger ones if necessary to get the
  required alignment.

Some other specific changes:

- Made use of types a bit more;  ie. actually using the type 'Block',
  rather than just having everything as arrays of words, so that should
  be a bit safer.

- Removed the a->rz_check field, which was redundant wrt. a->clientmem.

- Fixed up the decision about which list to use so the 4 lists which
  weren't ever being used now are -- the problem was that this hasn't
  been properly updated when alignment changed from 4 to 8 bytes.

- Added a regression test for memalign() and posix_memalign().
  memalign() was aborting if passed a bad alignment argument.

- Added some high-level comments in various places, explaining how the
  damn thing works.

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

21 years agoChange VG_(scheduler)() slightly to remove two more global vars from
Nicholas Nethercote [Mon, 9 Aug 2004 13:13:31 +0000 (13:13 +0000)] 
Change VG_(scheduler)() slightly to remove two more global vars from
vg_include.h.

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

21 years agoRemove some more global variables from vg_include.h, replacing them with
Nicholas Nethercote [Mon, 9 Aug 2004 12:21:57 +0000 (12:21 +0000)] 
Remove some more global variables from vg_include.h, replacing them with
(fewer) functions.

Also fixed execve() so that it works better with .in_place.

Also added a regression test for --trace-children=yes (there were none!)

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

21 years agoPut VALGRIND_INTERNAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE back in
Nicholas Nethercote [Mon, 9 Aug 2004 11:15:10 +0000 (11:15 +0000)] 
Put VALGRIND_INTERNAL_PRINTF and VALGRIND_INTERNAL_PRINTF_BACKTRACE back in
vg_include.h, where they must be otherwise vg_libtpthread.c has problems.
Added a comment explaining why they must be in vg_include.h.

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

21 years agoMake VG_(last_run_tid) and VG_(sigstack) local.
Nicholas Nethercote [Sat, 7 Aug 2004 18:16:56 +0000 (18:16 +0000)] 
Make VG_(last_run_tid) and VG_(sigstack) local.

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

21 years agoDe-globalise a few more counters.
Nicholas Nethercote [Sat, 7 Aug 2004 17:52:25 +0000 (17:52 +0000)] 
De-globalise a few more counters.

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

21 years agoAdd some missing 'static' annotations. Thanks to Josef W for spotting them.
Nicholas Nethercote [Sat, 7 Aug 2004 15:54:53 +0000 (15:54 +0000)] 
Add some missing 'static' annotations.  Thanks to Josef W for spotting them.

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

21 years agoMade cpu-feature detection simpler -- got rid of the confusing global state,
Nicholas Nethercote [Fri, 6 Aug 2004 17:06:14 +0000 (17:06 +0000)] 
Made cpu-feature detection simpler -- got rid of the confusing global state,
put it all into static state within a single function.  Also, now the callers
of get_cpu_features() don't have to worry about whether it's been called
before.

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

21 years agoMake error messages more informative.
Nicholas Nethercote [Thu, 5 Aug 2004 12:16:13 +0000 (12:16 +0000)] 
Make error messages more informative.

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

21 years agohandle_SCSS_change() need not be global.
Nicholas Nethercote [Wed, 4 Aug 2004 15:31:30 +0000 (15:31 +0000)] 
handle_SCSS_change() need not be global.

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