116 Commits

Author SHA1 Message Date
Nicholas Nethercote
e367976dde Improve pth_cvsimple test in two ways:
1. Make the output deterministic;  different thread interleaving from expected
was causing failures for me.

2. Make it actually use the condition variable -- the condvar stupidly wasn't
actually being used in the expected case, because the other threads finished
all their work before pthread_cond_wait() even got called, and this prevented
the condition guarding pthread_cond_wait() from succeeding.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2952
2004-11-09 14:58:02 +00:00
Nicholas Nethercote
f96382c67c Fix broken alternative output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2887
2004-10-31 19:50:22 +00:00
Tom Hughes
bdf9406d34 Remove the thread numbers from the messages output by pth_once so that
the order the threads run in doesn't affect the output.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2868
2004-10-28 13:39:52 +00:00
Nicholas Nethercote
0ff0bcde9d Make as_shm less brittle.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2856
2004-10-26 16:31:19 +00:00
Nicholas Nethercote
df61e3043d Tweak as_mmap for the possibility of a PIE-supporting system with a 4GB user
space.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2855
2004-10-26 16:30:01 +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
08b1be646a as_shm wasn't being included in 'make dist'.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2813
2004-10-19 19:39:59 +00:00
Tom Hughes
e7e79a576f Remove the limit on the number of pthread read/write locks. This works
in a similar way to the previous patch that removed the limit on the
number of semaphores and fixes bug 86264.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2776
2004-10-16 14:49:53 +00:00
Tom Hughes
58ae591be6 Suppress .stderr.diff2 files as well as .stderr.diff files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2774
2004-10-16 11:02:33 +00:00
Tom Hughes
98b5592107 Add alternate results for some tests that use mmap.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2755
2004-10-13 16:48:21 +00:00
Nicholas Nethercote
13a74aa53a Arch-abstraction: renamed "vg_skin.h" as "tool.h". Kept a residual vg_skin.h
(which just #includes tool.h) for backward-compatibility.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2647
2004-09-02 08:51:43 +00:00
Nicholas Nethercote
a32b040099 Update .cvsignore for recently added regression tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2642
2004-09-01 23:34:37 +00:00
Nicholas Nethercote
acd57ac595 Use Makefile.am includes. This gets rid of 110 lines of repetitive Makefile.am
cruft, yay!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2641
2004-09-01 23:20:49 +00:00
Nicholas Nethercote
0db27515b1 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
2004-08-25 11:40:07 +00:00
Nicholas Nethercote
1bd17a3d0f Remove a bunch of unnecessary -DVG_LIBDIR="\"$(libdir)"\" arguments in
Makefile.am files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2597
2004-08-23 14:02:03 +00:00
Tom Hughes
42c7adce45 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
2004-08-14 15:37:59 +00:00
Tom Hughes
a2a0946b8a Make VPATH builds work so that valgrind can be built in a different
directory from the source tree. This resolves bug 83040.

Based on patch from Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2450
2004-06-29 09:45:37 +00:00
Nicholas Nethercote
58ae9c9722 Update .cvsignore files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2434
2004-06-22 14:01:40 +00:00
Tom Hughes
83780627b5 It appears that NPTL uses a new system for dealing with cleanup
handlers when a thread is cancelled which has the side effect that
programs linked with librt fail on Fedora Core 2 due to librt having
been built against the NPTL header instead of the old pthread headers.

This change extends valgrind's libpthread.so to handle both the old
and new style cleanup handlers in a similar way to NPTL and seems to
be sufficient to get programs linked with librt working again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2405
2004-06-12 12:58:22 +00:00
Jeremy Fitzhardinge
82aaa16ef9 Fix "make distcheck", and also make sure that the generated archive
contains everything needed to "make regtest".  Bump the version.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2308
2004-03-12 10:51:39 +00:00
Tom Hughes
af675e0fea Anonymise path names for libc's built with debg symbols.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2305
2004-03-09 09:59:26 +00:00
Tom Hughes
41028e4b60 Add some alternate regression test results for older libc's.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2294
2004-03-07 19:40:33 +00:00
Tom Hughes
8c9a6c3e2d Changed the fdleak tests to explicitly attach /dev/null as the standard
input so that the output is well known regardless of whether the test is
run from a terminal or from cron.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2276
2004-02-29 12:02:32 +00:00
Nicholas Nethercote
ec45a3d7e7 Remove system-dependent output from test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2258
2004-02-22 17:24:01 +00:00
Nicholas Nethercote
2df352f28f Remove address from output, which varies from machine to machine and causes
failure.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2196
2004-01-09 16:15:06 +00:00
Nicholas Nethercote
07b8e3438b Updated copyright dates for 2004. Also added a couple of missing headers and
footers to some new files.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2177
2004-01-04 16:43:23 +00:00
Dirk Mueller
6a73cf3d05 portability
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2171
2004-01-03 15:02:59 +00:00
Jeremy Fitzhardinge
822231c4b0 Add and delete all the files which need adding and deleting.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2119
2003-12-16 02:14:00 +00:00
Jeremy Fitzhardinge
918c3a7b7e This jumbo-checkin is the Full Virtualization checkin. This eliminates
Valgrind's dependency on the dynamic linker for getting started, and
instead takes things into its own hands.

This checkin doesn't add much in the way of new functionality, but it
is the basis for all future work on Valgrind.  It allows us much more
flexibility in implementation, and well as increasing the reliability
of Valgrind by protecting it more from its clients.

This patch requires some changes to tools to update them to the changes
in the tool API, but they are straightforward.  See the posting "Heads
up: Full Virtualization" on valgrind-developers for a more complete
description of this change and its effects on you.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2118
2003-12-16 02:05:15 +00:00
Jeremy Fitzhardinge
e77d4b8d7e When merging multiple symbols with the same address, rather than always
choosing the longest symbol, choose the longest ignoring any of the libc
junk prefixes like __libc_, __, __GI_*, etc.  This makes the symbol
presented to the user in messages and used in *.supp files more consistent
and comprehensible.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2114
2003-12-15 09:00:21 +00:00
Jeremy Fitzhardinge
c0a0101d40 Update regtest to match new error message
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2109
2003-12-14 06:50:36 +00:00
Julian Seward
80a34b21d6 Un-break 'make distcheck' yet again. I guess someone somewhere understands
how autoconf/automake really work, but not me :-)  What's the difference
between $(srcdir) and $(top_srcdir) (eg in coregrind/Makefile.am) ?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2104
2003-12-13 03:07:40 +00:00
Jeremy Fitzhardinge
144c2fa42c Fix bug 69836: make record_fd_open ignore fds > VG_MAX_FD.
CCMAIL: 69836-done@bugs.kde.org


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2103
2003-12-12 07:46:54 +00:00
Nicholas Nethercote
9ed3ee613b Add #includes to avoid compile warnings.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2093
2003-12-04 16:12:21 +00:00
Nicholas Nethercote
4fdbe49d12 Fix more "make dist" borkage
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2092
2003-12-04 16:03:54 +00:00
Nicholas Nethercote
458e039447 Fix Makefile.am so "make dist" works.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2091
2003-12-04 15:13:47 +00:00
Nicholas Nethercote
d6d804d382 Updated all "report bugs to..." messages to point to valgrind.kde.org; also
updated the docs to refer to valgrind.kde.org instead of the old website.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2055
2003-11-20 16:20:55 +00:00
Dirk Mueller
7b252e6097 updating .cvsignore
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2038
2003-11-19 00:55:44 +00:00
Robert Walsh
f9ea43d896 Add a facility for tracking open file descriptors. Information about
still open files is dumped out exit.  Enabled using the --track-fds
switch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2031
2003-11-17 17:45:00 +00:00
Nicholas Nethercote
d38eac1bf6 Made the warning clearer when you try to catch SIGKILL/SIGSTOP. Also made it
clearer what's wrong if you try to catch signals 32 and 33;  they're not bad
signals, just used internally.  Updated one regtest accordingly.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2030
2003-11-17 10:37:19 +00:00
Nicholas Nethercote
fb2d543ee8 Started to rescind the name "skin", replacing it with "tool". Did this in all
the places that normal users will see:

  - command line: --tool=foo (although --skin=foo still works)
  - docs: removed all traces (included renaming coregrind_skins.html to
    coregrind_tools.html)
  - in the usage messages
  - in error messages

Also did in in some places that I judged were unlikely to cause clashes with
existing workspaces:

  - in the header comments of many files (eg. "This file is part of Memcheck, a
    Valgrind tool for...")
  - in the regtests script
  - in the .supp files
  - in AUTHORS
  - in README_MISSING_SYSCALL_OR_IOCTL

Also update the AUTHORS file to mention Jeremy.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2027
2003-11-14 17:47:54 +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
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
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
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
6b57397875 This commit fixed some bugs in error and suppression handling. Basically, I
had forgotten that some errors (PThread errors) are found by the core, rather
than skins and so the skin shouldn't be involved in handling them.  This commit
fixes the problem.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1770
2003-07-21 10:38:23 +00:00
Julian Seward
a22d206634 Make sure all the regression tests get included in the tarball created
by 'make dist'.  Being the release dude is so exciting!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1761
2003-07-16 19:03:10 +00:00
Julian Seward
9ca4c6db9e Run this test -q
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1748
2003-07-11 00:17:54 +00:00
Julian Seward
45780eac75 Give corecheck a SK_(update_extra) so it doesn't panic on
corecheck/tests/res_search.

Nick, I have no idea if this is correct; can you check?


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1744
2003-07-10 23:29:22 +00:00