You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by sf...@apache.org on 2010/06/14 21:07:03 UTC

svn commit: r954590 - in /httpd/httpd/trunk: STATUS server/eor_bucket.c

Author: sf
Date: Mon Jun 14 19:07:02 2010
New Revision: 954590

URL: http://svn.apache.org/viewvc?rev=954590&view=rev
Log:
Change the eor bucket to use a pre-cleanup to run the log transaction hook.
This fixes some segfaults.

Modified:
    httpd/httpd/trunk/STATUS
    httpd/httpd/trunk/server/eor_bucket.c

Modified: httpd/httpd/trunk/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/STATUS?rev=954590&r1=954589&r2=954590&view=diff
==============================================================================
--- httpd/httpd/trunk/STATUS (original)
+++ httpd/httpd/trunk/STATUS Mon Jun 14 19:07:02 2010
@@ -75,6 +75,8 @@ RELEASE SHOWSTOPPERS:
 
       http://marc.info/?l=apache-httpd-dev&m=123910381908293&w=1
 
+    sf: Has been changed to a pre-cleanup and should be ok now.
+
   * MPM event (maybe others, too) closes open files only after the
     connection has been closed. This could be fixed in apr-util or httpd:
     http://mail-archives.apache.org/mod_mbox/httpd-dev/201005.mbox/<20...@sfritsch.de>

Modified: httpd/httpd/trunk/server/eor_bucket.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/eor_bucket.c?rev=954590&r1=954589&r2=954590&view=diff
==============================================================================
--- httpd/httpd/trunk/server/eor_bucket.c (original)
+++ httpd/httpd/trunk/server/eor_bucket.c Mon Jun 14 19:07:02 2010
@@ -73,9 +73,10 @@ AP_DECLARE(apr_bucket *) ap_bucket_eor_c
          * e.g. the parent pool of the request pool. In this case
          * eor_bucket_destroy might be called at a point of time when the
          * request pool had been already destroyed.
+         * We need to use a pre-cleanup here because a module may create a
+         * sub-pool which is still needed during the log_transaction hook.
          */
-        apr_pool_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup,
-                                  apr_pool_cleanup_null);
+        apr_pool_pre_cleanup_register(r->pool, (void *)b, eor_bucket_cleanup);
     }
     return ap_bucket_eor_make(b, r);
 }