From patchwork Fri Sep 20 17:40:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34615 Received: (qmail 115817 invoked by alias); 20 Sep 2019 17:40:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 115808 invoked by uid 89); 20 Sep 2019 17:40:44 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2019 17:40:43 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id B395F5606D; Fri, 20 Sep 2019 13:40:41 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ca6WxmIw76bO; Fri, 20 Sep 2019 13:40:41 -0400 (EDT) Received: from murgatroyd.Home (71-218-73-27.hlrn.qwest.net [71.218.73.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPSA id 5F5815606B; Fri, 20 Sep 2019 13:40:41 -0400 (EDT) From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH] Fix crash in Ada "catch exception" Date: Fri, 20 Sep 2019 11:40:38 -0600 Message-Id: <20190920174038.9760-1-tromey@adacore.com> MIME-Version: 1.0 PR ada/24919 concerns a crash that Tom de Vries noticed when running the "catch_ex" Ada test case. He sent a test executable and tracked this down to commit f21c2bd7b7 ("Fix Fortran regression with variables in nested functions"). Looking at that patch, you can see the obvious error: - return 0; + return true; Oops! This patch fixes the bug. Tested on x86-64 Fedora 29. gdb/ChangeLog 2019-09-20 Tom Tromey PR ada/24919: * block.c (contained_in): Fix final return value. --- gdb/ChangeLog | 5 +++++ gdb/block.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gdb/block.c b/gdb/block.c index ca4dc22cf30..5ba44d47ba7 100644 --- a/gdb/block.c +++ b/gdb/block.c @@ -86,7 +86,7 @@ contained_in (const struct block *a, const struct block *b, } while (a != NULL); - return true; + return false; }