From: Bart Van Assche Date: Fri, 31 Jul 2009 17:31:44 +0000 (+0000) Subject: Implemented a more systematic approach for intercepting POSIX threads X-Git-Tag: svn/VALGRIND_3_5_0~171 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=22baa8bb07cad0c9a37d4435138dae3d9f70f864;p=thirdparty%2Fvalgrind.git 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 --- diff --git a/drd/drd_pthread_intercepts.c b/drd/drd_pthread_intercepts.c index 94cd862fa2..8b97843e55 100644 --- a/drd/drd_pthread_intercepts.c +++ b/drd/drd_pthread_intercepts.c @@ -78,10 +78,43 @@ #define WAIT_UNTIL_CREATED_THREAD_STARTED #define ALLOCATE_THREAD_ARGS_ON_THE_STACK -#define PTH_FUNC(ret_ty, f, args...) \ - ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args); \ - ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,f)(args) +/** + * Macro for generating a Valgrind interception function. + * @param[in] ret_ty Return type of the function to be generated. + * @param[in] zf Z-encoded name of the interception function. + * @param[in] implf Name of the function that implements the intercept. + * @param[in] arg_decl Argument declaration list enclosed in parentheses. + * @param[in] argl Argument list enclosed in parentheses. + */ +#define PTH_FUNC(ret_ty, zf, implf, argl_decl, argl) \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl; \ + ret_ty VG_WRAP_FUNCTION_ZZ(VG_Z_LIBPTHREAD_SONAME,zf) argl_decl \ + { return implf argl; } + +/** + * Macro for generating three Valgrind interception functions: one with the + * Z-encoded name zf, one with ZAZa ("@*") appended to the name zf and one + * with ZDZa ("$*") appended to the name zf. The second generated interception + * function will intercept versioned symbols on Linux, and the third will + * intercept versioned symbols on Darwin. + */ +#define PTH_FUNCS(ret_ty, zf, implf, argl_decl, argl) \ + PTH_FUNC(ret_ty, zf, implf, argl_decl, argl); \ + PTH_FUNC(ret_ty, zf ## ZAZa, implf, argl_decl, argl); \ + PTH_FUNC(ret_ty, zf ## ZDZa, implf, argl_decl, argl); +/* + * Not inlining one of the intercept functions will cause the regression + * tests to fail because this would cause an additional stackfram to appear + * in the output. The __always_inline macro guarantees that inlining will + * happen, even when compiling with optimization disabled. + */ +#undef __always_inline /* since already defined in */ +#if __GNUC_PREREQ (3,2) +#define __always_inline __inline__ __attribute__((always_inline)) +#else +#define __always_inline __inline__ +#endif /* Local data structures. */ @@ -161,7 +194,7 @@ static MutexT DRD_(pthread_to_drd_mutex_type)(const int kind) * higher bits for flags like PTHREAD_MUTEXATTR_FLAG_ROBUST and * PTHREAD_MUTEXATTR_FLAG_PSHARED. */ -static __inline__ MutexT DRD_(mutex_type)(pthread_mutex_t* mutex) +static __always_inline MutexT DRD_(mutex_type)(pthread_mutex_t* mutex) { #if defined(HAVE_PTHREAD_MUTEX_T__M_KIND) /* glibc + LinuxThreads. */ @@ -192,7 +225,7 @@ static void DRD_(set_joinable)(const pthread_t tid, const int joinable) } /** Tell DRD that the calling thread is about to enter pthread_create(). */ -static __inline__ void DRD_(entering_pthread_create)(void) +static __always_inline void DRD_(entering_pthread_create)(void) { int res; VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__ENTERING_PTHREAD_CREATE, @@ -200,7 +233,7 @@ static __inline__ void DRD_(entering_pthread_create)(void) } /** Tell DRD that the calling thread has left pthread_create(). */ -static __inline__ void DRD_(left_pthread_create)(void) +static __always_inline void DRD_(left_pthread_create)(void) { int res; VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__LEFT_PTHREAD_CREATE, @@ -328,10 +361,9 @@ static void DRD_(set_main_thread_state)(void) * glibc-2.9/nptl/pthread_create.c. */ -// pthread_create -PTH_FUNC(int, pthreadZucreateZa, // pthread_create* - pthread_t *thread, const pthread_attr_t *attr, - void *(*start) (void *), void *arg) +static __always_inline +int pthread_create_intercept(pthread_t* thread, const pthread_attr_t* attr, + void* (*start)(void*), void* arg) { int res; int ret; @@ -404,9 +436,13 @@ PTH_FUNC(int, pthreadZucreateZa, // pthread_create* return ret; } -// pthread_join -PTH_FUNC(int, pthreadZujoinZa, // pthread_join* - pthread_t pt_joinee, void **thread_return) +PTH_FUNCS(int, pthreadZucreate, pthread_create_intercept, + (pthread_t *thread, const pthread_attr_t *attr, + void *(*start) (void *), void *arg), + (thread, attr, start, arg)); + +static __always_inline +int pthread_join_intercept(pthread_t pt_joinee, void **thread_return) { int ret; int res; @@ -422,8 +458,12 @@ PTH_FUNC(int, pthreadZujoinZa, // pthread_join* return ret; } -// pthread_detach -PTH_FUNC(int, pthreadZudetach, pthread_t pt_thread) +PTH_FUNCS(int, pthreadZujoin, pthread_join_intercept, + (pthread_t pt_joinee, void **thread_return), + (pt_joinee, thread_return)); + +static __always_inline +int pthread_detach_intercept(pthread_t pt_thread) { int ret; OrigFn fn; @@ -438,9 +478,14 @@ PTH_FUNC(int, pthreadZudetach, pthread_t pt_thread) return ret; } -// pthread_cancel -// Note: make sure not to intercept pthread_cancel_init() on Linux ! -PTH_FUNC(int, pthreadZucancel, pthread_t pt_thread) +PTH_FUNCS(int, pthreadZudetach, pthread_detach_intercept, + (pthread_t thread), (thread)); + +// NOTE: be careful to intercept only pthread_cancel() and not +// pthread_cancel_init() on Linux. + +static __always_inline +int pthread_cancel_intercept(pthread_t pt_thread) { int res; int ret; @@ -454,9 +499,12 @@ PTH_FUNC(int, pthreadZucancel, pthread_t pt_thread) return ret; } -// pthread_once -PTH_FUNC(int, pthreadZuonceZa, // pthread_once* - pthread_once_t *once_control, void (*init_routine)(void)) +PTH_FUNCS(int, pthreadZucancel, pthread_cancel_intercept, + (pthread_t thread), (thread)) + +static __always_inline +int pthread_once_intercept(pthread_once_t *once_control, + void (*init_routine)(void)) { int ret; OrigFn fn; @@ -472,10 +520,13 @@ PTH_FUNC(int, pthreadZuonceZa, // pthread_once* return ret; } -// pthread_mutex_init -PTH_FUNC(int, pthreadZumutexZuinit, - pthread_mutex_t *mutex, - const pthread_mutexattr_t* attr) +PTH_FUNCS(int, pthreadZuonce, pthread_once_intercept, + (pthread_once_t *once_control, void (*init_routine)(void)), + (once_control, init_routine)); + +static __always_inline +int pthread_mutex_init_intercept(pthread_mutex_t *mutex, + const pthread_mutexattr_t* attr) { int ret; int res; @@ -494,9 +545,12 @@ PTH_FUNC(int, pthreadZumutexZuinit, return ret; } -// pthread_mutex_destroy -PTH_FUNC(int, pthreadZumutexZudestroy, - pthread_mutex_t *mutex) +PTH_FUNCS(int, pthreadZumutexZuinit, pthread_mutex_init_intercept, + (pthread_mutex_t *mutex, const pthread_mutexattr_t* attr), + (mutex, attr)); + +static __always_inline +int pthread_mutex_destroy_intercept(pthread_mutex_t* mutex) { int ret; int res; @@ -510,9 +564,11 @@ PTH_FUNC(int, pthreadZumutexZudestroy, return ret; } -// pthread_mutex_lock -PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock - pthread_mutex_t *mutex) +PTH_FUNCS(int, pthreadZumutexZudestroy, pthread_mutex_destroy_intercept, + (pthread_mutex_t *mutex), (mutex)); + +static __always_inline +int pthread_mutex_lock_intercept(pthread_mutex_t* mutex) { int ret; int res; @@ -526,9 +582,11 @@ PTH_FUNC(int, pthreadZumutexZulock, // pthread_mutex_lock return ret; } -// pthread_mutex_trylock -PTH_FUNC(int, pthreadZumutexZutrylock, // pthread_mutex_trylock - pthread_mutex_t *mutex) +PTH_FUNCS(int, pthreadZumutexZulock, pthread_mutex_lock_intercept, + (pthread_mutex_t *mutex), (mutex)); + +static __always_inline +int pthread_mutex_trylock_intercept(pthread_mutex_t* mutex) { int ret; int res; @@ -542,10 +600,12 @@ PTH_FUNC(int, pthreadZumutexZutrylock, // pthread_mutex_trylock return ret; } -// pthread_mutex_timedlock -PTH_FUNC(int, pthreadZumutexZutimedlock, // pthread_mutex_timedlock - pthread_mutex_t *mutex, - const struct timespec *abs_timeout) +PTH_FUNCS(int, pthreadZumutexZutrylock, pthread_mutex_trylock_intercept, + (pthread_mutex_t *mutex), (mutex)); + +static __always_inline +int pthread_mutex_timedlock_intercept(pthread_mutex_t *mutex, + const struct timespec *abs_timeout) { int ret; int res; @@ -559,9 +619,12 @@ PTH_FUNC(int, pthreadZumutexZutimedlock, // pthread_mutex_timedlock return ret; } -// pthread_mutex_unlock -PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock - pthread_mutex_t *mutex) +PTH_FUNCS(int, pthreadZumutexZutimedlock, pthread_mutex_timedlock_intercept, + (pthread_mutex_t *mutex, const struct timespec *abs_timeout), + (mutex, abs_timeout)); + +static __always_inline +int pthread_mutex_unlock_intercept(pthread_mutex_t *mutex) { int ret; int res; @@ -577,10 +640,12 @@ PTH_FUNC(int, pthreadZumutexZuunlock, // pthread_mutex_unlock return ret; } -// pthread_cond_init -PTH_FUNC(int, pthreadZucondZuinitZa, // pthread_cond_init* - pthread_cond_t* cond, - const pthread_condattr_t* attr) +PTH_FUNCS(int, pthreadZumutexZuunlock, pthread_mutex_unlock_intercept, + (pthread_mutex_t *mutex), (mutex)); + +static __always_inline +int pthread_cond_init_intercept(pthread_cond_t* cond, + const pthread_condattr_t* attr) { int ret; int res; @@ -594,9 +659,12 @@ PTH_FUNC(int, pthreadZucondZuinitZa, // pthread_cond_init* return ret; } -// pthread_cond_destroy -PTH_FUNC(int, pthreadZucondZudestroyZa, // pthread_cond_destroy* - pthread_cond_t* cond) +PTH_FUNCS(int, pthreadZucondZuinit, pthread_cond_init_intercept, + (pthread_cond_t* cond, const pthread_condattr_t* attr), + (cond, attr)); + +static __always_inline +int pthread_cond_destroy_intercept(pthread_cond_t* cond) { int ret; int res; @@ -610,10 +678,11 @@ PTH_FUNC(int, pthreadZucondZudestroyZa, // pthread_cond_destroy* return ret; } -// pthread_cond_wait -PTH_FUNC(int, pthreadZucondZuwaitZa, // pthread_cond_wait* - pthread_cond_t *cond, - pthread_mutex_t *mutex) +PTH_FUNCS(int, pthreadZucondZudestroy, pthread_cond_destroy_intercept, + (pthread_cond_t* cond), (cond)); + +static __always_inline +int pthread_cond_wait_intercept(pthread_cond_t *cond, pthread_mutex_t *mutex) { int ret; int res; @@ -627,11 +696,14 @@ PTH_FUNC(int, pthreadZucondZuwaitZa, // pthread_cond_wait* return ret; } -// pthread_cond_timedwait -PTH_FUNC(int, pthreadZucondZutimedwaitZa, // pthread_cond_timedwait* - pthread_cond_t *cond, - pthread_mutex_t *mutex, - const struct timespec* abstime) +PTH_FUNCS(int, pthreadZucondZuwait, pthread_cond_wait_intercept, + (pthread_cond_t *cond, pthread_mutex_t *mutex), + (cond, mutex)); + +static __always_inline +int pthread_cond_timedwait_intercept(pthread_cond_t *cond, + pthread_mutex_t *mutex, + const struct timespec* abstime) { int ret; int res; @@ -645,15 +717,19 @@ PTH_FUNC(int, pthreadZucondZutimedwaitZa, // pthread_cond_timedwait* return ret; } +PTH_FUNCS(int, pthreadZucondZutimedwait, pthread_cond_timedwait_intercept, + (pthread_cond_t *cond, pthread_mutex_t *mutex, + const struct timespec* abstime), + (cond, mutex, abstime)); + // NOTE: be careful to intercept only pthread_cond_signal() and not Darwin's // pthread_cond_signal_thread_np(). The former accepts one argument; the latter // two. Intercepting all pthread_cond_signal* functions will cause only one // argument to be passed to pthread_cond_signal_np() and hence will cause this // last function to crash. -// pthread_cond_signal -PTH_FUNC(int, pthreadZucondZusignal, // pthread_cond_signal - pthread_cond_t* cond) +static __always_inline +int pthread_cond_signal_intercept(pthread_cond_t* cond) { int ret; int res; @@ -667,24 +743,11 @@ PTH_FUNC(int, pthreadZucondZusignal, // pthread_cond_signal return ret; } -PTH_FUNC(int, pthreadZucondZusignalZAZa, // pthread_cond_signal@* - pthread_cond_t* cond) -{ - int ret; - int res; - OrigFn fn; - VALGRIND_GET_ORIG_FN(fn); - VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_COND_SIGNAL, - cond, 0, 0, 0, 0); - CALL_FN_W_W(ret, fn, cond); - VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_COND_SIGNAL, - cond, 0, 0, 0, 0); - return ret; -} +PTH_FUNCS(int, pthreadZucondZusignal, pthread_cond_signal_intercept, + (pthread_cond_t* cond), (cond)); -// pthread_cond_broadcast -PTH_FUNC(int, pthreadZucondZubroadcastZa, // pthread_cond_broadcast* - pthread_cond_t* cond) +static __always_inline +int pthread_cond_broadcast_intercept(pthread_cond_t* cond) { int ret; int res; @@ -698,12 +761,12 @@ PTH_FUNC(int, pthreadZucondZubroadcastZa, // pthread_cond_broadcast* return ret; } +PTH_FUNCS(int, pthreadZucondZubroadcast, pthread_cond_broadcast_intercept, + (pthread_cond_t* cond), (cond)); #if defined(HAVE_PTHREAD_SPIN_LOCK) -// pthread_spin_init -PTH_FUNC(int, pthreadZuspinZuinit, // pthread_spin_init - pthread_spinlock_t *spinlock, - int pshared) +static __always_inline +int pthread_spin_init_intercept(pthread_spinlock_t *spinlock, int pshared) { int ret; int res; @@ -717,9 +780,11 @@ PTH_FUNC(int, pthreadZuspinZuinit, // pthread_spin_init return ret; } -// pthread_spin_destroy -PTH_FUNC(int, pthreadZuspinZudestroy, // pthread_spin_destroy - pthread_spinlock_t *spinlock) +PTH_FUNCS(int, pthreadZuspinZuinit, pthread_spin_init_intercept, + (pthread_spinlock_t *spinlock, int pshared), (spinlock, pshared)); + +static __always_inline +int pthread_spin_destroy_intercept(pthread_spinlock_t *spinlock) { int ret; int res; @@ -733,9 +798,11 @@ PTH_FUNC(int, pthreadZuspinZudestroy, // pthread_spin_destroy return ret; } -// pthread_spin_lock -PTH_FUNC(int, pthreadZuspinZulock, // pthread_spin_lock - pthread_spinlock_t *spinlock) +PTH_FUNCS(int, pthreadZuspinZudestroy, pthread_spin_destroy_intercept, + (pthread_spinlock_t *spinlock), (spinlock)); + +static __always_inline +int pthread_spin_lock_intercept(pthread_spinlock_t *spinlock) { int ret; int res; @@ -749,9 +816,11 @@ PTH_FUNC(int, pthreadZuspinZulock, // pthread_spin_lock return ret; } -// pthread_spin_trylock -PTH_FUNC(int, pthreadZuspinZutrylock, // pthread_spin_trylock - pthread_spinlock_t *spinlock) +PTH_FUNCS(int, pthreadZuspinZulock, pthread_spin_lock_intercept, + (pthread_spinlock_t *spinlock), (spinlock)); + +static __always_inline +int pthread_spin_trylock_intercept(pthread_spinlock_t *spinlock) { int ret; int res; @@ -765,9 +834,11 @@ PTH_FUNC(int, pthreadZuspinZutrylock, // pthread_spin_trylock return ret; } -// pthread_spin_unlock -PTH_FUNC(int, pthreadZuspinZuunlock, // pthread_spin_unlock - pthread_spinlock_t *spinlock) +PTH_FUNCS(int, pthreadZuspinZutrylock, pthread_spin_trylock_intercept, + (pthread_spinlock_t *spinlock), (spinlock)); + +static __always_inline +int pthread_spin_unlock_intercept(pthread_spinlock_t *spinlock) { int ret; int res; @@ -780,15 +851,17 @@ PTH_FUNC(int, pthreadZuspinZuunlock, // pthread_spin_unlock spinlock, 0, 0, 0, 0); return ret; } + +PTH_FUNCS(int, pthreadZuspinZuunlock, pthread_spin_unlock_intercept, + (pthread_spinlock_t *spinlock), (spinlock)); #endif // HAVE_PTHREAD_SPIN_LOCK #if defined(HAVE_PTHREAD_BARRIER_INIT) -// pthread_barrier_init -PTH_FUNC(int, pthreadZubarrierZuinit, // pthread_barrier_init - pthread_barrier_t* barrier, - const pthread_barrierattr_t* attr, - unsigned count) +static __always_inline +int pthread_barrier_init_intercept(pthread_barrier_t* barrier, + const pthread_barrierattr_t* attr, + unsigned count) { int ret; int res; @@ -802,9 +875,12 @@ PTH_FUNC(int, pthreadZubarrierZuinit, // pthread_barrier_init return ret; } -// pthread_barrier_destroy -PTH_FUNC(int, pthreadZubarrierZudestroy, // pthread_barrier_destroy - pthread_barrier_t* barrier) +PTH_FUNCS(int, pthreadZubarrierZuinit, pthread_barrier_init_intercept, + (pthread_barrier_t* barrier, const pthread_barrierattr_t* attr, + unsigned count), (barrier, attr, count)); + +static __always_inline +int pthread_barrier_destroy_intercept(pthread_barrier_t* barrier) { int ret; int res; @@ -818,9 +894,11 @@ PTH_FUNC(int, pthreadZubarrierZudestroy, // pthread_barrier_destroy return ret; } -// pthread_barrier_wait -PTH_FUNC(int, pthreadZubarrierZuwait, // pthread_barrier_wait - pthread_barrier_t* barrier) +PTH_FUNCS(int, pthreadZubarrierZudestroy, pthread_barrier_destroy_intercept, + (pthread_barrier_t* barrier), (barrier)); + +static __always_inline +int pthread_barrier_wait_intercept(pthread_barrier_t* barrier) { int ret; int res; @@ -835,14 +913,14 @@ PTH_FUNC(int, pthreadZubarrierZuwait, // pthread_barrier_wait ret == PTHREAD_BARRIER_SERIAL_THREAD, 0); return ret; } + +PTH_FUNCS(int, pthreadZubarrierZuwait, pthread_barrier_wait_intercept, + (pthread_barrier_t* barrier), (barrier)); #endif // HAVE_PTHREAD_BARRIER_INIT -// sem_init -PTH_FUNC(int, semZuinitZa, // sem_init* - sem_t *sem, - int pshared, - unsigned int value) +static __always_inline +int sem_init_intercept(sem_t *sem, int pshared, unsigned int value) { int ret; int res; @@ -856,9 +934,11 @@ PTH_FUNC(int, semZuinitZa, // sem_init* return ret; } -// sem_destroy -PTH_FUNC(int, semZudestroyZa, // sem_destroy* - sem_t *sem) +PTH_FUNCS(int, semZuinit, sem_init_intercept, + (sem_t *sem, int pshared, unsigned int value), (sem, pshared, value)); + +static __always_inline +int sem_destroy_intercept(sem_t *sem) { int ret; int res; @@ -872,9 +952,11 @@ PTH_FUNC(int, semZudestroyZa, // sem_destroy* return ret; } -// sem_open -PTH_FUNC(sem_t *, semZuopen, // sem_open - const char *name, int oflag, mode_t mode, unsigned int value) +PTH_FUNCS(int, semZudestroy, sem_destroy_intercept, (sem_t *sem), (sem)); + +static __always_inline +sem_t* sem_open_intercept(const char *name, int oflag, mode_t mode, + unsigned int value) { sem_t *ret; int res; @@ -889,9 +971,11 @@ PTH_FUNC(sem_t *, semZuopen, // sem_open return ret; } -// sem_close -PTH_FUNC(int, semZuclose, // sem_close - sem_t *sem) +PTH_FUNCS(sem_t *, semZuopen, sem_open_intercept, + (const char *name, int oflag, mode_t mode, unsigned int value), + (name, oflag, mode, value)); + +static __always_inline int sem_close_intercept(sem_t *sem) { int ret; int res; @@ -905,9 +989,9 @@ PTH_FUNC(int, semZuclose, // sem_close return ret; } -// sem_wait -PTH_FUNC(int, semZuwaitZa, // sem_wait* - sem_t *sem) +PTH_FUNCS(int, semZuclose, sem_close_intercept, (sem_t *sem), (sem)); + +static __always_inline int sem_wait_intercept(sem_t *sem) { int ret; int res; @@ -921,9 +1005,9 @@ PTH_FUNC(int, semZuwaitZa, // sem_wait* return ret; } -// sem_trywait -PTH_FUNC(int, semZutrywaitZa, // sem_trywait* - sem_t *sem) +PTH_FUNCS(int, semZuwait, sem_wait_intercept, (sem_t *sem), (sem)); + +static __always_inline int sem_trywait_intercept(sem_t *sem) { int ret; int res; @@ -937,9 +1021,10 @@ PTH_FUNC(int, semZutrywaitZa, // sem_trywait* return ret; } -// sem_timedwait -PTH_FUNC(int, semZutimedwait, // sem_timedwait - sem_t *sem, const struct timespec *abs_timeout) +PTH_FUNCS(int, semZutrywait, sem_trywait_intercept, (sem_t *sem), (sem)); + +static __always_inline +int sem_timedwait_intercept(sem_t *sem, const struct timespec *abs_timeout) { int ret; int res; @@ -953,9 +1038,11 @@ PTH_FUNC(int, semZutimedwait, // sem_timedwait return ret; } -// sem_post -PTH_FUNC(int, semZupostZa, // sem_post* - sem_t *sem) +PTH_FUNCS(int, semZutimedwait, sem_timedwait_intercept, + (sem_t *sem, const struct timespec *abs_timeout), + (sem, abs_timeout)); + +static __always_inline int sem_post_intercept(sem_t *sem) { int ret; int res; @@ -969,11 +1056,11 @@ PTH_FUNC(int, semZupostZa, // sem_post* return ret; } -// pthread_rwlock_init -PTH_FUNC(int, - pthreadZurwlockZuinitZa, // pthread_rwlock_init* - pthread_rwlock_t* rwlock, - const pthread_rwlockattr_t* attr) +PTH_FUNCS(int, semZupost, sem_post_intercept, (sem_t *sem), (sem)); + +static __always_inline +int pthread_rwlock_init_intercept(pthread_rwlock_t* rwlock, + const pthread_rwlockattr_t* attr) { int ret; int res; @@ -985,10 +1072,13 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_destroy -PTH_FUNC(int, - pthreadZurwlockZudestroyZa, // pthread_rwlock_destroy* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZuinit, pthread_rwlock_init_intercept, + (pthread_rwlock_t* rwlock, const pthread_rwlockattr_t* attr), + (rwlock, attr)); + +static __always_inline +int pthread_rwlock_destroy_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1000,10 +1090,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_rdlock -PTH_FUNC(int, - pthreadZurwlockZurdlockZa, // pthread_rwlock_rdlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZudestroy, pthread_rwlock_destroy_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_rdlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1017,10 +1109,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_wrlock -PTH_FUNC(int, - pthreadZurwlockZuwrlockZa, // pthread_rwlock_wrlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZurdlock, pthread_rwlock_rdlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_wrlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1034,10 +1128,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_timedrdlock -PTH_FUNC(int, - pthreadZurwlockZutimedrdlockZa, // pthread_rwlock_timedrdlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZuwrlock, pthread_rwlock_wrlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_timedrdlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1051,10 +1147,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_timedwrlock -PTH_FUNC(int, - pthreadZurwlockZutimedwrlockZa, // pthread_rwlock_timedwrlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZutimedrdlock, pthread_rwlock_timedrdlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_timedwrlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1068,10 +1166,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_tryrdlock -PTH_FUNC(int, - pthreadZurwlockZutryrdlockZa, // pthread_rwlock_tryrdlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZutimedwrlock, pthread_rwlock_timedwrlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_tryrdlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1085,10 +1185,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_trywrlock -PTH_FUNC(int, - pthreadZurwlockZutrywrlockZa, // pthread_rwlock_trywrlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZutryrdlock, pthread_rwlock_tryrdlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_trywrlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1102,10 +1204,12 @@ PTH_FUNC(int, return ret; } -// pthread_rwlock_unlock -PTH_FUNC(int, - pthreadZurwlockZuunlockZa, // pthread_rwlock_unlock* - pthread_rwlock_t* rwlock) +PTH_FUNCS(int, + pthreadZurwlockZutrywrlock, pthread_rwlock_trywrlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); + +static __always_inline +int pthread_rwlock_unlock_intercept(pthread_rwlock_t* rwlock) { int ret; int res; @@ -1118,3 +1222,7 @@ PTH_FUNC(int, rwlock, ret == 0, 0, 0, 0); return ret; } + +PTH_FUNCS(int, + pthreadZurwlockZuunlock, pthread_rwlock_unlock_intercept, + (pthread_rwlock_t* rwlock), (rwlock)); diff --git a/drd/tests/filter_stderr b/drd/tests/filter_stderr index e726994d99..ee9ec45083 100755 --- a/drd/tests/filter_stderr +++ b/drd/tests/filter_stderr @@ -25,8 +25,7 @@ sed \ -e "s/was held during [0-9][0-9]*/was held during .../" \ -e "s: BSS section of .*/: BSS section of :g" \ -e "s: vc \[[ ,:0-9]*\]: vc ...:g" \ --e "s/: pthread_cond_wait\* /: pthread_cond_wait /" \ --e "s/: pthread_cond_signal@\* /: pthread_cond_signal /" \ +-e "s/[@\$*]* (drd_pthread_intercepts.c:/ (drd_pthread_intercepts.c:/" \ -e "s/ (\([a-zA-Z_]*\.c\):[0-9]*)/ (\1:?)/" \ -e "s/ (\([a-zA-Z_]*\.h\):[0-9]*)/ (\1:?)/" \ -e "s/ (\([a-zA-Z_]*\.cpp\):[0-9]*)/ (\1:?)/" | diff --git a/drd/tests/hold_lock_1.stderr.exp b/drd/tests/hold_lock_1.stderr.exp index 45ed99db27..fb409a188c 100644 --- a/drd/tests/hold_lock_1.stderr.exp +++ b/drd/tests/hold_lock_1.stderr.exp @@ -12,13 +12,13 @@ mutex 0x........ was first observed at: Locking rwlock exclusively ... Acquired at: - at 0x........: pthread_rwlock_wrlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_wrlock (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) Lock on rwlock 0x........ was held during ... ms (threshold: 500 ms). - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) Locking rwlock shared ... Done. diff --git a/drd/tests/hold_lock_2.stderr.exp b/drd/tests/hold_lock_2.stderr.exp index 5620c9dda8..d400e5b244 100644 --- a/drd/tests/hold_lock_2.stderr.exp +++ b/drd/tests/hold_lock_2.stderr.exp @@ -3,13 +3,13 @@ Locking mutex ... Locking rwlock exclusively ... Locking rwlock shared ... Acquired at: - at 0x........: pthread_rwlock_rdlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_rdlock (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) Lock on rwlock 0x........ was held during ... ms (threshold: 500 ms). - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (hold_lock.c:?) Done. diff --git a/drd/tests/pth_cancel_locked.stderr.exp b/drd/tests/pth_cancel_locked.stderr.exp index a90746391f..ea32d4a7e6 100644 --- a/drd/tests/pth_cancel_locked.stderr.exp +++ b/drd/tests/pth_cancel_locked.stderr.exp @@ -1,6 +1,6 @@ Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 2. - at 0x........: pthread_join* (drd_pthread_intercepts.c:?) + at 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (pth_cancel_locked.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/pth_cond_race.stderr.exp b/drd/tests/pth_cond_race.stderr.exp index 5a2f60d58f..f31e504244 100644 --- a/drd/tests/pth_cond_race.stderr.exp +++ b/drd/tests/pth_cond_race.stderr.exp @@ -5,7 +5,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: thread_func (pth_cond_race.c:?) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_cond_race.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 b/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 index 810788851a..f06fbf0b0d 100644 --- a/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 +++ b/drd/tests/pth_inconsistent_cond_wait.stderr.exp1 @@ -1,11 +1,11 @@ Thread 3: Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........ - at 0x........: pthread_cond_timedwait* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_timedwait (drd_pthread_intercepts.c:?) by 0x........: thread_func (pth_inconsistent_cond_wait.c:?) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -19,7 +19,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -29,7 +29,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 b/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 index c2788560b3..8401e0f328 100644 --- a/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 +++ b/drd/tests/pth_inconsistent_cond_wait.stderr.exp2 @@ -1,11 +1,11 @@ Thread 2: Inconsistent association of condition variable and mutex: condition variable 0x........, mutexes 0x........ and 0x........ - at 0x........: pthread_cond_timedwait* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_timedwait (drd_pthread_intercepts.c:?) by 0x........: thread_func (pth_inconsistent_cond_wait.c:?) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -19,7 +19,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -29,7 +29,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t at 0x........: pthread_cond_signal (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (pth_inconsistent_cond_wait.c:?) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/rwlock_type_checking.stderr.exp b/drd/tests/rwlock_type_checking.stderr.exp index 6c890ac32e..6c9e367e6a 100644 --- a/drd/tests/rwlock_type_checking.stderr.exp +++ b/drd/tests/rwlock_type_checking.stderr.exp @@ -1,6 +1,6 @@ Attempt to use a user-defined rwlock as a POSIX rwlock: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (rwlock_type_checking.c:?) rwlock 0x........ was first observed at: at 0x........: vgDrdCl_annotate_rwlock (drd.h:?) @@ -10,7 +10,7 @@ Attempt to use a POSIX rwlock as a user-defined rwlock: rwlock 0x......... at 0x........: vgDrdCl_annotate_rwlock (drd.h:?) by 0x........: main (rwlock_type_checking.c:?) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (rwlock_type_checking.c:?) Finished. diff --git a/drd/tests/tc12_rwl_trivial.stderr.exp b/drd/tests/tc12_rwl_trivial.stderr.exp index daabc34e9f..d1214a0d80 100644 --- a/drd/tests/tc12_rwl_trivial.stderr.exp +++ b/drd/tests/tc12_rwl_trivial.stderr.exp @@ -1,9 +1,9 @@ Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc12_rwl_trivial.c:35) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc12_rwl_trivial.c:24) ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) diff --git a/drd/tests/tc18_semabuse.stderr.exp b/drd/tests/tc18_semabuse.stderr.exp index 82f3fddf0b..b34416a9b0 100644 --- a/drd/tests/tc18_semabuse.stderr.exp +++ b/drd/tests/tc18_semabuse.stderr.exp @@ -1,16 +1,16 @@ Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc18_semabuse.c:26) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc18_semabuse.c:23) Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc18_semabuse.c:34) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc18_semabuse.c:23) ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) diff --git a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 index 8e2e8862b2..64089a91b2 100644 --- a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 +++ b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.3 @@ -58,27 +58,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -87,30 +87,30 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_post @@ -122,7 +122,7 @@ FIXME: can't figure out how to verify wrap of sem_post Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. diff --git a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 index 7dcf618830..c52accce8d 100644 --- a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 +++ b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5 @@ -55,27 +55,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -84,30 +84,30 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_post @@ -119,7 +119,7 @@ FIXME: can't figure out how to verify wrap of sem_post Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. diff --git a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc index 7236a3e826..c3714c577b 100644 --- a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc +++ b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.5-ppc @@ -55,27 +55,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -84,30 +84,30 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_post @@ -125,7 +125,7 @@ mutex 0x........ was first observed at: Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) ERROR SUMMARY: 13 errors from 13 contexts (suppressed: 0 from 0) diff --git a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 index 35c0b20336..bd2049f4c6 100644 --- a/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 +++ b/drd/tests/tc20_verifywrap.stderr.exp-glibc2.8 @@ -55,27 +55,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -84,30 +84,30 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_post diff --git a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 index 185f30b64d..275c1e64a0 100644 --- a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 +++ b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3 @@ -80,27 +80,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -109,10 +109,10 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- @@ -121,10 +121,10 @@ rwlock 0x........ was first observed at: [1] sem_init 0x........ value 0 Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy @@ -132,10 +132,10 @@ FIXME: can't figure out how to verify wrap of sem_destroy [1] sem_wait 0x........ value 0 -> 4294967295 Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) [1] sem_post 0x........ value 4294967295 -> 0 @@ -149,7 +149,7 @@ FIXME: can't figure out how to verify wrap of sem_post Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) [1] mutex_destroy error checking mutex 0x........ rc 1 owner 1 diff --git a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b index 19d5156b4b..e69b8fe85e 100644 --- a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b +++ b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.3-b @@ -91,27 +91,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -120,10 +120,10 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- @@ -132,10 +132,10 @@ rwlock 0x........ was first observed at: [1] sem_init 0x........ value 0 Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy @@ -143,10 +143,10 @@ FIXME: can't figure out how to verify wrap of sem_destroy [1] sem_wait 0x........ value 0 -> 4294967295 Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) [1] sem_post 0x........ value 4294967295 -> 0 @@ -160,7 +160,7 @@ FIXME: can't figure out how to verify wrap of sem_post Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) [1] mutex_destroy error checking mutex 0x........ rc 1 owner 1 diff --git a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 index 1ce5a7773d..520526c557 100644 --- a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 +++ b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5 @@ -79,27 +79,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -108,10 +108,10 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- @@ -120,10 +120,10 @@ rwlock 0x........ was first observed at: [1] sem_init 0x........ value 0 Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy @@ -131,10 +131,10 @@ FIXME: can't figure out how to verify wrap of sem_destroy [1] sem_wait 0x........ value 0 -> 4294967295 Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) [1] sem_post 0x........ value 4294967295 -> 0 @@ -148,7 +148,7 @@ FIXME: can't figure out how to verify wrap of sem_post Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) [1] mutex_destroy error checking mutex 0x........ rc 1 owner 1 diff --git a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc index 44e9c2dae6..4ea959535e 100644 --- a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc +++ b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.5-ppc @@ -79,27 +79,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -108,10 +108,10 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- @@ -120,10 +120,10 @@ rwlock 0x........ was first observed at: [1] sem_init 0x........ value 0 Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy @@ -131,10 +131,10 @@ FIXME: can't figure out how to verify wrap of sem_destroy [1] sem_wait 0x........ value 0 -> 4294967295 Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) [1] sem_post 0x........ value 4294967295 -> 0 @@ -156,7 +156,7 @@ mutex 0x........ was first observed at: Destroying locked rwlock: rwlock 0x......... at 0x........: main (tc20_verifywrap.c:262) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:216) [1] mutex_trylock recursive mutex 0x........ rc 0 owner 0 [1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0 diff --git a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 index de73ec31cd..2683d57585 100644 --- a/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 +++ b/drd/tests/tc20_verifywrap2.stderr.exp-glibc2.8 @@ -79,27 +79,27 @@ FIXME: can't figure out how to verify wrap of pthread_broadcast_signal Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:179) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:178) (1) no error on next line (2) no error on next line (3) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:196) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) Reader-writer lock reinitialization: rwlock 0x......... - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:199) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) (4) no error on next line (5) no error on next line @@ -108,10 +108,10 @@ rwlock 0x........ was first observed at: (8) ERROR on next line Reader-writer lock not locked by calling thread: rwlock 0x......... - at 0x........: pthread_rwlock_unlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_unlock (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:212) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:186) ---------------- sem_* ---------------- @@ -120,10 +120,10 @@ rwlock 0x........ was first observed at: [1] sem_init 0x........ value 0 Semaphore reinitialization: semaphore 0x........ - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:231) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) FIXME: can't figure out how to verify wrap of sem_destroy @@ -131,10 +131,10 @@ FIXME: can't figure out how to verify wrap of sem_destroy [1] sem_wait 0x........ value 0 -> 4294967295 Invalid semaphore: semaphore 0x........ - at 0x........: sem_wait* (drd_pthread_intercepts.c:?) + at 0x........: sem_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:242) semaphore 0x........ was first observed at: - at 0x........: sem_init* (drd_pthread_intercepts.c:?) + at 0x........: sem_init (drd_pthread_intercepts.c:?) by 0x........: main (tc20_verifywrap.c:228) [1] sem_post 0x........ value 4294967295 -> 0 diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-32bit b/drd/tests/tc22_exit_w_lock.stderr.exp-32bit index 7f27030ab5..2577eeb4f6 100644 --- a/drd/tests/tc22_exit_w_lock.stderr.exp-32bit +++ b/drd/tests/tc22_exit_w_lock.stderr.exp-32bit @@ -3,7 +3,7 @@ Conflicting load by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) @@ -15,7 +15,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) @@ -27,7 +27,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_used (offset 4, size 8) in libpthread-?.?.so, libpthread.so.0:Data Other segment start (thread 2) @@ -39,7 +39,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_used (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data Other segment start (thread 2) @@ -51,7 +51,7 @@ Conflicting load by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data Other segment start (thread 2) @@ -63,7 +63,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache (offset 4, size 8) in libpthread-?.?.so, libpthread.so.0:Data Other segment start (thread 2) @@ -75,7 +75,7 @@ Conflicting load by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_actsize (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) @@ -87,7 +87,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache (offset 0, size 8) in libpthread-?.?.so, libpthread.so.0:Data Other segment start (thread 2) @@ -99,7 +99,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_actsize (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) @@ -111,7 +111,7 @@ Conflicting load by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) @@ -123,7 +123,7 @@ Conflicting store by thread 1 at 0x........ size 4 at 0x........: __deallocate_stack (in libpthread-?.?.so) by 0x........: __free_tcb (in libpthread-?.?.so) by 0x........: pthread_join (in libpthread-?.?.so) - by 0x........: pthread_join* (drd_pthread_intercepts.c:?) + by 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) Allocation context: stack_cache_lock (offset 0, size 4) in libpthread-?.?.so, libpthread.so.0:BSS Other segment start (thread 2) diff --git a/drd/tests/tc22_exit_w_lock.stderr.exp-64bit b/drd/tests/tc22_exit_w_lock.stderr.exp-64bit index 090a0c104d..a2fa1fe9ef 100644 --- a/drd/tests/tc22_exit_w_lock.stderr.exp-64bit +++ b/drd/tests/tc22_exit_w_lock.stderr.exp-64bit @@ -1,6 +1,6 @@ Mutex still locked at thread exit: mutex 0x........, recursion count 1, owner 3. - at 0x........: pthread_join* (drd_pthread_intercepts.c:?) + at 0x........: pthread_join (drd_pthread_intercepts.c:?) by 0x........: main (tc22_exit_w_lock.c:43) mutex 0x........ was first observed at: at 0x........: pthread_mutex_lock (drd_pthread_intercepts.c:?) diff --git a/drd/tests/tc23_bogus_condwait.stderr.exp-darwin b/drd/tests/tc23_bogus_condwait.stderr.exp-darwin index 81ce9e75ab..d687339c23 100644 --- a/drd/tests/tc23_bogus_condwait.stderr.exp-darwin +++ b/drd/tests/tc23_bogus_condwait.stderr.exp-darwin @@ -16,7 +16,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:20) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -27,7 +27,7 @@ The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:75) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:57) Mutex not locked by calling thread: mutex 0x........, recursion count 1, owner 2. @@ -43,7 +43,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:24) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 b/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 index 46c92e168e..f60012cb46 100644 --- a/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 +++ b/drd/tests/tc23_bogus_condwait.stderr.exp-linux-x86 @@ -9,7 +9,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:20) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) Thread 1: @@ -26,7 +26,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:24) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) @@ -37,7 +37,7 @@ The object at address 0x........ is not a mutex. at 0x........: pthread_cond_wait (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:75) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:57) Thread 3: @@ -46,10 +46,10 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:28) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:57) Thread 1: @@ -66,7 +66,7 @@ Probably a race condition: condition variable 0x........ has been signaled but t by 0x........: rescue_me (tc23_bogus_condwait.c:32) by 0x........: vgDrd_thread_wrapper (drd_pthread_intercepts.c:?) cond 0x........ was first observed at: - at 0x........: pthread_cond_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_cond_init (drd_pthread_intercepts.c:?) by 0x........: main (tc23_bogus_condwait.c:56) mutex 0x........ was first observed at: at 0x........: pthread_mutex_init (drd_pthread_intercepts.c:?) diff --git a/drd/tests/trylock.stderr.exp b/drd/tests/trylock.stderr.exp index 68993a51e4..5ff1548c91 100644 --- a/drd/tests/trylock.stderr.exp +++ b/drd/tests/trylock.stderr.exp @@ -7,10 +7,10 @@ Locking rwlock via pthread_rwlock_tryrdlock(). Locking rwlock via pthread_rwlock_timedrdlock(). Attempt to lock for writing recursively (not allowed). Recursive writer locking not allowed: rwlock 0x......... - at 0x........: pthread_rwlock_wrlock* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_wrlock (drd_pthread_intercepts.c:?) by 0x........: main (trylock.c:?) rwlock 0x........ was first observed at: - at 0x........: pthread_rwlock_init* (drd_pthread_intercepts.c:?) + at 0x........: pthread_rwlock_init (drd_pthread_intercepts.c:?) by 0x........: main (trylock.c:?) Locking mutex via pthread_mutex_trylock(). Locking mutex via pthread_mutex_lock().