Pthread mutex lock validator

Jonathan Nieder jrnieder@gmail.com
Tue Apr 10 19:55:00 GMT 2012


Carlos O'Donell wrote:
> On Tue, Apr 10, 2012 at 3:16 PM, sanketh nalli <nalli.sanketh@gmail.com> wrote:

>> As part of my senior thesis, I worked on writing a
>> lock dependency validator for libpthread,
>> which is similar to lockdep in Linux.
>> My codes are available here :
>> git@github.com:Sanketh/liblockdep.git
>>
>> I wish to contribute this to glibc/nptl.
[...]
> * Do you plan to stay involved with glibc

The idea _almost_ works as something that could be used as an
LD_PRELOAD library (meaning: no need to rebuild your app to test it!),
but unfortunately the library stores some extra per-thread information
in its custom pthread_mutex_t struct.

Is that a fundamental limitation, or could it be fixed?  If the latter
is the case, I think this could be a pleasant tool to use, without
requiring any change to glibc/nptl.  See fakeroot for an example of
how this can work.

Hope that helps,
Jonathan



More information about the Libc-help mailing list