mod_http2: adding an abort function to slave connections' pools, so out-of-memory
events lead to a control process abort, as on HTTP/1.x connections.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@
1830534 13f79535-47bb-0310-9956-
ffa450edef68
-*- coding: utf-8 -*-
Changes with Apache 2.5.1
+ *) mod_http2: adding an abort function to slave connections' pools, so out-of-memory
+ events lead to a control process abort, as on HTTP/1.x connections. [Stefan Eissing]
+
*) mod_http2: adding regular memory cleanup when transferring large response bodies. This
reduces memory footprint and avoids memory exhaustion when transferring large files
on 32-bit architectures. Fixes PR 62325. [Stefan Eissing]
return DONE;
}
+/* APR callback invoked if allocation fails. */
+static int abort_on_oom(int retcode)
+{
+ ap_abort_on_oom();
+ return retcode; /* unreachable, hopefully. */
+}
+
conn_rec *h2_slave_create(conn_rec *master, int slave_id, apr_pool_t *parent)
{
apr_allocator_t *allocator;
return NULL;
}
apr_allocator_owner_set(allocator, pool);
+ apr_pool_abort_set(abort_on_oom, pool);
apr_pool_tag(pool, "h2_slave_conn");
-
+
c = (conn_rec *) apr_palloc(pool, sizeof(conn_rec));
if (c == NULL) {
ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_ENOMEM, master,
* @macro
* Version number of the http2 module as c string
*/
-#define MOD_HTTP2_VERSION "1.10.19-DEV"
+#define MOD_HTTP2_VERSION "1.10.20-DEV"
/**
* @macro
* release. This is a 24 bit number with 8 bits for major number, 8 bits
* for minor and 8 bits for patch. Version 1.2.3 becomes 0x010203.
*/
-#define MOD_HTTP2_VERSION_NUM 0x010a13
+#define MOD_HTTP2_VERSION_NUM 0x010a14
#endif /* mod_h2_h2_version_h */