]> git.ipfire.org Git - thirdparty/valgrind.git/log
thirdparty/valgrind.git
22 years agoOnly set the thread's status to WaitSys if we're actually waiting for
Jeremy Fitzhardinge [Sun, 9 Nov 2003 09:51:33 +0000 (09:51 +0000)] 
Only set the thread's status to WaitSys if we're actually waiting for
a proxyLWP to complete a syscall.

Update sigaltstack test to use mmap to allocate the stack.

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

22 years agoFix some bugs in syscall/signal handling:
Jeremy Fitzhardinge [Fri, 7 Nov 2003 23:09:48 +0000 (23:09 +0000)] 
Fix some bugs in syscall/signal handling:

If the proxyLWP for a thread got a signal just as we were sending the
syscall request to it, then we would end up running the syscall twice.
The fix is to not check the results pipe while sending the syscall request
- wait until we're in a better state for handling signals (the deadlock
the results-read was supposed to avoid cannot actually happen).

Related to that, if we're delivering a signal to a thread, and that thread
is currently waiting for a syscall to complete, make sure we collect the
syscall results before entering the signal handler (otherwise we may end
up bogusly trying to restart the syscall by moving EIP back, even though
it now points to the signal handler rather than the syscall instruction)

This change also adds an assertion to VG_(restart_syscall) to make sure
we were actually restarting a syscall and not just randomly changing EIP
(this found the problem above).

Also, make set/getitimer run in the proxyLWP context, so that they
modify/read the proxyLWP's timers rather than the schedluer LWP's timers.

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

22 years agoFilter out line numbers in vg_scheduler.c in Helgrind's regtests.
Nicholas Nethercote [Thu, 6 Nov 2003 11:34:52 +0000 (11:34 +0000)] 
Filter out line numbers in vg_scheduler.c in Helgrind's regtests.

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

22 years agoIt's not good that the head claims to be some old stable version.
Julian Seward [Thu, 6 Nov 2003 00:03:20 +0000 (00:03 +0000)] 
It's not good that the head claims to be some old stable version.
Change the version number to 'HEAD'.

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

22 years agoChange VG_CORE_INTERFACE_MAJOR_VERSION to 5.
Julian Seward [Wed, 5 Nov 2003 23:59:21 +0000 (23:59 +0000)] 
Change VG_CORE_INTERFACE_MAJOR_VERSION to 5.

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

22 years agoMore SSE support for cachegrind.
Julian Seward [Tue, 4 Nov 2003 22:54:28 +0000 (22:54 +0000)] 
More SSE support for cachegrind.

MERGE TO STABLE

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

22 years ago- Fix for kernel 2.6. __user need definition.
Helio Chissini de Castro [Tue, 4 Nov 2003 12:53:59 +0000 (12:53 +0000)] 
- Fix for kernel 2.6. __user need definition.

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

22 years ago- Fix for kernel 2.6. __user need definition.
Helio Chissini de Castro [Tue, 4 Nov 2003 12:33:29 +0000 (12:33 +0000)] 
- Fix for kernel 2.6. __user need definition.

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

22 years agoIf we bomb out due to not finding the executable, print our invokation
Julian Seward [Tue, 4 Nov 2003 07:12:06 +0000 (07:12 +0000)] 
If we bomb out due to not finding the executable, print our invokation
name.  Before:

   'ssss' not found in $PATH, aborting.

After:

   ./Inst/bin/valgrind: 'ssss' not found in $PATH, aborting.

(Already in STABLE).

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

22 years agoMove var declarations to start of block, for older versions of gcc.
Nicholas Nethercote [Mon, 3 Nov 2003 11:12:02 +0000 (11:12 +0000)] 
Move var declarations to start of block, for older versions of gcc.

MERGE TO STABLE

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

22 years agoFixed bug in overlap check in strncpy() -- it was assuming the src was 'n'
Nicholas Nethercote [Sun, 2 Nov 2003 17:43:27 +0000 (17:43 +0000)] 
Fixed bug in overlap check in strncpy() -- it was assuming the src was 'n'
bytes longs, when it could be shorter, which could cause false positives.

Added an example of this to the regtest.

MERGE TO STABLE

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

22 years agoImplemented PUSH/POP %{FS,GS}, and PUSH %CS (Nb: there is no POP %CS). Based
Nicholas Nethercote [Sun, 2 Nov 2003 17:00:23 +0000 (17:00 +0000)] 
Implemented PUSH/POP %{FS,GS}, and PUSH %CS (Nb: there is no POP %CS).  Based
on patches from Adam Gundy and Tom Hughes.

