Re: svn commit: r1822879 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

2018-02-06 Thread Joe Orton
On Mon, Feb 05, 2018 at 09:06:09AM -0600, William A Rowe Jr wrote:
> You can't retrieve in the register fn hook, without creating load order
> dependencies.

Yup, that's why there is ap_hook_optional_fn_retrieve which is the right 
place to do it.


Re: svn commit: r1822879 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

2018-02-05 Thread William A Rowe Jr
You can't retrieve in the register fn hook, without creating load order
dependencies.



On Feb 2, 2018 02:44, "Joe Orton"  wrote:

> On Thu, Feb 01, 2018 at 03:01:41PM -, yla...@apache.org wrote:
> > Author: ylavic
> > Date: Thu Feb  1 15:01:40 2018
> > New Revision: 1822879
> >
> > URL: http://svn.apache.org/viewvc?rev=1822879&view=rev
> > Log:
> > mod_proxy: follow up to r1822849 and r1822878.
> >
> > Does r1822878's "static" APR_RETRIEVE_OPTIONAL_FN work if, say,
> mod_proxy is
> > builtin but mod_http2 isn't?
>
> I'd guess not!
>
> > Not worth taking the risk here since it's not a fast path...
> >
> > Note: if this is an issue, I'm afraid it applies elsewhere too.
>
> The only places I found with optional fn declared static within a
> function were both pointlessly static and safe, fixed in r1822931.  It's
> funny since we have a specific hook for retrieving optional functions at
> the right time, but it's almost never used.  Most modules do it in
> post_config which is safe.
>
> Regards, Joe
>


Re: svn commit: r1822879 - /httpd/httpd/trunk/modules/proxy/proxy_util.c

2018-02-02 Thread Joe Orton
On Thu, Feb 01, 2018 at 03:01:41PM -, yla...@apache.org wrote:
> Author: ylavic
> Date: Thu Feb  1 15:01:40 2018
> New Revision: 1822879
> 
> URL: http://svn.apache.org/viewvc?rev=1822879&view=rev
> Log:
> mod_proxy: follow up to r1822849 and r1822878.
> 
> Does r1822878's "static" APR_RETRIEVE_OPTIONAL_FN work if, say, mod_proxy is
> builtin but mod_http2 isn't?

I'd guess not!

> Not worth taking the risk here since it's not a fast path...
> 
> Note: if this is an issue, I'm afraid it applies elsewhere too.

The only places I found with optional fn declared static within a 
function were both pointlessly static and safe, fixed in r1822931.  It's 
funny since we have a specific hook for retrieving optional functions at 
the right time, but it's almost never used.  Most modules do it in 
post_config which is safe.

Regards, Joe