From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id BF8683858D28 for ; Fri, 1 Jul 2022 16:53:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF8683858D28 Received: by mail-pg1-x530.google.com with SMTP id s206so2908487pgs.3 for ; Fri, 01 Jul 2022 09:53:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5neKCR/bVXRW0vVqn5pcozDj3LoS3j9oSCANdYoxR1A=; b=6l8OGJFLLVERlE84mQR7m1YkTNG3rC1Ec5eOuFMVVeHWTkdqWR1BJJwCYGrcr7WTRh ZG/vek2f6Mr4CZ0xvtGgPR4CsK6tQcYPhCsdU2kQb7imzp9rTvA/Bl97OrTMyejUkFNU aa8Z0/3up4ED+5NrGdTDRsRziDwbasosGUNAi1lqiPicT6sXlBb9DkeMiWY/iO6wtXN1 96CO2lJP3ehThpA9Z3E9L3ArgMfzgE+Cf1S8kF8Sbr1pQuOzKDWI9XT/IzKTuRnME28t HL74NZRlvVb2o5NdXYTrM+Mxp1qmL9R1Xfz1HfkzV6uG4oadvklDGWqAcXMe75mB9txb nMGg== X-Gm-Message-State: AJIora9fKGC85wTJdkJk7IdKotprTJEgzsqTVTx7A9YY545wQpbqQJ3j xHQYuW7pwQ0+En5sQgyzwgA= X-Google-Smtp-Source: AGRyM1vArvpUTa4zGGaMTH84mtXQ1C63dbN0YWgUeG2tirzAMaAmoWsOERRH+Lkqz4Am0JuVfpDq6A== X-Received: by 2002:a63:3c1e:0:b0:40d:2747:4016 with SMTP id j30-20020a633c1e000000b0040d27474016mr13292461pga.372.1656694422700; Fri, 01 Jul 2022 09:53:42 -0700 (PDT) Received: from [192.168.0.29] (65-130-94-229.slkc.qwest.net. [65.130.94.229]) by smtp.gmail.com with ESMTPSA id 2-20020a170902e9c200b00168ba5ac8adsm15779037plk.163.2022.07.01.09.53.41 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Jul 2022 09:53:42 -0700 (PDT) Message-ID: <2f573379-e4c1-cf89-1644-df3067bc6f9a@gmail.com> Date: Fri, 1 Jul 2022 10:53:40 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: RFA: Another Rust demangler recursion limit Content-Language: en-US To: Nick Clifton Cc: gcc-patches@gcc.gnu.org References: <87y1xcn9xu.fsf@redhat.com> From: Jeff Law In-Reply-To: <87y1xcn9xu.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jul 2022 16:53:45 -0000 On 7/1/2022 9:12 AM, Nick Clifton wrote: > Hi Jeff, > > [I am sending this to your directly since you seem to be the only one > reviewing these patches]. > > Hot on the heels of the fix for the recursion problem in demangle_const > a binutils user has filed another PoC that exposes a problem in > demangle_path_maybe_open_generics(): > > https://sourceware.org/bugzilla/show_bug.cgi?id=29312#c1 > > I have redirected them to file a bug report with the gcc system, but in > the hopes of getting a fix in quickly I am also attaching a patch > here. It just does the obvious thing of adding a recursion counter > and limit to the function. OK.  And yes, I wish someone else was looking at this stuff.  Rust isn't really on my radar right now... jeff