Commit Graph

377 Commits

Author SHA1 Message Date
Nicholas Nethercote
344a3d78aa Add gettimeofday() to test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2990
2004-11-14 15:56:32 +00:00
Nicholas Nethercote
18c90ac917 Add missing params. Tom's nightly tests should work now.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2989
2004-11-14 15:55:06 +00:00
Nicholas Nethercote
4a6e2f7afb converted sigsuspend, rt_sigsuspend. Not very sure about them.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2988
2004-11-14 14:13:05 +00:00
Nicholas Nethercote
e0c74bbbfa converted a few more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2987
2004-11-14 13:42:51 +00:00
Nicholas Nethercote
da82e7dd7a converted some more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2986
2004-11-13 13:57:12 +00:00
Nicholas Nethercote
e10f7ac465 convert some more, mash some more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2979
2004-11-12 21:21:07 +00:00
Nicholas Nethercote
17ce7e1ba9 Add commented-out templates so further additions are easier.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2978
2004-11-12 21:00:08 +00:00
Nicholas Nethercote
66213608e7 converted some more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2976
2004-11-12 19:55:08 +00:00
Nicholas Nethercote
cdbb6cd2e1 and converted a few more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2974
2004-11-12 18:49:27 +00:00
Nicholas Nethercote
e3a2bb9405 renamed variables
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2973
2004-11-12 18:21:17 +00:00
Nicholas Nethercote
192c356143 converted some more
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2972
2004-11-12 18:20:12 +00:00
Nicholas Nethercote
c8d91069ed Use our own unistd.h, because the system one might be missing some of the
constants.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2970
2004-11-12 17:12:04 +00:00
Nicholas Nethercote
b54443644a Converted a whole bunch of syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2969
2004-11-12 17:07:26 +00:00
Nicholas Nethercote
0c0a684a6d Converted execve().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2968
2004-11-12 15:41:06 +00:00
Nicholas Nethercote
267ff3faac Converted vfork() and acct(). Properly annotated all the ones we don't handle,
plus a few we do.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2967
2004-11-12 14:57:34 +00:00
Nicholas Nethercote
691c66f51d Converted lookup_dcookie.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2966
2004-11-12 13:29:24 +00:00
Nicholas Nethercote
4a6c062608 CVS fixups: cvs add files I forgot to before; add .cvsignore entries.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2965
2004-11-12 11:25:39 +00:00
Nicholas Nethercote
ccdeacec51 Converted uname(); annotated some obsolete ones.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2964
2004-11-12 11:19:36 +00:00
Nicholas Nethercote
c235901341 Now handling non-existent syscalls appropriately -- just returning ENOSYS
rather than giving the warning about the syscall being missing.  (Nb: this only
applies to syscall numbers for which the kernel has no corresponding syscall;
Valgrind will still give that warning if new syscalls are added to the kernel.)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2962
2004-11-11 19:43:50 +00:00
Nicholas Nethercote
f49d300804 Converted fork(), and added a separate regtest for it.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2961
2004-11-11 19:03:34 +00:00
Nicholas Nethercote
9f628720a2 Converted a bunch more syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2960
2004-11-11 18:00:47 +00:00
Nicholas Nethercote
4a31c80382 Converted a bunch of zero-arg syscalls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2959
2004-11-11 16:38:21 +00:00
Nicholas Nethercote
22f3dd16c0 augmented scalar
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2957
2004-11-10 18:59:57 +00:00
Nicholas Nethercote
7c0a206e62 Converted __NR_{mount,getpid,getppid}.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2954
2004-11-09 16:45:33 +00:00
Nicholas Nethercote
fff1483600 - Convert open() to the new syscall regime.
- Improve scalar regtest;  I will add new syscalls to it as I convert them.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2953
2004-11-09 16:20:46 +00:00
Nicholas Nethercote
a2954cd68b Improved memcheck/tests/scalar so that it shows an example whereby the syscall
number itself is undefined.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2950
2004-11-08 19:30:08 +00:00
Nicholas Nethercote
b55751404f Improved Memcheck's error checking messages in two significant ways:
- All memory-related errors are now clear whether they are caused by
  unaddressable or uninitialised memory.  (Previously, writes were
  clearly addressability errors, but reads could be either.)  Mostly
  done by replacing the 'isWrite' field in MAC_Error with 'isUnaddr'.
  Also, mc_check_readable() now indicates not just if an error occurred,
  but what kind of error (ie. addressability or definedness).

- Put machinery into place in the core to inform tools when registers
  are being read by the core -- ie. a 'pre_reg_read' event.  Most
  notably, this facilitates syscall scalar arg definedness checking for
  Memcheck.  Currently this is only working for read(), write(), exit()
  and exit_group(), but it will be extended as the syscalls are
  overhauled as part of the arch-abstraction work.

  A consequence of this is that the ParamErr messages have changed.  This:

    Syscall param write(buf) contains uninitialised byte(s)

  now means that the pointer 'buf' is partially undefined.  If the memory
  pointed to by 'buf' is partially undefined or unaddressable, it says one of:

    Syscall param write(buf) points to uninitialised byte(s)
    Syscall param write(buf) points to unaddressable byte(s)

  The docs have been updated accordingly.

  I also added a couple of regression tests.

These two change sare notable for being the first improvements to
Memcheck's checking/errors in a long time.

