Re: /bzr/squid3/trunk/ r9573: SourceLayout: acl/, take 1

From: Robert Collins <robertc_at_squid-cache.org>
Date: Mon, 16 Mar 2009 13:31:47 +1100

On Sun, 2009-03-15 at 14:04 -0600, Alex Rousskov wrote:
>
> If some ACL type is not registered with Squid executable, do you think
> test-build would expose the problem, with the current set of tests? I
> doubt it would.
>
> This lack of runtime testing of registered types is probably the
> reason
> why I have not noticed the problem reported by Christos even though I
> did run test-build script. I am guessing we need to add test cases
> that
> test registration.

squid --parse of a config with one-of-everything should do it.

Yes, the convenience libraries do strip out static initializers, I don't
think its deliberate in ld, rather that the graph traversal is coded as:
missing_refs = [symbol.references for symbol in mentioned_dot_o_files]
while missing_refs:
    new_symbols = missing_refs
    included.add(new_symbols)
    missing_refs = [new_symbols.references for symbol in new_symbols]

And all the static initializing code in the .a convenience library is
never directly referred to (by design), with the result that it is not
included. I don't think that a pure virtual approach will work any
better because the same not-directly-listed result will occur.

-Rob

Received on Mon Mar 16 2009 - 02:32:05 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 16 2009 - 12:00:03 MDT