[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: One year since last libtool release

From: Bob Friesenhahn
Subject: Re: One year since last libtool release
Date: Wed, 4 Nov 2009 16:30:44 -0600 (CST)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

On Wed, 4 Nov 2009, Ralf Wildenhues wrote:

* Bob Friesenhahn wrote on Wed, Nov 04, 2009 at 07:45:56PM CET:
I am not sure how one would test for this in an automated fashion
since the only effect is a performance reduction.  It requires
system-dependent tools in order to watch the system calls and see
what is actually going on.

Well, as a first approximation, both the measuring and the portability
aspects can simply be ignored.  Just having something that reliably
shows the issue for some setup already helps.  You can even require root
rights; that may prevent most users from ever running the test (which is
good!) but will still enable developers to try it out in their sandbox.

I really hate to hijack this discussion thread since there were already two discussion threads on this topic. Regardless, what we should expect to see when loading a module which has no additional dependencies is:

 1) read somepath/
 2) stat somepath/ (or whatever dlname was parsed from
 3) dlopen somepath/ (or supporting OS calls like open, mmap,

but instead between steps 1 & 2, we see 'stat lostsapaths/module.a' for every path in the system's shared library search path. The reason for this is pretty clear, since libltdl speculatively tries searching for a preloaded module first (necessary for security), but unfortunately, supplies the same argument to all of the available module loaders.

Using an existing test case like, when we are loading "./", the output of a tool like 'truss' (SVR4, Solaris, FreeBSD) or 'strace' (Linux) should not show any attempt to access a file called "good-plugin.a", except for possibly on AIX where a loadable library or module might use the .a extension.

It is not normally necessary to require root access to run tools like 'truss' or 'strace' on a process that you own, but special access might be required to run a DTrace-based tool like dtruss.

The alternative to the fancy fragile test is to simply fix the problem, which should not be difficult since it is a simple problem. The solution may be to add a flag which indicates that the desired load should be static linkage so that only the preloader processes the request.

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]