1211 Commits

Author SHA1 Message Date
Nicholas Nethercote
bbfc62ea8c 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
2003-11-02 17:43:27 +00:00
Nicholas Nethercote
9c8cc2ba2b 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
2003-11-02 17:00:23 +00:00
Nicholas Nethercote
c2e7583aa8 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
2003-11-02 16:32:05 +00:00
Nicholas Nethercote
858c09b74c 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
2003-11-02 16:27:39 +00:00
Nicholas Nethercote
91686661b2 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
2003-11-01 14:49:58 +00:00
Nicholas Nethercote
ddc388cfd7 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
2003-11-01 14:03:37 +00:00
Dirk Mueller
a38191f22b fix 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1977
2003-11-01 01:59:23 +00:00
Jeremy Fitzhardinge
d6fb2a6d85 Oops, add new files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1976
2003-10-31 18:52:18 +00:00
Jeremy Fitzhardinge
541f9f86f8 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
2003-10-31 07:13:41 +00:00
Jeremy Fitzhardinge
65649c9d47 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
2003-10-31 07:12:21 +00:00
Dirk Mueller
0a9c792ab0 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
2003-10-31 03:43:48 +00:00
Dirk Mueller
a32b99ae1f there have been reports that "stat" is not portable enough.
MERGE TO STABLE


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1972
2003-10-30 13:49:36 +00:00
Dirk Mueller
257aef7070 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
2003-10-30 13:41:26 +00:00
Dirk Mueller
2444e1036d make it really silent
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1970
2003-10-30 13:31:15 +00:00
Nicholas Nethercote
1cea4f647b 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
2003-10-30 12:34:47 +00:00
Nicholas Nethercote
c639f03452 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
2003-10-30 10:33:30 +00:00
Nicholas Nethercote
dadd326e87 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
2003-10-30 09:37:47 +00:00
Nicholas Nethercote
6afbad116a Added a regtest that uses pthreads -- there weren't any.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1966
2003-10-30 09:11:03 +00:00
Jeremy Fitzhardinge
047b9c3de8 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
2003-10-30 07:25:59 +00:00
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