I also folded mc_clientreqs.c into mc_main.c, which saves exporting a
whole bunch of things that are not used anywhere else.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2949
2004-11-08 19:20:09 +00:00
Nicholas Nethercote
e6b394151e Add very thorough string functions test from glibc.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2944
2004-11-07 10:58:19 +00:00
Nicholas Nethercote
6030b047a8 Remove writev.stderr.exp3 -- not necessary if we pass -q to Valgrind.
Add writev.stderr.exp2 to the Makefile.am so it gets included in the distro.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2939
2004-11-05 13:45:53 +00:00
Nicholas Nethercote
df6d264d08 Make the checking of poll() more accurate.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2938
2004-11-05 12:02:27 +00:00
Nicholas Nethercote
3fb5db9b49 Order wibble
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2937
2004-11-05 11:09:53 +00:00
Nicholas Nethercote
cc936a9c7c 64-bit cleanness: convert client requests to receive and return UWords.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2921
2004-11-04 18:22:28 +00:00
Nicholas Nethercote
6451cc22a2 64-bit cleanness: lots more replacing of UInt with UWord as necessary.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2920
2004-11-04 18:03:06 +00:00
Nicholas Nethercote
528046b537 64-bit cleanness: make the hash-table have UWord keys instead of UInt keys.
Allows addresses as keys.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2916
2004-11-04 16:39:43 +00:00
Nicholas Nethercote
65b45124ad 64-bit cleanness: replace hard-wired 0xffffffff literals with something less
32-bit-specific.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2914
2004-11-04 13:49:28 +00:00
Nicholas Nethercote
d8fc746ba4 64-bit cleanness: Yet more UInt-->SizeT changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2910
2004-11-03 18:10:37 +00:00
Nicholas Nethercote
d98a43bc4f 64-bit cleanness:
- Use SizeT instead of UInt for new_mem_stack and all the related functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2907
2004-11-02 13:06:32 +00:00
Nicholas Nethercote
e245f2aeb0 64-bit cleanness: Converted malloc() et al to use SizeT rather than Int.
This required some tricks with casting to maintain Memcheck's silly (ie.
negative) arg checking.  The allocator was also changed accordingly. It
should now be able to allocate more than 4GB blocks on 64-bit platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2906
2004-11-02 12:36:02 +00:00
Nicholas Nethercote
b48ba617e0 Don't need to use addr_t anymore, use Addr instead, for consistency.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2897
2004-11-01 18:38:00 +00:00
Nicholas Nethercote
e0ff83bc39 - Make find_auxv() word-size independent.
- Introduced a new file, basic_types.h, for the basic types (eg. Int, Word).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2896
2004-11-01 18:22:05 +00:00
Nicholas Nethercote
c4cf15dc21 Arch-abstraction:
- Added include/x86-linux/ and include/linux/ subdirectories, with Makefile.am
  files.

- Overhauled the definitions of kernel types.  include/vg_kerneliface.h is now
  three files, include/linux/vki.h, include/x86-linux/vki_arch.h, and
  include/x86-linux/vki_arch_posixtypes.h.  These files separate the
  common/Linux and x86/Linux parts cleanly.  All code is copied verbatim from
  the relevant kernel headers, except that VKI_/vki_ prefixes are added as
  necessary to distinguish them from glibc types.  (This is done consistently,
  unlike previously when some types did not have the prefixes.)

  All code is clearly marked to show which particular header file it came from,
  and the Linux version used.  (I used 2.6.8.1, the most recent stable release,
  for all of them.)

  A few of the types changed;  this is because they changed between the older
  versions of Linux and the current 2.6.8.1.  I checked that all these changes
  were ok with respect to backwards compatibility for our purposes.

- vg_unsafe.h has been removed;  we are no longer including any kernel headers,
  as we have our own copies for everything.  This is because installed kernel
  headers are not reliable, and often cause compilation problems. (bug
  #92420 is a recent example)

- Removed some no-longer-needed header-presence tests from configure.in.

- Some code in the rest of Valgrind was changed to account for some slight
  changes in the names of our VKI_/vki_ kernel constants and types.

- Updated README_MISSING_SYSCALL_OR_IOCTL accordingly.

- Fixed off-by-one error with VKI_GDT_ENTRY_TLS_MAX (merged from stable branch)

The end result is that the kernel types situation should be much clearer, and
similar files can be created relatively easily for other architectures as
necessary.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2884
2004-10-31 18:48:21 +00:00
Tom Hughes
f26e2b482f Add some alternate test results for glibc 2.2.5 systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2882
2004-10-31 11:31:16 +00:00
Tom Hughes
e45ef10b13 Update expected output for pth_once in memcheck tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2870
2004-10-28 13:52:51 +00:00
Nicholas Nethercote
a5c3267d90 Jump through a hoop to make vgtest_ume work again on PIE-supporting systems.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2859
2004-10-27 12:05:59 +00:00
Nicholas Nethercote
6ff3d742f9 Avoid strange warnings about dereferencing type-punned pointers that occurs
with GCC 3.3+.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2839
2004-10-25 19:46:07 +00:00
Nicholas Nethercote
ac36b57353 Fix "make check" for when src_dir != build_dir
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2826
2004-10-21 14:07:58 +00:00
Nicholas Nethercote
d343add11a Build vg_replace_malloc.c into a library, because it makes the Makefiles a bit
neater.  Also remove some dodgy CFLAGS+= lines.

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


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2825
2004-10-20 18:40:40 +00:00
Nicholas Nethercote
26e657b4df Make tests that cause coredumps remove them. Don't need the core entries in
.cvsignore any more as a result.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2822
2004-10-20 13:33:07 +00:00
Nicholas Nethercote
41897a01a9 Arch-abstraction:
- move remaining x86-specific Memcheck tests into an x86/ subdir.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2817
2004-10-20 11:43:01 +00:00
Nicholas Nethercote
78b8e2c67f Arch-abstraction:
- things I forgot to do when moving the insn_* tests...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2810
2004-10-19 19:07:32 +00:00