Return-Path: X-Original-To: apmail-apr-commits-archive@www.apache.org Delivered-To: apmail-apr-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7B5DDF009 for ; Sun, 24 Mar 2013 12:56:35 +0000 (UTC) Received: (qmail 3200 invoked by uid 500); 24 Mar 2013 12:56:34 -0000 Delivered-To: apmail-apr-commits-archive@apr.apache.org Received: (qmail 3056 invoked by uid 500); 24 Mar 2013 12:56:32 -0000 Mailing-List: contact commits-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: Reply-To: dev@apr.apache.org List-Id: Delivered-To: mailing list commits@apr.apache.org Received: (qmail 3040 invoked by uid 99); 24 Mar 2013 12:56:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Mar 2013 12:56:32 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Mar 2013 12:56:31 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2CCB9238899C; Sun, 24 Mar 2013 12:56:11 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1460344 - in /apr/apr-util/branches/1.5.x: ./ buckets/apr_buckets_alloc.c Date: Sun, 24 Mar 2013 12:56:11 -0000 To: commits@apr.apache.org From: sf@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130324125611.2CCB9238899C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sf Date: Sun Mar 24 12:56:10 2013 New Revision: 1460344 URL: http://svn.apache.org/r1460344 Log: Merge r1402907,1406088: If out of mem, abort instead of crashing. Use the pool's abort function if it has one. Make sure we abort, even if the abortfunc returns Modified: apr/apr-util/branches/1.5.x/ (props changed) apr/apr-util/branches/1.5.x/buckets/apr_buckets_alloc.c Propchange: apr/apr-util/branches/1.5.x/ ------------------------------------------------------------------------------ Merged /apr/apr/trunk:r1402907,1406088 Modified: apr/apr-util/branches/1.5.x/buckets/apr_buckets_alloc.c URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.5.x/buckets/apr_buckets_alloc.c?rev=1460344&r1=1460343&r2=1460344&view=diff ============================================================================== --- apr/apr-util/branches/1.5.x/buckets/apr_buckets_alloc.c (original) +++ apr/apr-util/branches/1.5.x/buckets/apr_buckets_alloc.c Sun Mar 24 12:56:10 2013 @@ -65,12 +65,20 @@ APU_DECLARE_NONSTD(apr_bucket_alloc_t *) /* may be NULL for debug mode. */ if (allocator == NULL) { if (apr_allocator_create(&allocator) != APR_SUCCESS) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); abort(); } } #endif - list = apr_bucket_alloc_create_ex(allocator); + if (list == NULL) { + apr_abortfunc_t fn = apr_pool_abort_get(p); + if (fn) + (fn)(APR_ENOMEM); + abort(); + } list->pool = p; apr_pool_cleanup_register(list->pool, list, alloc_cleanup, apr_pool_cleanup_null);