MERGE TO STABLE

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

22 years agoUpdated FAQ #8, to reflect the fact that we now support a lot of SSE/SSE2
Nicholas Nethercote [Sun, 2 Nov 2003 16:32:05 +0000 (16:32 +0000)] 
Updated FAQ #8, to reflect the fact that we now support a lot of SSE/SSE2
instructions.

MERGE TO STABLE

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

22 years agoDeleted FAQ #2, as it is no longer relevant for the head, thanks to Jeremy's
Nicholas Nethercote [Sun, 2 Nov 2003 16:27:39 +0000 (16:27 +0000)] 
Deleted FAQ #2, as it is no longer relevant for the head, thanks to Jeremy's
syscalls changes.

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

22 years agoMake the startup static and suid checks follow symlinks.
Nicholas Nethercote [Sat, 1 Nov 2003 14:49:58 +0000 (14:49 +0000)] 
Make the startup static and suid checks follow symlinks.

Also a couple of minor formatting changes.

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

22 years agoAdd missing printf and pre_mem_read to rt_sigtimedwait(), thanks to Thomas
Nicholas Nethercote [Sat, 1 Nov 2003 14:03:37 +0000 (14:03 +0000)] 
Add missing printf and pre_mem_read to rt_sigtimedwait(), thanks to Thomas
Lussnig <lussnig@smcc.net>.

MERGE TO STABLE

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

22 years agofix 'make dist'.
Dirk Mueller [Sat, 1 Nov 2003 01:59:23 +0000 (01:59 +0000)] 
fix 'make dist'.

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

22 years agoOops, add new files
Jeremy Fitzhardinge [Fri, 31 Oct 2003 18:52:18 +0000 (18:52 +0000)] 
Oops, add new files

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

22 years agoFix --trace-malloc=yes, by using client-side VALGRIND_INTERNAL_PRINTF
Jeremy Fitzhardinge [Fri, 31 Oct 2003 07:13:41 +0000 (07:13 +0000)] 
Fix --trace-malloc=yes, by using client-side VALGRIND_INTERNAL_PRINTF
to print the allocation traces rather than trying to directly use
VG_(printf).

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

22 years agoPatch from Robert Walsh <rjwalsh@durables.org>. Adds some new client
Jeremy Fitzhardinge [Fri, 31 Oct 2003 07:12:21 +0000 (07:12 +0000)] 
Patch from Robert Walsh <rjwalsh@durables.org>. Adds some new client
requests to allow client code to print messages through Valgrind's
logging mechanism.  The new requests are:
  VALGRIND_PRINTF - do a normal printf (prefixed with **PID**)
  VALGRIND_PRINTF_BACKTRACE - do a printf with stack trace
  VALGRIND_INTERNAL_PRINTF - printf, but for internal use (prefixed with ==PID==)
  VALGRIND_INTERNAL_PRINTF_BACKTRACE - as above, with backtrace

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

22 years agofixes .cfi configure problem. apparently compiling is not enough
Dirk Mueller [Fri, 31 Oct 2003 03:43:48 +0000 (03:43 +0000)] 
fixes .cfi configure problem. apparently compiling is not enough
to invoke the gnu as in all cases.

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

22 years agothere have been reports that "stat" is not portable enough.
Dirk Mueller [Thu, 30 Oct 2003 13:49:36 +0000 (13:49 +0000)] 
there have been reports that "stat" is not portable enough.

MERGE TO STABLE

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

22 years agofor some reason I need that to make it compile on suse 9
Dirk Mueller [Thu, 30 Oct 2003 13:41:26 +0000 (13:41 +0000)] 
for some reason I need that to make it compile on suse 9
MERGE TO STABLE

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

22 years agomake it really silent
Dirk Mueller [Thu, 30 Oct 2003 13:31:15 +0000 (13:31 +0000)] 
make it really silent

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

22 years agoIncreased the skin major version number, to reflect the changed return values
Nicholas Nethercote [Thu, 30 Oct 2003 12:34:47 +0000 (12:34 +0000)] 
Increased the skin major version number, to reflect the changed return values
of functions like VG_(open), and also to cover any future changes between now
and the HEAD becoming an official release.

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

