Commit Graph

170 Commits

Author SHA1 Message Date
Bart Van Assche
eeff5a2b8e Updated expected output files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9242
2009-02-23 08:46:42 +00:00
Nicholas Nethercote
2ae89cee5d Get rid of all "make check" compile warnings, except for the ones from
fxtract.c.

Also, gets rid of some of the warnings that -Wextra finds in Massif.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9237
2009-02-23 06:44:51 +00:00
Nicholas Nethercote
de920a14ce A few more test/build changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9228
2009-02-23 01:33:40 +00:00
Nicholas Nethercote
a6448a3006 Test files were being passed multiple arch options (eg. "-m32 -m64") when
built.  This worked fine on the x86/Linux and AMD64/Linux but broke
ppc*/Linux.  This commit fixes the problem.  Thanks to Bart for spotting it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9222
2009-02-22 23:38:10 +00:00
Bart Van Assche
54c522f31e Updated documentation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9216
2009-02-22 09:29:07 +00:00
Bart Van Assche
9078874b5c Added regression test for detection of unsynchronized pthread_barrier_wait() and pthread_barrier_delete() calls.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9215
2009-02-22 09:26:22 +00:00
Bart Van Assche
0a290f86cb - Bug fix: swapped order of VG_(OSetGen_Remove)() and
(*p->any.cleanup)(p) such that the "first observed at" information is
  now included in error messages.
- Performance optimization: started using VG_(OSetGen_ResetIterAt)().


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9214
2009-02-21 16:17:50 +00:00
Bart Van Assche
a93bb715dd Updated test plan.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9213
2009-02-21 16:13:50 +00:00
Bart Van Assche
aaef6d016e Changes:
- pthread_barrier_wait() intercept now passes the information to the DRD
  tool whether or not this function returned
  PTHREAD_BARRIER_SERIAL_THREAD. This information is now displayed when
  the command-line option --trace-barrier=yes has been specified.
- Changed the cleanup functions for client objects that are called just
  before a thread stops into callback functions.
- Added DRD_(clientobj_delete_thread)().
- Removed DRD_(clientobj_resetiter)(void) and DRD_(clientobj_next)().
- Added test for race conditions between pthread_barrier_wait() and
  pthread_barrier_destroy() calls. An error message is now printed if
  this condition has been detected.
- Bug fix: pthread_barrier_delete() calls on barriers being waited upon
  are now reported.
- Removed DRD_() wrapper from around the name of some static variables and
  functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9211
2009-02-21 15:27:04 +00:00
Bart Van Assche
2d732560b7 Documentation updates.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9208
2009-02-21 09:39:09 +00:00
Bart Van Assche
840f16dda7 Moved drd/tests/pth_barrier.c, drd/tests/rwlock_race.c and
drd/tests/rwlock_test.c back to their original location.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9206
2009-02-20 19:00:18 +00:00
Nicholas Nethercote
c8d150dbaa Various build system clean-ups and simplifications:
- Created Makefile.tool-tests.am, put standard AM_CFLAGS et al for tests in
  it.
- A number of tests are shared between Helgrind and DRD.  They used to be
  built in both directories.  Now they are only built in helgrind/tests/,
  and the DRD .vgtest files just point to the executable in helgrind/tests/.
  Most of these (about 30) had the source files in helgrind/tests/;  I moved
  the three that were in drd/tests/ into helgrind/tests/ for consistency.
- Fixed rwlock_test, which was failing to run due to a wrong name in the
  .vgtest file.
- Removed remnants of unused 'hello' test for Memcheck.
- Avoided redundant flag specification in various places, esp.
  memcheck/tests/Makefile.am.
- Removed unnecessary _AIX guards in some Linux-only tests.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9202
2009-02-19 09:52:05 +00:00
Nicholas Nethercote
3ed4532cde In the core, include malloc_usable_size() as one of the functions that must
be replaced if malloc() et al are replaced by a tool.  This is because
different tools implement the function in different ways.

