From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jaromir Capik Newsgroups: gmane.emacs.bugs Subject: bug#20614: Segmentation fault when building on Power8 Little Endian Date: Thu, 8 Oct 2015 09:27:45 -0400 (EDT) Message-ID: <1486765641.67448157.1444310865021.JavaMail.zimbra@redhat.com> References: <555C3E3C.4090700@redhat.com> <5613894B.9070902@redhat.com> <5613B614.4090805@redhat.com> <83egh8xczn.fsf@gnu.org> <5614D522.9080900@redhat.com> <56150F86.2070706@redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444320461 539 80.91.229.3 (8 Oct 2015 16:07:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Oct 2015 16:07:41 +0000 (UTC) Cc: 20614@debbugs.gnu.org To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 08 18:07:33 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from eggs.gnu.org ([208.118.235.92]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZkDj7-0005rt-Tw for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 18:07:30 +0200 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkDiC-0000KF-Hm for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 12:07:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:40588) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkDiC-0000H6-61 for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 12:06:32 -0400 Original-Received: from localhost ([::1]:35808 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkDiC-0004et-1q for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Oct 2015 12:06:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34912) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkDht-0004VA-Nq for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 12:06:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkDgk-0007HN-OZ for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 12:06:13 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:43865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkDgk-0007HH-J2 for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 12:05:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZkDgk-0001Zj-9p for bug-gnu-emacs@gnu.org; Thu, 08 Oct 2015 12:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jaromir Capik Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Oct 2015 16:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20614 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20614-submit@debbugs.gnu.org id=B20614.14443202666007 (code B ref 20614); Thu, 08 Oct 2015 16:05:02 +0000 Original-Received: (at 20614) by debbugs.gnu.org; 8 Oct 2015 16:04:26 +0000 Original-Received: from localhost ([127.0.0.1]:32836 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkDg9-0001Yn-B1 for submit@debbugs.gnu.org; Thu, 08 Oct 2015 12:04:26 -0400 Original-Received: from mx6-phx2.redhat.com ([209.132.183.39]:46156) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZkBEY-0005x9-Q7 for 20614@debbugs.gnu.org; Thu, 08 Oct 2015 09:27:47 -0400 Original-Received: from zmail15.collab.prod.int.phx2.redhat.com (zmail15.collab.prod.int.phx2.redhat.com [10.5.83.17]) by mx6-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t98DRjdA010942; Thu, 8 Oct 2015 09:27:45 -0400 In-Reply-To: X-Originating-IP: [10.34.24.121] X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF39 (Linux)/8.0.6_GA_5922) Thread-Topic: bug#20614: Segmentation fault when building on Power8 Little Endian Thread-Index: r6DCqrAq9rCd7flHolPRjxlKfoeclg== X-Mailman-Approved-At: Thu, 08 Oct 2015 12:04:23 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 Xref: news.gmane.org gmane.emacs.bugs:107449 Archived-At: Hello guys. > > Awesome. The patch fixes the problem and I can build the emacs under > > PPC64LE. > > Does it mean only the unexec stage completes without segfault? Or the > resulting binary also runs successfully? The unexec call runs without segfaults now and the resulting binary can be started and exited (that was all I tested). > > By the way .toc is still not fixed. It is specific to ppc64. And it > > doesn't cause the segfault, though. It has a data and addresses. > > It seems that unexec corrupted it:( > > I guess you mean the entry in > https://bugzilla.redhat.com/show_bug.cgi?id=1265271#c16 . > > .rela.plt -> .plt > .rela.toc -> empty string > > What does the above notation stand for? Is this the output of some > tool? Then what would be the output for src/temacs? That is a debug output I put in the relocation udoing loop where the segfault occured when the section names were compared with listed literals. I was printing the section names of REL/RELA sections and their PROGBITS/NOBITS counterparts. The segfault occured when accessing 'old_section_names + NEW_SECTION_H (section.sh_info).sh_name' where section.sh_name was '.rela.toc'. That means it was pointing to an invalid address. When the .plt evaluation was fixed, the segfault disappeared, but the NEW_SECTION_H (section.sh_info).sh_type is NULL now and the section name is empty. The question is whether this is ok or not. After looking at the complete list of sections it seems to be a PPC specific oddity and I'm looking at the code to make myself sure it doesn't need a special care. So, right now it requires no attention from your side. Thanks, Jaromir. -- Jaromir Capik Red Hat Czech, s.r.o. Software Engineer / Secondary Arch Email: jcapik@redhat.com Web: www.cz.redhat.com Red Hat Czech s.r.o., Purkynova 99/71, 612 45, Brno, Czech Republic IC: 27690016