22 years agoFix cachegrind to deal with VG_(open)() returning any negative number on error,
Nicholas Nethercote [Thu, 30 Oct 2003 10:33:30 +0000 (10:33 +0000)] 
Fix cachegrind to deal with VG_(open)() returning any negative number on error,
not just -1.

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

22 years agoPreviously, if the command given to Valgrind didn't exist, the 'stat -c'
Nicholas Nethercote [Thu, 30 Oct 2003 09:37:47 +0000 (09:37 +0000)] 
Previously, if the command given to Valgrind didn't exist, the 'stat -c'
suid/sgid test failed, and the startup script aborted with an ugly message.
I've changed it so that it first checks that the program exists in the user's
path (as determined by 'which'), and aborts if not.

This was quite fiddly to get right;  yell if I've broken anything.

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

22 years agoAdded a regtest that uses pthreads -- there weren't any.
Nicholas Nethercote [Thu, 30 Oct 2003 09:11:03 +0000 (09:11 +0000)] 
Added a regtest that uses pthreads -- there weren't any.

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

22 years agoAdd a --assume-2.4=yes|no CLO. This overrides the normal check to see
Jeremy Fitzhardinge [Thu, 30 Oct 2003 07:25:59 +0000 (07:25 +0000)] 
Add a --assume-2.4=yes|no CLO.  This overrides the normal check to see
if the kernel has enough capabilities to run in 2.6 mode (ie, futex,
the right kind of clone, correct signal handling properties), and always
uses 2.4 mode.  This will often not work on a 2.6 or RH9 2.4 kernel, but
it does help avoid a bug in the SuSE 8.2 (and possibly 9) kernels, which
look like they support enough to run in 2.6 mode, but get it wrong.
TODO: make the startup script/configure actually use this option.

Also some cleanup in printing debugging messages from vg_proxylwp.c, and
a small fix in the handling of ERESTARTSYS (assume that every syscall will
get interrupted from the outset, until it actually completes).

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

22 years agoUpdate some stuff related to the syscalls change:
Jeremy Fitzhardinge [Thu, 30 Oct 2003 07:21:44 +0000 (07:21 +0000)] 
Update some stuff related to the syscalls change:
 - restart syscalls which return ERESETARTSYS
 - make code to restart a syscall common
 - keep a process-wide pending signal set to store as-yet
   undelivered signals (only used in 2.4 mode; TODO: siginfo, queues)
 - make execve work a bit better - it is impossible to recover from
   execve failing, so we try to check that it will before running the
   syscall itself (also fixes bug with SuSE 8.2 kernel)

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

22 years agono longer sourceforge (also known as test commit)
Dirk Mueller [Wed, 29 Oct 2003 16:03:51 +0000 (16:03 +0000)] 
no longer sourceforge (also known as test commit)

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

22 years agoAdd SQRTSS: square root of scalar float
Julian Seward [Sun, 19 Oct 2003 22:08:20 +0000 (22:08 +0000)] 
Add SQRTSS: square root of scalar float

MERGE TO STABLE

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

22 years agoImplement UNPCKLPS and UNPCKHPS
Julian Seward [Sun, 19 Oct 2003 18:26:36 +0000 (18:26 +0000)] 
Implement UNPCKLPS and UNPCKHPS
and improve  UNPCKLPD.

MERGE TO STABLE

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

22 years agoReturn an error rather than panicing when given a bad socketcall
Jeremy Fitzhardinge [Sun, 19 Oct 2003 16:46:06 +0000 (16:46 +0000)] 
Return an error rather than panicing when given a bad socketcall

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

22 years agoSSE/SSE2 fixes needed to run the entire test suite of the GNU
Julian Seward [Sun, 19 Oct 2003 08:18:52 +0000 (08:18 +0000)] 
SSE/SSE2 fixes needed to run the entire test suite of the GNU
Scientific Library (gsl-1.4) compiled with Intel Icc 7.1 20030307Z '-g
-O -xW'.  I think this gives pretty good coverage of SSE/SSE2 floating
point instructions, or at least the subset emitted by Icc.  So far
tested on memcheck and nulgrind; addrcheck and cachesim still testing.

MERGE TO STABLE

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

22 years agoThere's a bug in memory ownership inheritance, which inherit.c shows up. Make it...
Jeremy Fitzhardinge [Sat, 18 Oct 2003 22:27:10 +0000 (22:27 +0000)] 
There's a bug in memory ownership inheritance, which inherit.c shows up.  Make it obvious.

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

