From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21888 invoked by alias); 17 Jan 2016 06:18:07 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 21866 invoked by uid 89); 17 Jan 2016 06:18:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=sk:languag, 0400, 711 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 (AES256-SHA encrypted) ESMTPS; Sun, 17 Jan 2016 06:18:04 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 676391166F3; Sun, 17 Jan 2016 01:18:02 -0500 (EST) 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 v1wXeQ8UFnQJ; Sun, 17 Jan 2016 01:18:02 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id E68B61166C8; Sun, 17 Jan 2016 01:18:01 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id D92FC4080A; Sun, 17 Jan 2016 10:17:57 +0400 (RET) Date: Sun, 17 Jan 2016 06:18:00 -0000 From: Joel Brobecker To: "Hahnfeld, Jonas" Cc: "gdb-patches@sourceware.org" , "qiyao@gcc.gnu.org" Subject: Re: [PATCH] Fix PR gdb/19208 - SIGSEV while opening Fortran program compiled with ifort Message-ID: <20160117061757.GA4059@adacore.com> References: <233e961324084b0f857047bcf637c655@rwthex-s2-b.rwth-ad.de> <20160106061946.GD4412@adacore.com> <8dcce77f86d345348721e0ff02032c74@rwthex-s2-b.rwth-ad.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="fUYQa+Pmc3FrFX/N" Content-Disposition: inline In-Reply-To: <8dcce77f86d345348721e0ff02032c74@rwthex-s2-b.rwth-ad.de> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2016-01/txt/msg00346.txt.bz2 --fUYQa+Pmc3FrFX/N Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 680 > Ping... Attached is what I just pushed. gdb/ChangeLog: PR gdb/19208 * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name if the function has no name. (tested on x86_64-linux, with no Fortran) > Will this also be included in 7.10.2 (if planned?) As of today, there isn't going to be a 7.10.2. We're very close to branching for 7.11, so I don't think it's worth backporting, as the branch will soon be closed. I also meant to review your comments regarding the documentation we have about how to contribute, and haven't had the time. But thank you for those, because they help us spot areas where the info may have bitrotten. -- Joel --fUYQa+Pmc3FrFX/N Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-GDB-SIGSEGV-opening-a-Fortran-program-compiled-with-.patch" Content-length: 1855 >From dc365182240722969f044918ecd3cab00da55502 Mon Sep 17 00:00:00 2001 From: Jonas Hahnfeld Date: Wed, 6 Jan 2016 10:10:39 +0400 Subject: [PATCH] GDB SIGSEGV opening a Fortran program compiled with ifort This patch fixes a SIGSEGV when trying to open a Fortran program compiled with ifort (reproduced using version using version 16.0.1.150). The error can be reproduce with most, if not any program. For instance, a single file only containing "end", compiled with no additional flag, suffices. gdb/ChangeLog: PR gdb/19208 * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name if the function has no name. --- gdb/ChangeLog | 7 +++++++ gdb/dwarf2read.c | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe8fd6c..dbc4b08 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2016-01-17 Jonas Hahnfeld (tiny change) + + Pushed by Joel Brobecker . + PR gdb/19208 + * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name + if the function has no name. + 2016-01-15 Sandra Loosemore * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET): diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index c410500..1020c12 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -15936,7 +15936,8 @@ read_partial_die (const struct die_reader_specs *reader, compilers pick up the new representation, we'll support this practice. */ if (DW_UNSND (&attr) == DW_CC_program - && cu->language == language_fortran) + && cu->language == language_fortran + && part_die->name != NULL) set_objfile_main_name (objfile, part_die->name, language_fortran); break; case DW_AT_inline: -- 2.5.0 --fUYQa+Pmc3FrFX/N--