[vhffs-dev] [2211] new suPHP patch, trying to fix a mod suphp memory leak with makes Apache segfault due to memory exhaustion |
[ Thread Index |
Date Index
| More vhffs.org/vhffs-dev Archives
]
- To: vhffs-dev@xxxxxxxxx
- Subject: [vhffs-dev] [2211] new suPHP patch, trying to fix a mod suphp memory leak with makes Apache segfault due to memory exhaustion
- From: subversion@xxxxxxxxxxxxx
- Date: Thu, 06 Sep 2012 23:51:31 +0200
Revision: 2211
Author: gradator
Date: 2012-09-06 23:51:30 +0200 (Thu, 06 Sep 2012)
Log Message:
-----------
new suPHP patch, trying to fix a mod suphp memory leak with makes Apache segfault due to memory exhaustion
Added Paths:
-----------
trunk/vhffs-patches/suphp/13_TuxFamily_suphp-0.7.1-1-free-bucket-in-discard-output.dpatch
Added: trunk/vhffs-patches/suphp/13_TuxFamily_suphp-0.7.1-1-free-bucket-in-discard-output.dpatch
===================================================================
--- trunk/vhffs-patches/suphp/13_TuxFamily_suphp-0.7.1-1-free-bucket-in-discard-output.dpatch (rev 0)
+++ trunk/vhffs-patches/suphp/13_TuxFamily_suphp-0.7.1-1-free-bucket-in-discard-output.dpatch 2012-09-06 21:51:30 UTC (rev 2211)
@@ -0,0 +1,30 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 13_TuxFamily_suphp-0.7.1-1-free-bucket-in-discard-output.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: TuxFamily patch to fix memory leak which makes Apache segfault due to memory exhaustion
+
+@DPATCH@
+diff -Nru a/src/apache2/mod_suphp.c b/src/apache2/mod_suphp.c
+--- a/src/apache2/mod_suphp.c 2009-08-03 14:38:38.000000000 +0000
++++ b/src/apache2/mod_suphp.c 2012-09-06 21:36:51.290474099 +0000
+@@ -523,17 +523,8 @@
+
+ static void suphp_discard_output(apr_bucket_brigade *bb) {
+ apr_bucket *b;
+- const char *buf;
+- apr_size_t len;
+- apr_status_t rv;
+- for (b = APR_BRIGADE_FIRST(bb); b != APR_BRIGADE_SENTINEL(bb); b = APR_BUCKET_NEXT(b)) {
+- if (APR_BUCKET_IS_EOS(b)) {
+- break;
+- }
+- rv = apr_bucket_read(b, &buf, &len, APR_BLOCK_READ);
+- if (rv != APR_SUCCESS) {
+- break;
+- }
++ while ((b = APR_BRIGADE_FIRST(bb)) != APR_BRIGADE_SENTINEL(bb)) {
++ APR_BUCKET_REMOVE(b);
+ }
+ }
+