]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Illumos helgrind: fix for pthread_rwlock_timedrdlock and pthread_rwlock_timedrwlock
authorPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 3 Apr 2025 17:56:51 +0000 (19:56 +0200)
committerPaul Floyd <pjfloyd@wanadoo.fr>
Thu, 3 Apr 2025 17:56:51 +0000 (19:56 +0200)
commit43957bdc6b9b1146cda0f4e6f558286f9b05c329
tree1a29890ebe0b23747483daef16dacd3515156077
parent5cb67042c8dfae139def50942dfa8243442752df
Illumos helgrind: fix for pthread_rwlock_timedrdlock and pthread_rwlock_timedrwlock

On Illumos these two functions are implemented by calling
pthread_rwlock_clockrdlock and pthread_rwlock_clockwrlock respectively.
Since we intercept both it was appearing as though the lock was being
taken recursively when it wasn't. Fixed it by using a static flag for each
and not callinng the client requests if already in a call to the timed
functions.

I think that musl also does this but, ho-hum, Helgrind has never worked on musl.
helgrind/hg_intercepts.c