1192 Commits

Author SHA1 Message Date
Jeremy Fitzhardinge
01c5d4fe3e 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
2003-10-30 07:21:44 +00:00
Dirk Mueller
849ff5523b no longer sourceforge (also known as test commit)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1962
2003-10-29 16:03:51 +00:00
Julian Seward
660e549669 Add SQRTSS: square root of scalar float
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1959
2003-10-19 22:08:20 +00:00
Julian Seward
e188968404 Implement UNPCKLPS and UNPCKHPS
and improve  UNPCKLPD.

MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1958
2003-10-19 18:26:36 +00:00
Jeremy Fitzhardinge
4e77d30c2d Return an error rather than panicing when given a bad socketcall
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1957
2003-10-19 16:46:06 +00:00
Julian Seward
195939592a 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
2003-10-19 08:18:52 +00:00
Jeremy Fitzhardinge
5fb4de9061 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
2003-10-18 22:27:10 +00:00
Dirk Mueller
e2a630288e ucomisd support
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1953
2003-10-18 17:04:24 +00:00
Nicholas Nethercote
f24e49d184 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
2003-10-18 14:16:01 +00:00
Nicholas Nethercote
2b04cbba29 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
2003-10-18 14:05:42 +00:00
Nicholas Nethercote
604c090120 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
2003-10-18 13:58:44 +00:00
Julian Seward
45e9d9cf18 Clean up and extend some of the SSE instrumentation cases.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1948
2003-10-17 21:51:28 +00:00
Julian Seward
3e0dbf2e57 Implement MOVNTDQ (a SSE/SSE2 insn)
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1947
2003-10-17 21:50:30 +00:00
Dirk Mueller
d012125a53 - 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
2003-10-17 13:43:46 +00:00
Dirk Mueller
1cd8fbe064 heh, apparently not even SuSE 8.2 has a recent-enough gas :)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1945
2003-10-17 13:24:40 +00:00
Dirk Mueller
4619552701 detect NPTL environment at runtime. candidate for MERGE TO STABLE ?
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1944
2003-10-17 09:36:09 +00:00
Dirk Mueller
5f609e9bfb whoops. unbreak stat'ing of executables in path
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1943
2003-10-17 00:25:07 +00:00
Dirk Mueller
f16055b642 fix compile with 2.6.0test7
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1942
2003-10-16 20:29:01 +00:00
Dirk Mueller
25a97a8692 fix build with kernel 2.6.x
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1941
2003-10-16 16:14:13 +00:00
Dirk Mueller
54947481f5 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
2003-10-16 14:19:27 +00:00
Nicholas Nethercote
ed91580eff Added header + copyright notice + footer to some files missing them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1939
2003-10-16 10:10:55 +00:00
Jeremy Fitzhardinge
7f7d5c5db0 Oops, forgot *.c for helgrind tests
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1938
2003-10-16 06:09:41 +00:00
Jeremy Fitzhardinge
5c2f1bb5e1 Add some regression tests for helgrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1937
2003-10-15 22:15:37 +00:00
Dirk Mueller
5f4edc28c4 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
2003-10-15 17:43:26 +00:00
Nicholas Nethercote
b185f1fdb3 Fixed terrible(!) typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1934
2003-10-15 17:22:22 +00:00
Nicholas Nethercote
2ad435fc82 Fixed VG_(ssort)(), which was broken for the size != {1,2,4} general case.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1933
2003-10-15 14:00:35 +00:00
Nicholas Nethercote
494fb63235 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
2003-10-15 11:21:43 +00:00
Nicholas Nethercote
fef87991da Fix a couple of compiler warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1931
2003-10-15 10:34:03 +00:00
Jeremy Fitzhardinge
d4fea78014 Implement repe scas.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1929
2003-10-14 22:17:19 +00:00
Jeremy Fitzhardinge
8f0884bbb6 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
2003-10-14 22:13:28 +00:00
Jeremy Fitzhardinge
65bdafc30c 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
2003-10-14 22:07:31 +00:00
Jeremy Fitzhardinge
c55d99c0cc 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
2003-10-14 21:55:10 +00:00
Jeremy Fitzhardinge
bab09402f1 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
2003-10-14 21:49:11 +00:00
Jeremy Fitzhardinge
32c9b08d6e We expect new output with the syscalls changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1924
2003-10-14 21:11:29 +00:00
Julian Seward
3cab8f4f8e Mention that -fno-inline is a helpful build flag when you're debugging.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1921
2003-10-14 07:30:33 +00:00
Jeremy Fitzhardinge
43f7ebcc30 Document the state machine implemented in vg_proxylwp.c.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1919
2003-10-13 22:28:06 +00:00
Jeremy Fitzhardinge
1e6361234c 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
2003-10-13 22:26:55 +00:00
Nicholas Nethercote
49cc5ac6ae 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
2003-10-13 07:30:40 +00:00
Nicholas Nethercote
f780064de9 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
2003-10-12 17:34:05 +00:00
Nicholas Nethercote
60cb1769d3 Added (trivally) support for "pop %ss". Untested.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1909
2003-10-12 17:32:27 +00:00
Nicholas Nethercote
f5ba3bad17 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
2003-10-12 17:26:04 +00:00
Julian Seward
b820f69079 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
2003-10-12 10:27:06 +00:00
Julian Seward
4ffd142216 Implement DIVPS/DIVPD (Tom Hughes <thh@cyberscience.com>)
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1903
2003-10-12 08:38:36 +00:00
Julian Seward
b3e4bdb2a5 Implement pthread_spinlock_* (Tim Potter, tpot@samba.org)
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1902
2003-10-12 08:33:30 +00:00
Nicholas Nethercote
4a64211e76 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
2003-10-10 11:01:44 +00:00
Dirk Mueller
e0cfbe57dd include sys/time.h when we have it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1900
2003-10-09 18:57:31 +00:00
Nicholas Nethercote
e5cca0566e 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
2003-10-09 15:40:38 +00:00
Julian Seward
4bb8f8e794 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
2003-10-07 00:18:16 +00:00
Julian Seward
3983cab629 Handle SSE5.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1891
2003-10-03 20:40:45 +00:00
Nicholas Nethercote
4877ebb17e 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
2003-10-02 13:44:04 +00:00