Commit Graph

66 Commits

Author SHA1 Message Date
Bart Van Assche
7b1a5978c9 drd: Handle pthread_cond_destroy() failure properly
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13198
2012-12-24 10:22:14 +00:00
Petar Jovanovic
40644676b1 Introduce DISABLE_PTHREAD_SPINLOCK_INTERCEPT flag
The flag DISABLE_PTHREAD_SPINLOCK_INTERCEPT is set only for MIPS32, and it is
used in DRD and Helgrind as a workaround for the issue #311690.
In short, pthread_spin_lock implementation has local branches to the start of
the function which interferes with the redirection system in Valgrind that
assumes it has to redirect each call/branch to a particular address.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13190
2012-12-20 18:56:57 +00:00
Florian Krohm
d0aa69c331 Fix more Char/HChar mixups. Closing in...
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119
2012-11-10 22:29:54 +00:00
Bart Van Assche
7f409138b2 drd: Re-enable the pthread_cancel() intercept now that the CALL_FN_*() ABI
violation has been fixed (r12811).


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12907
2012-08-28 17:57:09 +00:00
Julian Seward
4a3633e266 Update copyright dates to include 2012.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843
2012-08-05 15:46:46 +00:00
Bart Van Assche
6c92e97588 drd: Avoid that invoking pthread_cancel() from a program analyzed with DRD triggers a crash on Fedora 17
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12800
2012-07-28 14:35:48 +00:00
Bart Van Assche
38b17ca6f4 drd: Avoid that the changes from r12351 trigger a race condition when copying DrdPosixThreadArgs
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12352
2012-01-24 08:30:32 +00:00
Bart Van Assche
a1d8b80b36 drd, semaphore implementation: Only wake the associated futex if at least one thread is waiting
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12351
2012-01-23 17:01:58 +00:00
Bart Van Assche
e76f96cd60 drd: Fix a race condition in the pthread_create() intercept.
Avoid that the futex wake call in DRD_(sema_up)() can get invoked after the semaphore has
already been destroyed. This is most likely the real fix for the bug described in the
commit message of r12332.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12346
2012-01-19 19:52:15 +00:00
Bart Van Assche
12ec9d298a Remove emacs modeline and/or local variables from DRD source files
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12279
2011-12-04 15:54:19 +00:00
Julian Seward
084b7cb10b Fix #284384 (clang 3.1 -Wunused-value warnings in valgrind.h,
memcheck.h) by changing a bunch of VALGRIND_DO_CLIENT_REQUEST_EXPR
into VALGRIND_DO_CLIENT_REQUEST_STMT for cases where the return value
of the former would be unused.  (Bart Van Assche, bart.vanassche@gmail.com)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12226
2011-10-24 13:21:57 +00:00
Bart Van Assche
83f6f0137f Make drd/drd_pthread_intercepts.c compile again on Linux systems without usable <linux/futex.h> header
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12035
2011-09-17 06:24:49 +00:00
Bart Van Assche
5547d1545e drd: Avoid reporting false positive race reports inside pthread_join().
Note: I haven't analyzed yet since which commit these false positives
started to appear but it's most likely a commit applied after the 3.6
release.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12003
2011-08-24 15:02:21 +00:00
Bart Van Assche
85a61a6c6f drd: Remove a too strict assert() statement
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11937
2011-07-29 06:30:23 +00:00
Bart Van Assche
08eecbf85d drd: Make drd_pthread_intercepts.c compile again on systems where
FUTEX_PRIVATE_FLAG has not been defined in <linux/futex.h>, e.g. older System z
systems.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11929
2011-07-28 15:04:08 +00:00
Bart Van Assche
6cf2bc2c34 drd: Delay deletion of memory access information of joined threads in order not
to miss any races caused by these threads.

To do: refine handling of pthread_once() again.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11926
2011-07-28 09:54:37 +00:00
Bart Van Assche
39b5365cd9 drd/Linux: eliminate busy waiting when starting a thread
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11920
2011-07-26 19:30:28 +00:00
Julian Seward
eea9337891 The pthread.h on Android has no definition for pthread_rwlock_t, which
makes the associated intercepts in Helgrind and DRD un-compilable.
Add a configure test for it, and use them to guard the aforementioned
intercepts.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11875
2011-07-11 22:11:58 +00:00
Bart Van Assche
9a36fe677e Get rid of the remaining "set but not used" warnings reported by gcc 4.6 by
swapping the roles of the VALGRIND_DO_CLIENT_REQUEST() and
VALGRIND_DO_CLIENT_REQUEST_EXPR() macros. Also, many __attribute__((unused))
declarations on variables have been eliminated. Closes #269778.