22 years agoucomisd support
Dirk Mueller [Sat, 18 Oct 2003 17:04:24 +0000 (17:04 +0000)] 
ucomisd support

MERGE TO STABLE

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

22 years agoChange things so that helgrind regtests pass on my machine -- changed stderr
Nicholas Nethercote [Sat, 18 Oct 2003 14:16:01 +0000 (14:16 +0000)] 
Change things so that helgrind regtests pass on my machine -- changed stderr
filters to strip out varying things, and changed outputs correspondingly.  Yell
if this breaks them for you.

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

22 years agoRemove the configure-time NPTL test, the results of which are no longer used.
Nicholas Nethercote [Sat, 18 Oct 2003 14:05:42 +0000 (14:05 +0000)] 
Remove the configure-time NPTL test, the results of which are no longer used.

MERGE TO STABLE, if the corresponding change to valgrind.in is also merged.

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

22 years agoRenamed two of the new files:
Nicholas Nethercote [Sat, 18 Oct 2003 13:58:44 +0000 (13:58 +0000)] 
Renamed two of the new files:

  vg_symtab_dwarf.c --> vg_dwarf.c
  vg_symtab_stabs.c --> vg_stabs.c

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

22 years agoClean up and extend some of the SSE instrumentation cases.
Julian Seward [Fri, 17 Oct 2003 21:51:28 +0000 (21:51 +0000)] 
Clean up and extend some of the SSE instrumentation cases.

MERGE TO STABLE

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

22 years agoImplement MOVNTDQ (a SSE/SSE2 insn)
Julian Seward [Fri, 17 Oct 2003 21:50:30 +0000 (21:50 +0000)] 
Implement MOVNTDQ (a SSE/SSE2 insn)

MERGE TO STABLE

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

22 years ago- add test to detect if GNU as supports .cfi directives
Dirk Mueller [Fri, 17 Oct 2003 13:43:46 +0000 (13:43 +0000)] 
- add test to detect if GNU as supports .cfi directives
- correct stack-boundary test. this test is apparently redundant
  as it always passed, and nobody complained ;)

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

22 years agoheh, apparently not even SuSE 8.2 has a recent-enough gas :)
Dirk Mueller [Fri, 17 Oct 2003 13:24:40 +0000 (13:24 +0000)] 
heh, apparently not even SuSE 8.2 has a recent-enough gas :)

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

22 years agodetect NPTL environment at runtime. candidate for MERGE TO STABLE ?
Dirk Mueller [Fri, 17 Oct 2003 09:36:09 +0000 (09:36 +0000)] 
detect NPTL environment at runtime. candidate for MERGE TO STABLE ?

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

22 years agowhoops. unbreak stat'ing of executables in path
Dirk Mueller [Fri, 17 Oct 2003 00:25:07 +0000 (00:25 +0000)] 
whoops. unbreak stat'ing of executables in path

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

22 years agofix compile with 2.6.0test7
Dirk Mueller [Thu, 16 Oct 2003 20:29:01 +0000 (20:29 +0000)] 
fix compile with 2.6.0test7
MERGE TO STABLE

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

22 years agofix build with kernel 2.6.x
Dirk Mueller [Thu, 16 Oct 2003 16:14:13 +0000 (16:14 +0000)] 
fix build with kernel 2.6.x

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

22 years agoprovide CFI for newer gdb versions which are confused by our stack
Dirk Mueller [Thu, 16 Oct 2003 14:19:27 +0000 (14:19 +0000)] 
provide CFI for newer gdb versions which are confused by our stack
manipulations otherwise. These macros are probably not implemented in
older gas versions. We'll see when people complain, but otherwise
this is a very good candidate for

MERGE TO STABLE

as it fixes --gdb-attach=yes for any recent distro.

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

22 years agoAdded header + copyright notice + footer to some files missing them.
Nicholas Nethercote [Thu, 16 Oct 2003 10:10:55 +0000 (10:10 +0000)] 
Added header + copyright notice + footer to some files missing them.

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

22 years agoOops, forgot *.c for helgrind tests
Jeremy Fitzhardinge [Thu, 16 Oct 2003 06:09:41 +0000 (06:09 +0000)] 
Oops, forgot *.c for helgrind tests

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

22 years agoAdd some regression tests for helgrind.
Jeremy Fitzhardinge [Wed, 15 Oct 2003 22:15:37 +0000 (22:15 +0000)] 
Add some regression tests for helgrind.

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

