From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17105 invoked by alias); 12 Jan 2015 10:19:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 17043 invoked by uid 55); 12 Jan 2015 10:18:58 -0000 From: "rguenther at suse dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64535] Emergency buffer for exception allocation too small Date: Mon, 12 Jan 2015 10:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenther at suse dot de X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg00774.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535 --- Comment #10 from rguenther at suse dot de --- On Mon, 12 Jan 2015, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535 > > --- Comment #9 from Jakub Jelinek --- > If all allocations from the emergency pool are at least > sizeof(__cxa_refcounted_exception) long (or what is the minimum), then trying > to split the memory into smaller chunks (down to sizeof(free_entry)) might be > counter-productive. Maybe, it's not 100% clear to me as the small remains could be merged with a released entry to an even larger one. That said, I tried to make the allocation class generic enough for re-use, but adding a min_free_size const is certainly possible (template parameters for arena size and minimum free list element size). If re-testing finishes successfully I'll give the sorting and merging a stab, shouldn't be too difficult.