From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Petr Hracek Newsgroups: gmane.emacs.bugs Subject: bug#20614: Segmentation fault when building on Power8 Little Endian Date: Wed, 7 Oct 2015 14:26:46 +0200 Message-ID: <56150F86.2070706@redhat.com> References: <555C3E3C.4090700@redhat.com> <56025D9A.9080608@redhat.com> <838u7xlbsn.fsf@gnu.org> <56028633.3000303@redhat.com> <83zj0djskx.fsf@gnu.org> <56029707.9040100@redhat.com> <83wpvhjpdd.fsf@gnu.org> <5603D8BE.10300@redhat.com> <834mijkf36.fsf@gnu.org> <56043950.7040108@redhat.com> <83k2rdhaso.fsf@gnu.org> <560BBBF3.6000407@redhat.com> <83r3lf9gq4.fsf@gnu.org> <560D1EAA.3080608@redhat.com> <83bnciaidw.fsf@gnu.org> <560D3DC5.2050804@redhat.com> <837fn6a881.fsf@gnu.org> <560E420B.9070200@redhat.com> <83d1wx7j0e.fsf@gnu.org> <560E7F90.1070609@redhat.com> <83wpv55qog.fsf@gnu.org> <5612295F.4000607@redhat.com> <83twq5zpne.fsf@gnu.org> <56123FF0.3040104@redhat.com> <83oagdzmbj.fsf@gnu.org> <56125DBE.5090305@redhat.com> <83io6lzgpw.fsf@gnu.org> <5612842F.7050102@redhat.com> <83d1wtz29x.fsf@gnu.org> <5613894B.9070902@redhat.com> <5613B614.4090805@redhat.com> <83egh8xczn.fsf@gnu.org> <5614D522.9080900@redhat.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1444220840 26060 80.91.229.3 (7 Oct 2015 12:27:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 7 Oct 2015 12:27:20 +0000 (UTC) Cc: 20614@debbugs.gnu.org, jcapik@redhat.com To: YAMAMOTO Mitsuharu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 07 14:27:12 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZjnoN-0003Tg-0A for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Oct 2015 14:27:11 +0200 Original-Received: from localhost ([::1]:57358 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjnoM-0005ir-9a for geb-bug-gnu-emacs@m.gmane.org; Wed, 07 Oct 2015 08:27:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjnoH-0005iO-V5 for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2015 08:27:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZjnoE-0002E3-Oz for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2015 08:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:40671) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZjnoE-0002Dy-MK for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2015 08:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZjnoE-00030D-Cc for bug-gnu-emacs@gnu.org; Wed, 07 Oct 2015 08:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Petr Hracek Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 07 Oct 2015 12:27: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.144422081311526 (code B ref 20614); Wed, 07 Oct 2015 12:27:02 +0000 Original-Received: (at 20614) by debbugs.gnu.org; 7 Oct 2015 12:26:53 +0000 Original-Received: from localhost ([127.0.0.1]:57875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zjno4-0002zq-TE for submit@debbugs.gnu.org; Wed, 07 Oct 2015 08:26:53 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:49657) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Zjno1-0002zg-BZ for 20614@debbugs.gnu.org; Wed, 07 Oct 2015 08:26:51 -0400 Original-Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 954433C21F; Wed, 7 Oct 2015 12:26:48 +0000 (UTC) Original-Received: from [10.34.4.133] (unused-4-133.brq.redhat.com [10.34.4.133]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t97CQkUO007612; Wed, 7 Oct 2015 08:26:47 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 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-Received-From: 208.118.235.43 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 Xref: news.gmane.org gmane.emacs.bugs:107404 Archived-At: On 10/07/2015 12:56 PM, YAMAMOTO Mitsuharu wrote: > What happens if you apply the following patch? > > YAMAMOTO Mitsuharu > mituharu@math.s.chiba-u.ac.jp > > diff --git a/src/unexelf.c b/src/unexelf.c > index 59e2725..0d67b99 100644 > --- a/src/unexelf.c > +++ b/src/unexelf.c > @@ -730,7 +730,14 @@ unexec (const char *new_name, const char *old_name) > old_plt_index = find_section (".plt", old_section_names, > old_name, old_file_h, old_section_h, 1); > if (old_plt_index != -1) > - if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS) > + if (OLD_SECTION_H (old_plt_index).sh_type != SHT_NOBITS > + || ((OLD_SECTION_H (old_plt_index).sh_addr > + + OLD_SECTION_H (old_plt_index).sh_size > + != OLD_SECTION_H (old_bss_index).sh_addr) > + && (old_sbss_index == -1 > + || (OLD_SECTION_H (old_plt_index).sh_addr > + + OLD_SECTION_H (old_plt_index).sh_size > + != OLD_SECTION_H (old_sbss_index).sh_addr)))) > old_plt_index = -1; > > if (old_sbss_index == -1 && old_plt_index == -1) Awesome. The patch fixes the problem and I can build the emacs under PPC64LE. 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:( -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc Mob: +420777056169 email: phracek@redhat.com