22 years agorefuse to valgrind apps that are suid or sgid, as it doesn't work anyway.
Dirk Mueller [Wed, 15 Oct 2003 17:43:26 +0000 (17:43 +0000)] 
refuse to valgrind apps that are suid or sgid, as it doesn't work anyway.

MERGE TO STABLE

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

22 years agoFixed terrible(!) typo.
Nicholas Nethercote [Wed, 15 Oct 2003 17:22:22 +0000 (17:22 +0000)] 
Fixed terrible(!) typo.

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

22 years agoFixed VG_(ssort)(), which was broken for the size != {1,2,4} general case.
Nicholas Nethercote [Wed, 15 Oct 2003 14:00:35 +0000 (14:00 +0000)] 
Fixed VG_(ssort)(), which was broken for the size != {1,2,4} general case.

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

22 years agoAllow VGOFF_() symbols to be global, so that skins that refer to
Nicholas Nethercote [Wed, 15 Oct 2003 11:21:43 +0000 (11:21 +0000)] 
Allow VGOFF_() symbols to be global, so that skins that refer to
VGOFF_(helper_*) work again.  That was a perplexing little problem to fix.

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

22 years agoFix a couple of compiler warnings.
Nicholas Nethercote [Wed, 15 Oct 2003 10:34:03 +0000 (10:34 +0000)] 
Fix a couple of compiler warnings.

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

22 years agoImplement repe scas.
Jeremy Fitzhardinge [Tue, 14 Oct 2003 22:17:19 +0000 (22:17 +0000)] 
Implement repe scas.

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

22 years agoWhen creating a logfile name, add a sequence number to the name in case
Jeremy Fitzhardinge [Tue, 14 Oct 2003 22:13:28 +0000 (22:13 +0000)] 
When creating a logfile name, add a sequence number to the name in case
a logfile for that pid already exists.  This may happen for programs
started during system boot which will tend to get the same pid each boot.

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

22 years agoFix a bug in the duplicate string squasher, which was a bit over-eager
Jeremy Fitzhardinge [Tue, 14 Oct 2003 22:07:31 +0000 (22:07 +0000)] 
Fix a bug in the duplicate string squasher, which was a bit over-eager
to decide two strings are duplicates.

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

22 years agoAdds VG_(describe_addr)() for generating symbolic descriptions of a
Jeremy Fitzhardinge [Tue, 14 Oct 2003 21:55:10 +0000 (21:55 +0000)] 
Adds VG_(describe_addr)() for generating symbolic descriptions of a
memory address, based on which variables are in scope at the time and
their types.

As part of this change, I restructured the symbol table parsing code,
by splitting the stabs and dwarf-specific parts into their own files.
I also added a new set of vg_symtypes.[ch] files which contains the
type system code and the core of the VG_(describe_addr)().

I've only implemented the stabs type parser.  I have not yet implemented
the DWARF2 parser.  It looks well-defined but complex.

The only skin which uses this is Helgrind at the moment.

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

22 years agoThis creates a new UInstr for multiply. This is mainly so that memcheck
Jeremy Fitzhardinge [Tue, 14 Oct 2003 21:49:11 +0000 (21:49 +0000)] 
This creates a new UInstr for multiply.  This is mainly so that memcheck
can treat it like add and generate partially-defined results of multiply
with partially defined arguments.  It may also speed things up a bit,
if they use lots of multiplies.

This change only deals with signed "new style" multiplies.  That the x86
has two quite different kinds of multiply instructions: the "old-style"
signed and unsigned multiply which uses fixed registers (eax:edx) and
generates a result twice the size of the arguments, and the newer signed
multiple which takes general addressing modes.  It seems that gcc always
(almost always?) generates the new signed multiply instructions, except
for byte-sized multiplies.

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

22 years agoWe expect new output with the syscalls changes.
Jeremy Fitzhardinge [Tue, 14 Oct 2003 21:11:29 +0000 (21:11 +0000)] 
We expect new output with the syscalls changes.

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

22 years agoMention that -fno-inline is a helpful build flag when you're debugging.
Julian Seward [Tue, 14 Oct 2003 07:30:33 +0000 (07:30 +0000)] 
Mention that -fno-inline is a helpful build flag when you're debugging.

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

