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: Carlos O'Donell <carlos at redhat dot com>
- To: Hal Murray <hmurray at megapathdsl dot net>
- Cc: libc-help at sourceware dot org
- Date: Mon, 25 Sep 2017 13:06:23 -0600
- Subject: Re: Understanding why getaddrinfo_a and __gai_enqueue_request use recursive locks
- Authentication-results: sourceware.org; auth=none
- References: <20170925172352.3634940605C@ip-64-139-1-69.sjc.megapath.net>
On 09/25/2017 11:23 AM, Hal Murray wrote:
>
> carlos@redhat.com said:
>> * Look to see if have a reasonable test that exercises this code path,
>> and if not add one (I think there are tests already that cover this
>> area of code).
>
> Are there any tools that scan source code to check for this sort of thing?
>
> I think you would need a way to annotate helper functions as needing a lock
> and specify the lock. It may also take annotations in the caller function.
For glibc you can't use gcov (since some of the pieces of dependent functionality
are implemented by glibc), but you can use perf e.g. perf record, perf report.
That way you can get coverage.
--
Cheers,
Carlos.