https://bugs.kde.org/show_bug.cgi?id=513598
Aaron Merey <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REPORTED |CONFIRMED Ever confirmed|0 |1 --- Comment #6 from Aaron Merey <[email protected]> --- I was able to figure this out. Helgrind got confused by a lock resource leak in the client program. In this case a struct with rwlock and mutex fields is freed without pthread_{rwlock,mutex}_destroy being called on the locks. A new struct is then allocated such that an rwlock in the new struct is at the exact same address as a mutex from the freed struct. When pthread_rwlock_rdlock is called, helgrind still thinks there is a mutex at that address so it warns that a mutex is passed to an rwlock function. Helgrind should be able to detect this kind of lock resource leak and avoid the 'lk->kind == LK_rdwr' assert failure. Helgrind could also raise an error for locks that aren't destroyed when the process exits. I will work on a patch for this. -- You are receiving this mail because: You are watching all bug changes.