22 years agoDocument the state machine implemented in vg_proxylwp.c.
Jeremy Fitzhardinge [Mon, 13 Oct 2003 22:28:06 +0000 (22:28 +0000)] 
Document the state machine implemented in vg_proxylwp.c.

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

22 years agoA complete reworking of Valgrind's handling of system calls and signals,
Jeremy Fitzhardinge [Mon, 13 Oct 2003 22:26:55 +0000 (22:26 +0000)] 
A complete reworking of Valgrind's handling of system calls and signals,
with the aim of making it more robust, more correct and perhaps faster.

This patch removes the need to poll blocking syscalls, by adding a proxy
LWP for each application thread.  This LWP is a kernel thread whose job
is to run all (potentially) blocking syscalls, and also to handle signals.

This allows the kernel to do more of the work of dealing with signals,
so on kernels which do this properly (2.6), Valgrind's behavious is a
lot more posix compliant.  On base 2.4 kernels, we emulate some of the
missing 2.6 functionality.

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

22 years agoFixed "pop (%esp)", which must increment %esp before using it to calculate the
Nicholas Nethercote [Mon, 13 Oct 2003 07:30:40 +0000 (07:30 +0000)] 
Fixed "pop (%esp)", which must increment %esp before using it to calculate the
memory address.  Thanks to Erik Corry.

MERGE TO STABLE

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

22 years agoAdded (trivially) support for "push %ss". Minimally tested, along with "pop
Nicholas Nethercote [Sun, 12 Oct 2003 17:34:05 +0000 (17:34 +0000)] 
Added (trivially) support for "push %ss".  Minimally tested, along with "pop
%ss".

MERGE TO STABLE, probably

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

22 years agoAdded (trivally) support for "pop %ss". Untested.
Nicholas Nethercote [Sun, 12 Oct 2003 17:32:27 +0000 (17:32 +0000)] 
Added (trivally) support for "pop %ss".  Untested.

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

22 years agoAdded a couple of small #ifdefs so that Valgrind works with Erik Anderson's
Nicholas Nethercote [Sun, 12 Oct 2003 17:26:04 +0000 (17:26 +0000)] 
Added a couple of small #ifdefs so that Valgrind works with Erik Anderson's
uClibc (micro libc, a small alternative to glibc).

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

22 years agoDelete some "inline" directives on functions that gcc-3.3.1 declined
Julian Seward [Sun, 12 Oct 2003 10:27:06 +0000 (10:27 +0000)] 
Delete some "inline" directives on functions that gcc-3.3.1 declined
to inline.  This is needed to get a warning-free compilation on 3.3.1.
It seems we had "inline" on some pretty huge functions in places.
Also it appears gcc-3.3.1 won't inline a function call in a tail call
position, reasonably enough.  I assume in that case it prefers to
create a tailcall to the callee, rather than inlining it.

MERGE TO STABLE

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

22 years agoImplement DIVPS/DIVPD (Tom Hughes <thh@cyberscience.com>)
Julian Seward [Sun, 12 Oct 2003 08:38:36 +0000 (08:38 +0000)] 
Implement DIVPS/DIVPD (Tom Hughes <thh@cyberscience.com>)

MERGE TO STABLE

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

22 years agoImplement pthread_spinlock_* (Tim Potter, tpot@samba.org)
Julian Seward [Sun, 12 Oct 2003 08:33:30 +0000 (08:33 +0000)] 
Implement pthread_spinlock_* (Tim Potter, tpot@samba.org)

MERGE TO STABLE

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

22 years agoWhoops, forgot to commit changes to Makefile.am when I added the 'new_nothrow'
Nicholas Nethercote [Fri, 10 Oct 2003 11:01:44 +0000 (11:01 +0000)] 
Whoops, forgot to commit changes to Makefile.am when I added the 'new_nothrow'
test.

MERGE TO STABLE

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

22 years agoinclude sys/time.h when we have it.
Dirk Mueller [Thu, 9 Oct 2003 18:57:31 +0000 (18:57 +0000)] 
include sys/time.h when we have it.

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

22 years agoAdded interceptions for:
Nicholas Nethercote [Thu, 9 Oct 2003 15:40:38 +0000 (15:40 +0000)] 
Added interceptions for:

  operator new(unsigned, std::nothrow_t const&)
  operator new[](unsigned, std::nothrow_t const&)

because they weren't being intercepted, and called malloc(), which caused bogus
mismatch errors.

Added a regression test for it, too.

