Topic
No replies
UV8V_Huy_Viet_Le
UV8V_Huy_Viet_Le
3 Posts
ACCEPTED ANSWER

Pinned topic FMR & FMW in pthread library.

‏2012-02-20T18:49:57Z |
Hi,

We would like to know if someone hit the issue of Free memory read or write in the pthread library under Red Hat Enterprise Linux 5.4 or 5.7 64 bits.

Our program, call the function pthread_mutex_lock() & unlock().

If we look at the stack return by Purify 7.0.1

in one case:

__pthread_tpp_change_priority http://libpthread.so.0
__pthread_mutex_lock_full http://libptread.so.0
xyz_set_lock xyz.c:123
-> pthread_mutex_lock(&a_lock);

in the other case

__pthread_tpp_change_priority http://libpthread.so.0
xyz_unset_lock xyz.c:234
-> pthread_mutex_unlock(&a_lock)

a_lock was initialize with

pthread_mutexattr_t mutex_attr;
pthread_mutexattr_settype(&mutex_attr, PTHREAD_MUTEX_RECURSIVE);
pthread_mutex_init(&a_lock, &mutex_attr);

if we run in gdb the code and look at a_lock, everything seems allocated properly.

and the memory that was free was allocated after initialize a_lock.

Any idea what to look for?

Regards,

Huy