This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: Understanding why getaddrinfo_a and __gai_enqueue_request use recursive locks
- From: Hal Murray <hmurray at megapathdsl dot net>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: Hal Murray <hmurray at megapathdsl dot net>, libc-help at sourceware dot org
- Date: Mon, 25 Sep 2017 23:29:18 -0700
- Subject: Re: Understanding why getaddrinfo_a and __gai_enqueue_request use recursive locks
- Authentication-results: sourceware.org; auth=none
> Do you mean annotations to find resource leaks?
No. I was looking for a compiler like package that would scan all the source
code to verify that the appropriate lock was held whenever an inner function
was called.
The inner function would need an annotation to say that it was an inner
function and which lock was needed.
The outer functions would need an annotation to say when it was locking or
unlocking a lock. It might work to recognize the POSIX functions.
That probably doesn't work if you lock in one function and unlock in a
different function. I don't think I've ever worked with code like that.
--
These are my opinions. I hate spam.