Commit Graph

51 Commits

Author SHA1 Message Date
Bart Van Assche
4c1cf5e2b2 Converted several assertions into error messages.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7461
2008-02-25 19:46:14 +00:00
Bart Van Assche
7942f5b386 The mutex address may now be left zero when triggering a MutexErr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7460
2008-02-25 19:40:14 +00:00
Bart Van Assche
c154161128 Added output for the case where the data race is detected in thread 3.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7459
2008-02-25 17:29:13 +00:00
Bart Van Assche
92670fc0bc Renamed pth_barrier.stderr.exp into pth_barrier.stderr.exp-thread2.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7458
2008-02-25 17:26:23 +00:00
Bart Van Assche
230d5ae2a9 Updated to do list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7451
2008-02-24 18:47:12 +00:00
Bart Van Assche
c511cfb968 Added --trace-csw and --trace-danger-set. Removed commented out code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7450
2008-02-24 18:46:05 +00:00
Bart Van Assche
4de6696003 Fixed race conditions in client pthread_barrier_wait() intercept code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7449
2008-02-24 18:42:53 +00:00
Bart Van Assche
22fb174482 Corrected various comments. Removed commented out code. Added code for tracing thread context switches and danger set updating. Fixed memory leak. Danger set is now updated every time a new segment is created instead of only at every context switch, which fixes the bug that no data races were reported for the pth_barrier test program.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7448
2008-02-24 18:37:08 +00:00
Bart Van Assche
cfbcb71d62 Fixed a memory leak.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7447
2008-02-24 18:29:43 +00:00
Bart Van Assche
706322759c Cleanup: moved const keyword in front of datatype.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7446
2008-02-24 18:29:10 +00:00
Bart Van Assche
e8318110de Cleanup: removed commented out code.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7445
2008-02-24 18:28:19 +00:00
Bart Van Assche
7bc2463c75 Minor change: renamed one variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7444
2008-02-24 18:27:11 +00:00
Bart Van Assche
c09c140625 Added vc_assign() function.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7443
2008-02-24 18:26:46 +00:00
Bart Van Assche
59dc2d89a1 Cleanup: removed old data race detection algorithm implementation.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7442
2008-02-24 18:25:43 +00:00
Bart Van Assche
f96ea34f6c Fixed a memory leak and renamed one variable.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7441
2008-02-24 18:22:37 +00:00
Bart Van Assche
e33a9f9046 Added more debugging output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7440
2008-02-24 18:21:12 +00:00
Bart Van Assche
f701eba29b Fixed output.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7439
2008-02-24 18:19:09 +00:00
Bart Van Assche
a51563ace8 Various minor changes.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7438
2008-02-24 18:18:23 +00:00
Bart Van Assche
6be1f7fbdf Whitespace-only change.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7437
2008-02-24 18:16:56 +00:00
Bart Van Assche
04bb759fac Added a section about programming with threads, added an acknowledgements section and added more references.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7433
2008-02-21 20:32:57 +00:00
Bart Van Assche
944eb10418 Rewrote the README.txt document.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7420
2008-02-17 18:51:06 +00:00
Bart Van Assche
1f2f191cbc Updated to do list.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7419
2008-02-17 18:13:00 +00:00
Bart Van Assche
f828285af9 Fix exp-drd Fedora 8 tc18_semabuse regression test failure. It is okay to leave out the tl_assert(waited) statement because this statement is only triggered in case sem_post() fails, and sem_post() currently only fails when called on something that is not a semaphore.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7417
2008-02-17 09:21:05 +00:00
Julian Seward
5679a22410 Update copyright dates ("200X-2007" --> "200X-2008").
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398
2008-02-11 11:34:59 +00:00
Julian Seward
1bb74c0cc0 Fix race condition in sem_post() wrapper (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7395
2008-02-11 11:00:51 +00:00
Julian Seward
ca86507864 Make exp-drd regression tests succeed when glibc-debuginfo is
installed.  (Bart Van Assche)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7388
2008-02-09 14:51:41 +00:00
Julian Seward
20e0f4893f Fix 'make dist' -- don't list nonexistent files for inclusion in the
tarball.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7366
2008-02-03 12:46:45 +00:00
Julian Seward
02c9054a2b drd changes (Bart Van Assche)
- The exp-drd regression tests now run without producing assertion
failures and without hanging on Red Hat 7.3. It doesn't make sense
however to run exp-drd on Red Hat 7.3 -- while exp-drd works fine with
the NPTL, more work would be required to make exp-drd work with
linuxthreads.
- Converted several tl_assert() calls into error messages.
- Added a regression test called pth_barrier, which tests whether data
races are detected in a program that uses barriers. The output exp-drd
produces for this test program is not yet correct however.
- Updated exp-drd/TODO.txt.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7358
2008-01-21 14:19:07 +00:00
Julian Seward
994193f9bb Regtest/stability changes for drd (Bart Van Assche)
- Fix helgrind/tests/tc18_semabuse.c on glibc 2.7 (RedHat 8).

- Fixed a glibc 2.7 specific assertion failure in exp-drd, namely one
  that was triggered when sem_post()'s return value is not zero.

- exp-drd/test/matinv.c compiles now also on RedHat 7.3.

Note: more work will be required to get exp-drd working correctly on
RedHat 7.3.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7354
2008-01-18 07:42:01 +00:00
Julian Seward
22b3fe2a3e DRD updates (Bart Van Assche):
- Updated copyright statement: replaced 2006-2007 by 2006-2008.
- Added copyright statement in the files where it was missing
(drd_track.h and drd_clientreq.c)
- Eliminated dependencies on core header files -- there are no more
#include "pub_core....h" directives in the exp-drd source code.
- Added semaphore support.
- Added barrier support.
- Added pthread_mutex_timedlock() support.
- Stack depth of stack traces printed by exp-drd can now be set via
--num-callers=...
- Added command-line option --trace-barrier=[yes|no].
- Added regression test for pthread_barrier() (matinv, a program that
performs matrix inversion).
- Added regression test sem_as_mutex, which tests whether race
detection works correctly when a semaphore is used to ensure mutual
exclusion of critical sections.
- Some of helgrind's regression tests are now used to test both
helgrind and exp-drd: tc17_sembar and tc18_semabuse.
- Cleaned up bitmap implementation code now that the const keyword has
been added to the declarations of the OSet functions.
- Cleaned up exp-drd/Makefile.am
- Updated exp-drd/TODO.txt




git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7346
2008-01-14 11:54:56 +00:00
Tom Hughes
6899f1cad3 Add drd suppression file to the default suppressions and avoid
including core headers in the drd tool.

Patch from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7318
2008-01-05 00:12:45 +00:00
Tom Hughes
0ee51fd825 Add missing include to fix compiler warning.
Patch from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7315
2008-01-04 23:57:15 +00:00
Julian Seward
78e156ef4c Rename drd_preloaded.c to drd_intercepts.c (Bart Van Assche)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7312
2008-01-04 11:36:41 +00:00
Tom Hughes
d3def869f3 Mark the main thread as running while the initial memory declarations
are made to the tool so that the tool can associate that memory with
the main thread if it wishes.

Also cleanup existing hacks in the drd tool which worked around the
fact that the core did not set the current thread while declaring the
initial memory.

Path from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7310
2008-01-02 10:13:04 +00:00
Tom Hughes
94286fd840 Stop drd trying to get a backtrace when there is no stack pointer.
Patch from Bart Van Assche <bart.vanassche@gmail.com>.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7309
2008-01-02 10:07:44 +00:00
Julian Seward
3ab1602cce Add missing file to tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7285
2007-12-09 02:21:22 +00:00
Julian Seward
de4d2156cc DRD changes (Bart Van Assche)
* Add docs: exp-drd/docs/README.txt
* Added one drd suppression pattern, and cleaned up the suppression file.
* All regression tests now pass on x86_64 and i386, including sigalrm.
* Updated TODO.txt file.
* pth_create_chain test is now started with 100 threads instead of 10
  -- 10 was not enough.
* DRD no longer exits on PPC32 and PPC64 but just prints a warning
  message before it starts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7275
2007-12-04 21:27:18 +00:00
Julian Seward
9fbe42bfca Only pass valid ThreadIDs to VG_(record_ExeContext). (Bart Van Assche)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7261
2007-12-01 02:09:50 +00:00
Julian Seward
8d0427b2f4 Include headers in tarball.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7255
2007-11-30 15:28:13 +00:00
Julian Seward
ec903846a6 Remove pthread_object_size.h and associated hardwired constants.
(Bart Van Assche)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7252
2007-11-30 08:30:29 +00:00
Julian Seward
6b37c2e40e Make it compile on AIX, even if the result doesn't do anything useful.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7245
2007-11-28 01:27:03 +00:00
Julian Seward
f633404bb7 Fix compilation on older Linux distros (Bart Van Assche)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7244
2007-11-27 23:39:13 +00:00
Julian Seward
2a219917db Translate the drd regtests from C++ to C. (Bart Van Assche).
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7238
2007-11-27 01:59:38 +00:00
Julian Seward
519f7dba03 drd: make the build silent regardless of platform, and abort at
startup with a message if a not supported platform, like
     Omega.

omega: make the platform-not-supported-message a bit nicer.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7228
2007-11-26 21:34:30 +00:00
Julian Seward
eb0d6e9ede Don't break the build on unknown (to drd) platforms.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7225
2007-11-26 06:03:05 +00:00
Julian Seward
10d34261e7 Program uses too many new-ish constructions to be compilable on glibc 2.2
(Red Hat 7.3).  Do nothing on very old platforms.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7223
2007-11-26 00:41:54 +00:00
Julian Seward
e2b1e84659 Make drd regtests work again following core changes. (Bart Van Assche)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7222
2007-11-26 00:11:04 +00:00
Julian Seward
8c77347278 Get rid of stuff which should not have been committed. Urrr.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7220
2007-11-25 23:56:12 +00:00
Julian Seward
4d8252fede Fix g++-2.96 build breakage.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7219
2007-11-25 23:15:44 +00:00
Julian Seward
0da1890961 Un-break 'make distdir'. Either by removing from EXTRA_DIST, file
names pertaining to tests which cannot be run (no associated .vgtest),
or by adding missing .stdout.exp files for tests which are to be run
(there is an associated .vgtest).



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7218
2007-11-25 20:20:49 +00:00