MERGE TO STABLE (although the change to vg_replace_malloc.c won't quite be a
cut and paste job, because of prior changes made to it in the head
but not the stable branch;  merge will still be easy, though)

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

22 years agoRudimentary, kludgy, incomplete and probably just plain wrong support
Julian Seward [Tue, 7 Oct 2003 00:18:16 +0000 (00:18 +0000)] 
Rudimentary, kludgy, incomplete and probably just plain wrong support
for vendor_id "CentaurHauls", which is the VIA string (reflecting its
design heritage).  Currently pretend to be something like a VIA Nehemiah.

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

22 years agoHandle SSE5.
Julian Seward [Fri, 3 Oct 2003 20:40:45 +0000 (20:40 +0000)] 
Handle SSE5.

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

22 years agoMoved the MALLOCLIKE and FREELIKE client requests out of memcheck.h, and into
Nicholas Nethercote [Thu, 2 Oct 2003 13:44:04 +0000 (13:44 +0000)] 
Moved the MALLOCLIKE and FREELIKE client requests out of memcheck.h, and into
valgrind.h.  Although these requests are not implemented by the core, they can
be implemented by skins that track heap blocks, eg. Memcheck, Annelid, Massif.
This is in preparation for committing Massif to the repository.

I think I managed to make the change in a binary-compatible way.  The only
inconvenience for users is that if they have a client program compiled with the
old requests in, Valgrind will abort with an explanatory message that tells
them to recompile.  Once they've done that (no changes to their program are
required), it works again.

I even updated the docs.

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

22 years agoFixed up the client request info in the docs, which required splitting the core
Nicholas Nethercote [Thu, 2 Oct 2003 13:25:02 +0000 (13:25 +0000)] 
Fixed up the client request info in the docs, which required splitting the core
requests from the Memcheck requests and putting the descriptions in the
appropriate parts of the docs.

Removed the __VALGRIND_SOME_SKIN_H test -- it was designed to prevent people
#including valgrind.h when they probably want memcheck.h, but it's actually a
reasonable thing to do to #include valgrind.h alone, because there are some
requests in valgrind.h.

Removed references to VALGRIND_MAKE_NOACCESS_STACK from the docs, as it doesn't
exist in the implementation.

Fixed a few other minor things.

MERGE TO STABLE

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

22 years agoImproved the ESP-update pass -- it's method for finding the ESP-deltas was very
Nicholas Nethercote [Wed, 1 Oct 2003 16:45:04 +0000 (16:45 +0000)] 
Improved the ESP-update pass -- it's method for finding the ESP-deltas was very
fragile, and it was lucky that it worked at all.  Replaced it with a much more
robust method.  Thanks to Dirk Mueller for pointing it out.

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

22 years agospeed optimisation: assuming that a tempreg not related to %esp before
Dirk Mueller [Wed, 1 Oct 2003 10:19:08 +0000 (10:19 +0000)] 
speed optimisation: assuming that a tempreg not related to %esp before
is PUTed into %ESP, we do *know* that this tempreg points to %ESP afterwards,
so track it.

reduces the amount of expensive "DO_GENERIC" calls by 75% in Khtml. I've
not observed a problem with it, but consider it experimental.

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

22 years agoexport emit_movzbl_regmem_reg as the other variants are exported too
Dirk Mueller [Tue, 30 Sep 2003 23:01:50 +0000 (23:01 +0000)] 
export emit_movzbl_regmem_reg as the other variants are exported too
and its useful for skins

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

22 years agoinc/dec %ESP support
Dirk Mueller [Tue, 30 Sep 2003 22:58:12 +0000 (22:58 +0000)] 
inc/dec %ESP support
MERGE TO STABLE

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

22 years agoThe name-mangled versions of __builtin_new() and __builtin_vec_new() now
Nicholas Nethercote [Tue, 30 Sep 2003 16:52:47 +0000 (16:52 +0000)] 
The name-mangled versions of __builtin_new() and __builtin_vec_new() now
don't just call the unmangled versions, but do the appropriate stuff
themselves directly (this was necessary for Massif).  This means that stack
traces for them have one fewer function.  And I was able to gather up several
very similar functions into a macro, reducing the amount of code, which was
nice.  Had to update one regtest's expected output accordingly.

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

22 years agoExport to skins a function, VG_(HT_count_nodes)(), which was always intended to
Nicholas Nethercote [Tue, 30 Sep 2003 15:43:51 +0000 (15:43 +0000)] 
Export to skins a function, VG_(HT_count_nodes)(), which was always intended to
be visible to them, but I had forgotten to export.

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