Note: so far this patch has been tested on x86/Linux, amd64/Linux and
ppc64/Linux but not yet on any other supported CPU/OS combination.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11755
2011-05-15 07:04:03 +00:00
Julian Seward
9c6d0dc9c9 Fix up most but not all warnings generated by gcc-4.6 about
dead assignments ("[-Wunused-but-set-variable]").



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11673
2011-03-28 16:26:42 +00:00
Bart Van Assche
e53eb1ec0c Updated modeline and copyright statement in DRD source files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11642
2011-03-13 12:02:44 +00:00
Bart Van Assche
ad2f458136 DRD: Allocate thread arguments again on the stack.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11630
2011-03-12 11:01:06 +00:00
Bart Van Assche
8c2ede1182 DRD: Report an error if an invalid argument is passed to pthread_detach(). Do not assume that pthread_detach() returns an error code if its argument is invalid. Should fix #267968.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11614
2011-03-09 17:53:28 +00:00
Bart Van Assche
942bd034c8 DRD: Fixed a race condition triggered by invoking pthread_detach() with an argument not equal to pthread_self(). Potential fix for #267968.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11612
2011-03-08 18:34:44 +00:00
Bart Van Assche
3eeee78bed DRD: Removed an obsolete comment.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11611
2011-03-08 18:32:36 +00:00
Bart Van Assche
218571c462 DRD: Source code cleanup.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11610
2011-03-08 17:53:45 +00:00
Bart Van Assche
bcd0bc2155 DRD, Darwin: avoid triggering misaligned stack errors. Fixes #267552.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11591
2011-03-05 14:51:24 +00:00
Bart Van Assche
626fe3372c Reverted r11536 because it didn't have the desired effect - changing the behavior of DRD on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11539
2011-02-13 07:55:36 +00:00
Bart Van Assche
b640febb3e DRD: don't inline pthread intercepts because in combination with the current fragile implementation of the CALL_FN_* macros inlining intercepts can easily trigger stack alignment errors on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11536
2011-02-10 21:03:47 +00:00
Bart Van Assche
ad86d78a6c E-mail address update.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11420
2010-10-10 18:07:31 +00:00
Bart Van Assche
ecb0c51747 DRD: avoid unaligned reads.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11365
2010-09-19 11:14:31 +00:00
Bart Van Assche
b0c39b2f5f Replaced dynamic initialization of DRD_(pthread_cond_initializer) by static initialization.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11145
2010-06-02 19:32:51 +00:00
Bart Van Assche
ebc0c2cb88 Handle statically initialized condition variables properly.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11139
2010-05-29 18:43:21 +00:00
Julian Seward
9b0574dff8 Update copyright dates to 2010.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121
2010-05-03 21:37:12 +00:00
Bart Van Assche
d0bb010178 Removed trailing whitespace in C source and header files.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11052
2010-02-21 14:52:59 +00:00
Bart Van Assche
dd123bf150 Builds again on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10680
2009-07-31 17:59:28 +00:00
Bart Van Assche
22baa8bb07 Implemented a more systematic approach for intercepting POSIX threads
functions: for each function name to intercept, intercept the function
name itself, the function name with @* appended (versioned symbols on
Linux) and the function name with $* appended (versioned symbols on
Darwin). Updated filter_stderr such that symbol versions are removed.
Updated the expected output files that contain names of intercepted
functions.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10679
2009-07-31 17:31:44 +00:00
Bart Van Assche
fd574c0b25 Report an error message instead of triggering an assertion failure when a non-existing thread ID is passed to pthread_join() or pthread_cancel().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10674
2009-07-31 08:26:17 +00:00
Bart Van Assche
6073c6f851 Fixed typo.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10618
2009-07-26 16:21:00 +00:00
Bart Van Assche
8235a379dd Suppress data race reports for the data race triggered by Darwin's pthread_once() implementation such that the pth_once test also passes on Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10616
2009-07-26 15:55:48 +00:00
Bart Van Assche
a0f1a0b56f Removed code that has been commented out recently.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10606
2009-07-26 08:48:49 +00:00
Bart Van Assche
6529f12189 Replaced code for suppressing the stack memory in use at the time a
thread is being created by code for suppressing the memory allocated
from inside the pthread_create() call. The new implementation should be
a more portable solution for suppressing data races triggered by the
thread-local-storage implementation of a Pthreads library.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10584
2009-07-24 08:20:10 +00:00
Bart Van Assche
e2f8abc15d Added support for sem_open() and sem_close().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10560
2009-07-23 16:31:39 +00:00
Bart Van Assche
41d1681616 Make the regression tests pass again on Linux.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10535
2009-07-22 19:33:26 +00:00
Bart Van Assche
f72049d88d More tweaking for Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10534
2009-07-22 19:17:05 +00:00
Bart Van Assche
28ac4a3761 Tweaks for Darwin.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10515
2009-07-21 17:47:30 +00:00
Bart Van Assche
8af98b77e3 Made sure that DRD does something meaningful when using another threading library than LinuxThreads or the NPTL.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10503
2009-07-21 12:39:25 +00:00
Nicholas Nethercote
07045477ca Merge the DARWIN branch onto the trunk.
I tried using 'svn merge' to do the merge but it did a terrible job and
there were bazillions of conflicts.  So instead I just took the diff between
the branch and trunk  at r10155, applied the diff to the trunk, 'svn add'ed
the added files (no files needed to be 'svn remove'd) and committed.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10156
2009-05-28 01:53:07 +00:00
Nicholas Nethercote
a3dfa6672b Factor out the name of the libpthread library. Also fix a minor stack trace
bogon.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9832
2009-05-11 08:01:09 +00:00
Bart Van Assche
5eccd4ef74 Fixed #189763.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9578
2009-04-22 18:59:50 +00:00