DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22605>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22605

apr_hook_global_pool is not initialized by apr_initialize

           Summary: apr_hook_global_pool is not initialized by
                    apr_initialize
           Product: APR
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: APR
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


apr_dynamic_fn_register needs an initialized apr_hook_global_pool, however 
apr_initialize doesn't do that. Result: apr can't be used outside httpd, 
unless apr_hook_global_pool is initialized manually. This contradicts:

/**
  * Setup any APR internal data structures.  This MUST be the first function
  * called for any APR library.
  * @remark See apr_app_initialize if this is an application, rather than
  * a library consumer of apr.
  */
APR_DECLARE(apr_status_t) apr_initialize(void);

so it's not *any*. Is it an omission or by design? If by design apr_hash_make 
should probably check whether the pool is valid.

Notice that initializing it, in apr_initialize doesn't prevent overriding 
later in server/config.c:

  apr_hook_global_pool=process->pconf;

that's the core that I get when calling an optional function:

#0  apr_palloc (pool=0x0, size=39) at apr_pools.c:621
#1  0x403a9820 in apr_hash_make (pool=0x0) at apr_hash.c:135
#2  0x403dc313 in apr_dynamic_fn_register (
     szName=0x404b3fdb "apr_perlio_apr_file_to_PerlIO",
     pfn=0x404b3c66 <apr_perlio_apr_file_to_PerlIO>) at apr_hooks.c:409
#3  0x404b3c30 in apr_perlio_init (my_perl=0x804b2c0) at apr_perlio.c:414

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to