Re: APR_POOL_DEBUG usage question
Yann Ylavic <[email protected]>
| Newsgroups | gmane.comp.apache.apr.devel |
|---|---|
| Message-ID | <CAKQ1sVO-ueABk-h4-dvXj8nzfoes-ZLEPfw_Hb52azaR5qiBjQ@mail.gmail.com> |
On Wed, Jan 31, 2024 at 7:44 PM Simon Walter <[email protected]> wrote: > > My question about how to debuging should be done. abort() is called on > apr_initialize(): > > Program received signal SIGABRT, Aborted. Does the attached patch fix the issue with apr_initialize()? Regards; Yann.
apr_pool_create_ex_debug.patch
(text/x-patch, 1 KB)
Index: memory/unix/apr_pools.c
===================================================================
--- memory/unix/apr_pools.c (revision 1913753)
+++ memory/unix/apr_pools.c (working copy)
@@ -2029,6 +2029,13 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex_debug
pool->file_line = file_line;
#if APR_HAS_THREADS
+ pool->owner = apr_os_thread_current();
+#endif /* APR_HAS_THREADS */
+#ifdef NETWARE
+ pool->owner_proc = (apr_os_proc_t)getnlmhandle();
+#endif /* defined(NETWARE) */
+
+#if APR_HAS_THREADS
if (parent == NULL || parent->allocator != allocator) {
apr_status_t rv;
@@ -2067,13 +2074,6 @@ APR_DECLARE(apr_status_t) apr_pool_create_ex_debug
pool->ref = NULL;
}
-#if APR_HAS_THREADS
- pool->owner = apr_os_thread_current();
-#endif /* APR_HAS_THREADS */
-#ifdef NETWARE
- pool->owner_proc = (apr_os_proc_t)getnlmhandle();
-#endif /* defined(NETWARE) */
-
#if (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE)
apr_pool_log_event(pool, "CREATE", file_line, 1);
#endif /* (APR_POOL_DEBUG & APR_POOL_DEBUG_VERBOSE) */