|
From: Michael B A. <io...@gm...> - 2008-07-09 03:18:41
|
On 7/8/08, Howard Chu <hy...@sy...> wrote: > Michael B Allen wrote: > > > On 7/8/08, Howard Chu<hy...@sy...> wrote: > > > > > Typically this happens because the main program has unloaded the shared > > > objects containing the relevant symbols in its shutdown/cleanup > processing. > > > We do this in OpenLDAP slapd too, and I #if out the unload calls when I > need > > > to do this kind of tracking. > > > > > > > Is there any other workaround? > > > > Is it possible to somehow signal valgrind to generate the leak report > > at runtime as opposed to on shutdown? > > > > Otherwise I guess I'll have to create a custom build of the main > > program and comment out the dlclose() calls. That's annoying. > > > > You could always write a stub library with a no-op dlclose()... I started to do that but then I started to worry that there could be some kind of chicken-and-egg issue using LD_PRELOAD to overload dlclose(). No matter. I compiled an vanilla Apache and now valgrind is seeing the symbols. I didn't even have to comment out dlclose() in apr/dso.c. I reconnoiter it's a timing thing. It would be slick if valgrind had an option to *not* discard symbols for a named library. There are a lot of DSOs being used these days. Thanks, Mike |