Add an appropriate malloc_usable_size() replacement to each of Memcheck,
Helgrind, DRD, Ptrcheck, Massif.

Update memcheck/tests/malloc_usable and add massif/tests/malloc_usable.

Merged from the DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9193
2009-02-17 04:31:18 +00:00
Nicholas Nethercote
41aab1bfa5 Remove unused filter scripts from DRD.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9187
2009-02-17 00:32:58 +00:00
Bart Van Assche
b71a8e5966 - Updated copyright statements.
- Improved consistency of source file headers.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9182
2009-02-16 19:43:56 +00:00
Bart Van Assche
21242b42b2 Just as for the regression tests of other Valgrind tools, do not explicitly state that these are licensed under the GPLv2 license but leave this implicit.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9181
2009-02-16 19:42:17 +00:00
Nicholas Nethercote
cf6cd2bb31 Stack traces for Memcheck's syscall param errors are terribly unreliable, so
I changed it to just filter the entire stack trace out for these errors (both
normal and XML cases).  The syscall name is still present in the error
string.  This allows a one or more alternative expected output files to be
removed for several tests, which is A Very Good Thing.

Also, I killed filter_test_paths because it was weird and clumsy and the
above change obviated most of its use and the remaining effects could be
achieved in other ways.

Also, I fixed up the scalar* tests a little and they now pass on my machine,
(and hopefully at least some other machines) for the first time ever!


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9178
2009-02-16 05:11:49 +00:00
Bart Van Assche
e8278d92ac drd_bitmap_test compiles again.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9173
2009-02-15 16:18:03 +00:00
Bart Van Assche
737b0449dc Wrapped DRD_() macro around yet even more function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9172
2009-02-15 15:59:20 +00:00
Bart Van Assche
c13f1a4f74 Wrapped DRD_() macro around even more function and variable names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9171
2009-02-15 14:46:17 +00:00
Bart Van Assche
cadc14611e Wrapped DRD_() macro around even more function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9170
2009-02-15 14:18:02 +00:00
Bart Van Assche
259b5ac2da Changed a global variable into a local variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9169
2009-02-15 13:16:52 +00:00
Bart Van Assche
8dd5b6ceb8 Wrapped DRD_() macro around thread-related function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9168
2009-02-15 13:11:14 +00:00
Bart Van Assche
ae7c8b899e Wrapped DRD_() macro around global and static variables in drd_thread.[ch].
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9167
2009-02-15 12:14:52 +00:00
Bart Van Assche
280e61760d Wrapped DRD_() macro around all client object function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9166
2009-02-15 11:34:57 +00:00
Bart Van Assche
1a06b087d8 Wrapped DRD_() macro around all barrier-related function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9165
2009-02-15 11:00:29 +00:00
Bart Van Assche
2cadc31ad0 Restored the previous method for passing arguments from the creator thread to the created thread, since the new approach made some regression tests fail. It is not yet clear to me why.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9164
2009-02-15 10:40:44 +00:00
Bart Van Assche
f2d278014e Added more comments / rearranged function order.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9163
2009-02-15 10:38:37 +00:00
Bart Van Assche
ce938fd90d Changed the order of the function definitions.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9162
2009-02-15 10:36:32 +00:00
Bart Van Assche
6dacd9c6ff Cleaned up the source code of the atomic_var regression test, without changing the actual test.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9161
2009-02-15 10:19:35 +00:00
Bart Van Assche
a2f849972f Wrapped DRD_() macro around all segment function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9160
2009-02-14 17:19:58 +00:00
Bart Van Assche
c5f4cc3cf1 Wrapped DRD_() macro around all vector clock function names.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9159
2009-02-14 16:55:19 +00:00
Bart Van Assche
498c9afeb5 Introduced more DRD_ prefixes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9158
2009-02-14 16:10:53 +00:00
Bart Van Assche
9353dd404e - Moved several functions and variables from one source file to another.
- Created two new source files: drd_load_store.h and .c.
- Removed the header file drd_track.h.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9153
2009-02-14 15:13:31 +00:00
Bart Van Assche
05120707d2 Added a missing #include directive.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9152
2009-02-14 14:49:23 +00:00
Bart Van Assche
5a950f3e74 Relaxed an assert statement: a thread canceled by pthread_cancel() can really exit with synchr_nesting > 0.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9151
2009-02-14 14:46:16 +00:00
Bart Van Assche
233320f614 Added DRD_(spinlock_init_or_unlock)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9150
2009-02-14 12:14:50 +00:00
Bart Van Assche
0a804bd7c6 - Performance improvement: eliminated busy waiting from thread creation.
- Applied DRD_() prefix to all names of functions that are not
  intercepts of client code.
