apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <fua...@apache.org>
Subject Re: 1.4.next next weekend or so?
Date Sat, 27 Apr 2013 03:11:47 GMT
On 26.04.2013 21:18, Jeff Trawick wrote:
> I can RM...
coool!

I was recently on hunting an old NetWare-only with apr_pool_parent_get() 
bug with Rainer, and he finally suggested a patch like this:

Index: dbd/apr_dbd.c
===================================================================
--- dbd/apr_dbd.c	(revision 1463267)
+++ dbd/apr_dbd.c	(working copy)
@@ -102,8 +102,10 @@
      }

      /* Top level pool scope, need process-scope lifetime */
-    for (parent = pool;  parent; parent = apr_pool_parent_get(pool))
-         pool = parent;
+    for (parent = apr_pool_parent_get(pool);
+        parent && parent != pool;
+        parent = apr_pool_parent_get(pool))
+       pool = parent;
  #if APU_DSO_BUILD
      /* deprecate in 2.0 - permit implicit initialization */
      apu_dso_init(pool);
Index: dbm/apr_dbm.c

I verified that this fixes the NetWare crash while we believe that this 
shouldnt make a difference for all other platforms ...
the same loop construct appears in 3 more files, where in apu_dso.c it 
looks slightly different ...

I really would like to get these patches in before release since without 
I cant load mod_lua anymore due its dep to apr_dbd ...

if nobody objects I would like to commit the below:

Index: crypto/apr_crypto.c
===================================================================
--- crypto/apr_crypto.c	(revision 1463267)
+++ crypto/apr_crypto.c	(working copy)
@@ -100,7 +100,9 @@
      }

      /* Top level pool scope, need process-scope lifetime */
-    for (parent = pool; parent; parent = apr_pool_parent_get(pool))
+    for (parent = apr_pool_parent_get(pool);
+         parent && parent != pool;
+         parent = apr_pool_parent_get(pool))
          pool = parent;
  #if APU_DSO_BUILD
      /* deprecate in 2.0 - permit implicit initialization */
Index: dbd/apr_dbd.c
===================================================================
--- dbd/apr_dbd.c	(revision 1463267)
+++ dbd/apr_dbd.c	(working copy)
@@ -102,8 +102,10 @@
      }

      /* Top level pool scope, need process-scope lifetime */
-    for (parent = pool;  parent; parent = apr_pool_parent_get(pool))
-         pool = parent;
+    for (parent = apr_pool_parent_get(pool);
+        parent && parent != pool;
+        parent = apr_pool_parent_get(pool))
+       pool = parent;
  #if APU_DSO_BUILD
      /* deprecate in 2.0 - permit implicit initialization */
      apu_dso_init(pool);
Index: dbm/apr_dbm.c
===================================================================
--- dbm/apr_dbm.c	(revision 1463267)
+++ dbm/apr_dbm.c	(working copy)
@@ -129,8 +129,10 @@
          apr_pool_t *parent;

          /* Top level pool scope, need process-scope lifetime */
-        for (parent = pool;  parent; parent = apr_pool_parent_get(pool))
-             pool = parent;
+        for (parent = apr_pool_parent_get(pool);
+             parent && parent != pool;
+             parent = apr_pool_parent_get(pool))
+            pool = parent;

          /* deprecate in 2.0 - permit implicit initialization */
          apu_dso_init(pool);

for the last one in apu_dso.c I need to do some further testing 1st ...

Gün.







Mime
View raw message