From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Chip Coldwell Newsgroups: gmane.emacs.devel Subject: seg-fault in unexelf.c Date: Fri, 21 Jul 2006 13:59:12 -0400 (EDT) Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Trace: sea.gmane.org 1153504784 9347 80.91.229.2 (21 Jul 2006 17:59:44 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 21 Jul 2006 17:59:44 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 21 19:59:38 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G3zHd-0008Dv-Px for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 19:59:30 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3zHd-0003vl-Bi for ged-emacs-devel@m.gmane.org; Fri, 21 Jul 2006 13:59:29 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1G3zHT-0003vW-7R for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:59:19 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1G3zHQ-0003vJ-J2 for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:59:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G3zHQ-0003vG-CV for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:59:16 -0400 Original-Received: from [66.187.233.31] (helo=mx1.redhat.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1G3zHs-0005YZ-Ps for emacs-devel@gnu.org; Fri, 21 Jul 2006 13:59:44 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6LHxA5m003748 for ; Fri, 21 Jul 2006 13:59:10 -0400 Original-Received: from mail.boston.redhat.com (mail.boston.redhat.com [172.16.76.12]) by int-mx1.corp.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id k6LHx9Dr018122 for ; Fri, 21 Jul 2006 13:59:10 -0400 Original-Received: from dhcp83-29.boston.redhat.com (dhcp83-29.boston.redhat.com [172.16.83.29]) by mail.boston.redhat.com (8.12.8/8.12.8) with ESMTP id k6LHx9RT007200 for ; Fri, 21 Jul 2006 13:59:09 -0400 Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:57435 Archived-At: I have been having a problem building emacs on GNU/Linux (in particular, the Fedora Core 5 distribution). The build process runs the following command in the src/ subdirectory: ./temacs -l loadup -batch dump to cause the temacs binary (essentially emacs without the Lisp code loaded) to set up the Lisp environment in the process address space and then create a new ELF file with a new .data section that contains the .data and .bss sections from the temacs process. If I build the temacs binary with no compiler optimization (gcc (GCC) 4.1.0 20060304 (Red Hat 4.1.0-3)), the command above seg-faults in the unexec function (file unexelf.c) while executing this line: memcpy (NEW_SECTION_H (nn).sh_offset + new_base, (caddr_t) OLD_SECTION_H (n).sh_addr, new_data2_size); I unrolled the memcpy thus: p = NEW_SECTION_H (nn).sh_offset + new_base; q = (caddr_t) OLD_SECTION_H (n).sh_addr; for(i=0; i