From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rLobAixi8GDrUQAAWB0awg (envelope-from ) for ; Thu, 15 Jul 2021 12:28:28 -0400 Received: by simark.ca (Postfix, from userid 112) id ECBE21EDF0; Thu, 15 Jul 2021 12:28:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=MAILING_LIST_MULTI, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 33C8E1E4A3 for ; Thu, 15 Jul 2021 12:28:27 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 996253989C15 for ; Thu, 15 Jul 2021 16:28:26 +0000 (GMT) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by sourceware.org (Postfix) with ESMTPS id 83A23386482A for ; Thu, 15 Jul 2021 16:28:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 83A23386482A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wr1-f54.google.com with SMTP id m2so8606339wrq.2 for ; Thu, 15 Jul 2021 09:28:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=THBWPlCBupVEKRnEg84BCSmZNoGhr7h0P1YCWDcX434=; b=HqWSWNtr99Jlb8Lq6XqWxBJ5IwQqGj033LshFFuAp8sw4eH0YtFuvd0SpDZbcciDgF eGHTq0vWj92XHGagJZa1FHYfaPP3zAO6+my/NbOT5pTDwAErK5e2hTwJRzqOnyuYDOGj 422gQtdtxLLkuII4njs733jw22j5zI05lWfT83wTUhJSzK3yrLvA9WuWGeI4Emjka/Jx Cc3kp/zAfJ0hnJ1Zs656M6/vq+5Xa4oJsRVC7FfMORgN+0EuZWwDnZYzJFYWdt8y3mYn qHutfnoqP/YOArJvYhK6i62PHLLcpmnTd8kBu+KfViQk7crumWBhf//6dYW6Ly5aLWvU YboQ== X-Gm-Message-State: AOAM531/DoF9oCgdqjcXOCGoBLBS7vb+tjlulVMUCbX753JvwoUP80Vi UOGegNBNlo4xoHOcNx07M3GO6/tL8Su6hw== X-Google-Smtp-Source: ABdhPJwM6GAHaxRdEQlZ/oUXmdsv8Alyvpb+wlPuageR5C0MVjLnPwLYw9ORSaHszMJAHoiQaYib7w== X-Received: by 2002:adf:ce83:: with SMTP id r3mr6749486wrn.204.1626366494000; Thu, 15 Jul 2021 09:28:14 -0700 (PDT) Received: from ?IPv6:2001:8a0:f932:6a00:46bc:d03b:7b3a:2227? ([2001:8a0:f932:6a00:46bc:d03b:7b3a:2227]) by smtp.gmail.com with ESMTPSA id z11sm6954790wru.65.2021.07.15.09.28.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Jul 2021 09:28:13 -0700 (PDT) Subject: Re: [PATCH] Avoid expression parsing crash with unknown language From: Pedro Alves To: Tom Tromey , gdb-patches@sourceware.org References: <20210715161618.234526-1-tromey@adacore.com> Message-ID: <383a2192-658c-59e0-7f7b-ac68ace3b2d1@palves.net> Date: Thu, 15 Jul 2021 17:28:11 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210715161618.234526-1-tromey@adacore.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2021-07-15 5:16 p.m., Tom Tromey wrote: > PR gdb/28093 points out that gdb crashes when language is set to > "unknown" and expression parsing is attempted. At first I thought > this was a regression due to the expression rewrite, but it turns out > that older versions crash as well. > > This patch avoids the crash by changing the default expression parser > to throw an exception. I think this is preferable -- the current > behavior of silently doing nothing does not really make sense. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28093 Looks good, thanks!