From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45043 invoked by alias); 11 Dec 2018 15:07:18 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 45017 invoked by uid 89); 11 Dec 2018 15:07:18 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=BAYES_20,KAM_NUMSUBJECT,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=H*f:sk:B6beozo, H*f:CAKOQZ8y, H*f:sk:2f4c983, H*f:sk:rbMPS3y X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 11 Dec 2018 15:07:17 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0AC06308A94E; Tue, 11 Dec 2018 15:07:16 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5F0246015E; Tue, 11 Dec 2018 15:07:13 +0000 (UTC) Subject: Re: [PATCH] Set DEMANGLE_RECURSION_LIMIT to 1536 To: Ian Lance Taylor References: <2f4c983b-494f-93ba-d6c6-1fe0a9730a76@redhat.com> <20181210151020.GA12380@tucnak> <2b97a775-ed9a-9bd2-e574-52b679f464c7@redhat.com> <20181211065804.GH12380@tucnak> <1530d100-1161-3241-8f5c-59aaa7b3ba9f@redhat.com> Cc: Jakub Jelinek , Jeff Law , Jason Merrill , Michael Matz , Nick Clifton , "H.J. Lu" , Richard Guenther , sgayou@redhat.com, Tom Tromey , gcc-patches , Binutils From: Pedro Alves Message-ID: Date: Tue, 11 Dec 2018 15:07:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-12/txt/msg00700.txt.bz2 On 12/11/2018 02:25 PM, Ian Lance Taylor wrote: > On Tue, Dec 11, 2018 at 3:05 AM Pedro Alves wrote: >> Ian earlier mentioned that we've wanted to avoid malloc because some >> programs call the demangler from a signal handler, but it seems like >> we already do, these functions already aren't safe to use from >> signal handlers as is. Where does the "we can't use malloc" idea >> come from? Is there some entry point that avoids >> the malloc/realloc/free calls? > > cplus_demangle_v3_callback and cplus_demangle_print_callback. Ah, gotcha. Thanks! Interesting. Pedro Alves