- Removed superfluous include directive, namely #include <inttypes.h>.
- Removed hack for suppressing false positive reports on stdio / stderr
  because recently a suppression pattern was added for these races.
- Removed unused code and declarations.
- Added more comments.
- Updated copyright statement.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9149
2009-02-14 12:12:57 +00:00
Bart Van Assche
99249d56d6 Renamed vg_thread_wrapper() into DRD_(thread_wrapper)().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9148
2009-02-14 11:54:42 +00:00
Bart Van Assche
393e10e13b Updated copyright statement.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9147
2009-02-14 10:58:45 +00:00
Bart Van Assche
27f484bc70 Added file to repository.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9146
2009-02-14 10:14:09 +00:00
Nicholas Nethercote
f3240d6950 Filter out everything after "(below main)" in a line. This will help with
Darwin, for which such entries can occur within the executable, rather than
within libc.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9142
2009-02-12 00:51:50 +00:00
Nicholas Nethercote
947f9faaba Merge part of r9129 (factor out duplicated Z-encodings of names) from the
DARWIN branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9130
2009-02-10 04:23:41 +00:00
Bart Van Assche
fc97849a4c Switched from the Apache License to a BSD-style license in order to reduce the number of licences that applies to the source code of Valgrind.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9122
2009-02-08 17:42:12 +00:00
Bart Van Assche
f93d44456f Do not only recognize .plt and .plt.got sections inside the mapped address range, but also outside the mapped address range (necessary for ppc).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9090
2009-01-30 17:52:21 +00:00
Nicholas Nethercote
ed322feb84 Rename all the arch/OS/platform-related variables in configure.in to make it
clearer what they mean:
- They all have VGCONF_ prefixes now, to indicate they come out of
  configure.in (and are clearly distinguished from the VGA_/VGO_/VGP_
  #defines passed in to C files).
- The ones that refer to the primary *or* secondary platform have _INCLUDES_
  in them.
- The ones that are in all-caps have a _CAPS suffix.

So, for example, what was VGP_X86_LINUX is now
VGCONF_PLATFORMS_INCLUDE_X86_LINUX, which is more verbose but also a lot
clearer.  The names of the #defines used in the C files (VGA_x86, VGO_linux,
etc) are unchanged.

cputest.c: changed to reflect the Valgrind installation's capabilities,
rather than the machine's capabilities.  In particular, if
--enable-only32bit is used on a 64-bit machine, then this program will claim
to only support 32-bits.  Also use the VGA/VGO/VGP macros which are clearer
than the __i386__ ones.  (This is partially merged from the DARWIN branch.)

configure.in: clean up the comments, distinguish different sections more
clearly, and generally make it more readable.

valgrind.pc.in: try to make this more accurate.  I doubt anyone's using it.
It doesn't appear to be set up to handle dual-architecture builds.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9031
2009-01-22 21:56:32 +00:00
Nicholas Nethercote
74e8c02cea A couple more changes to fix the conditional building of DRD tests.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9002
2009-01-20 22:54:50 +00:00
Bart Van Assche
b10b90dd0d Added yet another output variant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9001
2009-01-20 14:29:52 +00:00
Bart Van Assche
ce5fd5bf82 Added yet another output variant.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9000
2009-01-20 14:25:22 +00:00
Bart Van Assche
4e7dcd66bc Elaborated prereq clauses.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8999
2009-01-20 14:18:29 +00:00