22 years agocomment change only
Nicholas Nethercote [Tue, 30 Sep 2003 15:37:24 +0000 (15:37 +0000)] 
comment change only

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

22 years agoRemoved sort_hash_array(). Changed VG_(HT_to_sorted_array)() to
Nicholas Nethercote [Tue, 30 Sep 2003 15:35:13 +0000 (15:35 +0000)] 
Removed sort_hash_array().  Changed VG_(HT_to_sorted_array)() to
VG_(HT_to_array)().  Leak checker now sorts the given array itself, using
VG_(ssort)().

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

22 years agoAdded a generic VG_(ssort)() function, like stdlib.h's qsort(). It's
Nicholas Nethercote [Tue, 30 Sep 2003 14:43:54 +0000 (14:43 +0000)] 
Added a generic VG_(ssort)() function, like stdlib.h's qsort().  It's
specialised for the size == 1/2/4 cases.

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

22 years agoTeach Helgrind to cope with negative args to malloc(). Also slightly economise
Nicholas Nethercote [Tue, 30 Sep 2003 14:20:00 +0000 (14:20 +0000)] 
Teach Helgrind to cope with negative args to malloc().  Also slightly economise
calloc().

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

22 years agoAdded a new flag ',' to printf() format specifications. When specified in a
Nicholas Nethercote [Tue, 30 Sep 2003 14:15:44 +0000 (14:15 +0000)] 
Added a new flag ',' to printf() format specifications.  When specified in a
number, will print it with commas delimiting it.  Very useful when printing
large numbers.

Using it, was able to remove the wretched commify() function from Cachegrind.

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

22 years agoMade VG_(read_millisecond_timer)() available to skins. Also made it cope
Nicholas Nethercote [Tue, 30 Sep 2003 14:03:21 +0000 (14:03 +0000)] 
Made VG_(read_millisecond_timer)() available to skins.  Also made it cope
with being called from SK_(pre_clo_init)(), before its startup code has been
run (just returns 0).

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

22 years agoAdded VG_(getcwd_alloc)(), which is much easier to use than VG_(getcwd)().
Nicholas Nethercote [Tue, 30 Sep 2003 13:51:23 +0000 (13:51 +0000)] 
Added VG_(getcwd_alloc)(), which is much easier to use than VG_(getcwd)().
(getcwd() is really a pretty stupid syscall)

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

22 years agoTiny formatting changes
Nicholas Nethercote [Tue, 30 Sep 2003 13:33:24 +0000 (13:33 +0000)] 
Tiny formatting changes

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

22 years agoDisallowed size==1 for WIDEN.
Nicholas Nethercote [Tue, 30 Sep 2003 13:22:30 +0000 (13:22 +0000)] 
Disallowed size==1 for WIDEN.

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

22 years agoDon't panic on MMX UInstrs. In effect, makes it work for MMX, as well
Julian Seward [Tue, 30 Sep 2003 00:13:30 +0000 (00:13 +0000)] 
Don't panic on MMX UInstrs.  In effect, makes it work for MMX, as well
as SSE/SSE2.

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

22 years agoImplement MOVQ -- move 8 bytes of XMM reg or mem to XMM reg.
Julian Seward [Tue, 30 Sep 2003 00:12:54 +0000 (00:12 +0000)] 
Implement MOVQ -- move 8 bytes of XMM reg or mem to XMM reg.

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

22 years agoChange things so that default.supp is only deleted with "make distclean",
Nicholas Nethercote [Mon, 29 Sep 2003 20:50:49 +0000 (20:50 +0000)] 
Change things so that default.supp is only deleted with "make distclean",
rather than "make clean", which is the behaviour recommended by the automake
docs for files built at configure-time.

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

22 years agoAdd a couple more CPUID-auto-detect cases for Intel CPUs to Cachegrind, thanks
Nicholas Nethercote [Mon, 29 Sep 2003 15:55:44 +0000 (15:55 +0000)] 
Add a couple more CPUID-auto-detect cases for Intel CPUs to Cachegrind, thanks
to Josef Weidendorfer.

MERGE TO STABLE

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

22 years agoFix broken regtest.
Nicholas Nethercote [Mon, 29 Sep 2003 14:45:44 +0000 (14:45 +0000)] 
Fix broken regtest.

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