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: Thu, 1 Oct 2015 16:05:57 +0200 Message-ID: <560D3DC5.2050804@redhat.com> References: <555C3E3C.4090700@redhat.com> <1gpp5vi5xn.fsf@fencepost.gnu.org> <555DD5D3.3020207@redhat.com> <55A3A08A.9060905@redhat.com> <55A4BFB7.3010208@redhat.com> <55F95275.4040209@redhat.com> <56012AA6.7010702@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> 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 1443717679 16575 80.91.229.3 (1 Oct 2015 16:41:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 1 Oct 2015 16:41:19 +0000 (UTC) Cc: 20614@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Oct 01 18:41: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 1Zhguu-0007He-5b for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 18:41:12 +0200 Original-Received: from localhost ([::1]:53250 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zhgut-0000cI-Kv for geb-bug-gnu-emacs@m.gmane.org; Thu, 01 Oct 2015 12:41:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZheVn-0007bf-62 for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 10:07:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZheVi-0007Cy-VN for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 10:07:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33502) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZheVi-0007Co-T6 for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 10:07:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZheVi-0007IF-G8 for bug-gnu-emacs@gnu.org; Thu, 01 Oct 2015 10:07: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: Thu, 01 Oct 2015 14:07: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.144370836827974 (code B ref 20614); Thu, 01 Oct 2015 14:07:02 +0000 Original-Received: (at 20614) by debbugs.gnu.org; 1 Oct 2015 14:06:08 +0000 Original-Received: from localhost ([127.0.0.1]:50706 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZheUo-0007H6-L6 for submit@debbugs.gnu.org; Thu, 01 Oct 2015 10:06:07 -0400 Original-Received: from mx1.redhat.com ([209.132.183.28]:60671) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZheUj-0007Gc-T5 for 20614@debbugs.gnu.org; Thu, 01 Oct 2015 10:06:03 -0400 Original-Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id B0618461C8; Thu, 1 Oct 2015 14:06:00 +0000 (UTC) Original-Received: from [10.40.200.43] (ovpn-200-43.brq.redhat.com [10.40.200.43]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t91E5vjU005944; Thu, 1 Oct 2015 10:05:59 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <83bnciaidw.fsf@gnu.org> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 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:107151 Archived-At: On 10/01/2015 02:22 PM, Eli Zaretskii wrote: >> From: Petr Hracek >> Date: Thu, 1 Oct 2015 13:53:14 +0200 >> >> Some update regarding this bug. >> I have add some defines like: >> $ cat emacs-segment-bss.patch >> diff --git a/src/unexelf.c b/src/unexelf.c >> index d365940..55d7ba6 100644 >> --- a/src/unexelf.c >> +++ b/src/unexelf.c >> @@ -846,7 +846,7 @@ unexec (const char *new_name, const char *old_name) >> if ((OLD_SECTION_H (old_bss_index)).sh_addralign > alignment) >> alignment = OLD_SECTION_H (old_bss_index).sh_addralign; >> >> -#ifdef __sgi >> +#if defined __sgi || defined __ppc64le__ || defined __ppc64__ >> /* According to r02kar@x4u2.desy.de (Karsten Kuenne) >> and oliva@gnu.org (Alexandre Oliva), on IRIX 5.2, we >> always get "Program segment above .bss" when dumping >> $ >> >> Here is a full backtrace executed on PPC64LE > Thanks. Can you repeat this in an unoptimized build? Otherwise the > backtrace cannot be trusted (and makes little sense). Hi Eli, Here is full backtrace: Program received signal SIGSEGV, Segmentation fault. 0x00003fffb5a9a870 in strcmp () from /lib64/power8/libc.so.6 Missing separate debuginfos, use: debuginfo-install GConf2-3.2.6-8.el7.ppc64le ImageMagick-6.7.8.9-10.el7.ppc64le OpenEXR-libs-1.7.1-7.el7.ppc64le alsa-lib-1.0.28-2.el7.ppc64le at-spi2-atk-2.8.1-4.el7.ppc64le at-spi2-core-2.8.0-6.el7.ppc64le atk-2.14.0-1.el7.ppc64le avahi-libs-0.6.31-15.el7.ppc64le bzip2-libs-1.0.6-13.el7.ppc64le cairo-1.14.2-1.el7.ppc64le cairo-gobject-1.14.2-1.el7.ppc64le cups-libs-1.6.3-22.el7.ppc64le dbus-glib-0.100-7.el7.ppc64le dbus-libs-1.6.12-13.el7.ppc64le expat-2.1.0-8.el7.ppc64le fontconfig-2.10.95-7.el7.ppc64le freetype-2.4.11-11.el7.ppc64le gdk-pixbuf2-2.31.1-1.el7.ppc64le ghostscript-9.07-18.el7.ppc64le giflib-4.1.6-9.el7.ppc64le glib2-2.42.2-3.el7.ppc64le glibc-2.17-103.el7.ppc64le gmp-6.0.0-11.el7.ppc64le gnutls-3.3.8-13.el7.ppc64le gtk3-3.14.13-13.el7.ppc64le harfbuzz-0.9.36-1.el7.ppc64le ilmbase-1.0.3-7.el7.ppc64le jasper-libs-1.900.1-29.el7.ppc64le jbigkit-libs-2.0-11.el7.ppc64le keyutils-libs-1.5.8-3.el7.ppc64le krb5-libs-1.13.2-3.el7.ppc64le lcms2-2.6-2.el7.ppc64le libICE-1.0.9-2.el7.ppc64le libSM-1.2.2-2.el7.ppc64le libX11-1.6.3-2.el7.ppc64le libXau-1.0.8-2.1.el7.ppc64le libXcomposite-0.4.4-4.1.el7.ppc64le libXcursor-1.1.14-2.1.el7.ppc64le libXdamage-1.1.4-4.1.el7.ppc64le libXext-1.3.3-3.el7.ppc64le libXfixes-5.0.1-2.1.el7.ppc64le libXft-2.3.2-2.el7.ppc64le libXi-1.7.4-2.el7.ppc64le libXinerama-1.1.3-2.1.el7.ppc64le libXpm-3.5.11-3.el7.ppc64le libXrandr-1.4.2-2.el7.ppc64le libXrender-0.9.8-2.1.el7.ppc64le libXt-1.1.4-6.1.el7.ppc64le libXxf86vm-1.1.3-2.1.el7.ppc64le libcom_err-1.42.9-7.el7.ppc64le libcroco-0.6.8-5.el7.ppc64le libdrm-2.4.60-3.el7.ppc64le libffi-3.0.13-16.el7.ppc64le libgcc-4.8.5-4.el7.ppc64le libgomp-4.8.5-4.el7.ppc64le libjpeg-turbo-1.2.90-5.el7.ppc64le libotf-0.9.13-4.el7.ppc64le libpng-1.5.13-5.el7.ppc64le librsvg2-2.39.0-1.el7.ppc64le libselinux-2.2.2-6.el7.ppc64le libstdc++-4.8.5-4.el7.ppc64le libtasn1-3.8-2.el7.ppc64le libthai-0.1.14-9.el7.ppc64le libtiff-4.0.3-14.el7.ppc64le libtool-ltdl-2.4.2-20.el7.ppc64le libuuid-2.23.2-24.el7.ppc64le libwmf-lite-0.2.8.4-41.el7.ppc64le libxcb-1.11-4.el7.ppc64le libxml2-2.9.1-5.el7_1.2.ppc64le libxshmfence-1.2-1.el7.ppc64le m17n-lib-1.6.4-14.el7.ppc64le mesa-libEGL-10.6.0-1.20150616.el7.ppc64le mesa-libGL-10.6.0-1.20150616.el7.ppc64le mesa-libgbm-10.6.0-1.20150616.el7.ppc64le mesa-libglapi-10.6.0-1.20150616.el7.ppc64le ncurses-libs-5.9-13.20130511.el7.ppc64le nettle-2.7.1-4.el7.ppc64le nss-softokn-freebl-3.16.2.3-13.el7.ppc64le openssl-libs-1.0.1e-42.el7_1.9.ppc64le p11-kit-0.20.7-3.el7.ppc64le pango-1.36.8-2.el7.ppc64le pcre-8.32-15.el7.ppc64le pixman-0.32.6-3.el7.ppc64le trousers-0.3.13-1.el7.ppc64le xz-libs-5.1.2-10alpha.el7.ppc64le zlib-1.2.7-15.el7.ppc64le (gdb) bt full #0 0x00003fffb5a9a870 in strcmp () at /lib64/power8/libc.so.6 #1 0x00000000102e3724 in unexec (new_name=0x116387e8 "/home/phracek/rpmbuild/BUILD/emacs-24.3/src/emacs", old_name=0x11638838 "/home/phracek/rpmbuild/BUILD/emacs-24.3/src/temacs") at unexelf.c:1258 section = {sh_name = 122, sh_type = 4, sh_flags = 2, sh_addr = 268483528, sh_offset = 48072, sh_size = 768, sh_link = 5, sh_info = 0, sh_addralign = 8, sh_entsize = 24} new_file = 10 old_file = 9 new_file_size = 30790315 new_break = 0x116f0000 old_base = 0x3fffaa800000 "\177ELF\002\001\001" new_base = 0x3fffa8aa0000 "\177ELF\002\001\001" old_file_h = 0x3fffaa800000 new_file_h = 0x3fffa8aa0000 old_program_h = 0x3fffaa800040 new_program_h = 0x3fffa8aa0040 old_section_h = 0x3fffab1dc110 new_section_h = 0x3fffaa78c110 old_section_names = 0x3fffab1dbfcc "" old_bss_addr = 272498688 new_bss_addr = 292487168 old_bss_size = 563072 new_data2_size = 19988480 new_data2_offset = 4063232 new_data2_addr = 272498688 old_bss_offset = 4063232 new_data2_incr = 19988480 n = 9 nn = 0 old_bss_index = 22 old_sbss_index = -1 old_plt_index = 20 old_data_index = 21 new_data2_index = 20 stat_buf = {st_dev = 2050, st_ino = 5119871, st_nlink = 1, st_mode = 33261, st_uid = 20582, st_gid = 20582, __pad2 = 0, st_rdev = 0, st_size = 10801771, st_blksize = 4096, st_blocks = 20984, st_atim = {tv_sec = 1443707449, tv_nsec = 95539783}, st_mtim = {tv_sec = 1443707448, tv_nsec = 975539771}, st_ctim = {tv_sec = 1443707448, tv_nsec = 975539771}, __unused4 = 0, __unused5 = 0, __unused6 = 0} old_file_size = 10801771 ---Type to continue, or q to quit--- #2 0x00000000101a1170 in Fdump_emacs (filename=291602193, symfile=291602097) at emacs.c:2030 tem = 276285906 symbol = 279411634 count = 16 #3 0x000000001027f368 in eval_sub (form=280596326) at eval.c:2146 numargs = 8 args_left = 276285906 i = 2 maxargs = 2 argvals = {291604241, 291604209, 70368744168448, 70368744168656, 277773798, 271328908, 0, 276398802} fun = 272527693 val = 276285906 original_fun = 276445394 original_args = 280253382 funcar = 277773862 backtrace = {next = 0x3fffffffddb0, function = 276445394, args = 0x3fffffffdbe8, nargs = 2, debug_on_exit = 0} gcpro1 = {next = 0x3fffffffddb0, var = 0x107a38d2, nvars = 70368744168424} gcpro2 = {next = 0x3fffffffddb0, var = 0x107a38d2, nvars = 70368744168424} gcpro3 = {next = 0x10776596, var = 0x3fffffffdbe8, nvars = 2} #4 0x000000001027a010 in Fprogn (args=280793446) at eval.c:360 val = 276285906 gcpro1 = {next = 0x3ec63d1348a97a00, var = 0x3fffffffde20, nvars = 6} #5 0x000000001027ef94 in eval_sub (form=280194102) at eval.c:2091 numargs = 24 args_left = 280625926 i = 278384886 maxargs = 276605808 argvals = {276260246, 70368744169024, 277773894, 70368744168992, 4523370028772981248, 276234832, 276285906, 70368744169024} fun = 275399253 val = 278384886 original_fun = 276403954 original_args = 280625926 funcar = 276285906 backtrace = {next = 0x3fffffffdfa0, function = 276403954, args = 0x3fffffffdd28, nargs = -1, debug_on_exit = 0} gcpro1 = {next = 0x3fffffffdfa0, var = 0x107996f2, nvars = 70368744168744} gcpro2 = {next = 0x3fffffffdfa0, var = 0x107996f2, nvars = 70368744168744} gcpro3 = {next = 0x1077c9d2, var = 0x3fffffffddd8, nvars = 1} #6 0x0000000010279e58 in Fif (args=280088390) at eval.c:310 cond = 278384886 ---Type to continue, or q to quit--- gcpro1 = {next = 0x3fffb7fefc80 <_dl_argv_internal>, var = 0x3fffb7ff0000 <_rtld_local>, nvars = 2} #7 0x000000001027ef94 in eval_sub (form=276260150) at eval.c:2091 numargs = 8 args_left = 280088390 i = 276260150 maxargs = 276605808 argvals = {291932193, 276285906, 16, 276285906, 276285906, 276285906, 276398802, 276285906} fun = 275399157 val = 70368744169264 original_fun = 276403858 original_args = 280088390 funcar = 70368744169408 backtrace = {next = 0x3fffffffe490, function = 276403858, args = 0x3fffffffdf18, nargs = -1, debug_on_exit = 0} gcpro1 = {next = 0x3fffffffe490, var = 0x10799692, nvars = 70368744169240} gcpro2 = {next = 0x3fffffffe490, var = 0x10799692, nvars = 70368744169240} gcpro3 = {next = 0x103e7968 , var = 0x0, nvars = 276398802} #8 0x00000000102bd1a4 in readevalloop (readcharfun=276398802, stream=0x107cab70, sourcename=276604337, printflag=false, unibyte=276285906, readfun=276285906, start=276285906, end=276285906) at lread.c:1843 count1 = 16 c = 276260150 val = 276260150 count = 12 gcpro1 = {next = 0x10798562, var = 0x10798560, nvars = 32} gcpro2 = {next = 0x10798562, var = 0x10798560, nvars = 32} gcpro3 = {next = 0x10798562, var = 0x10798560, nvars = 32} gcpro4 = {next = 0x10798562, var = 0x10798560, nvars = 32} b = 0x0 continue_reading_p = true lex_bound = 276285906 whole_buffer = false first_sexp = false macroexpand = 276285906 #9 0x00000000102bb560 in Fload (file=276604081, noerror=276285906, nomessage=276285906, nosuffix=276285906, must_suffix=276285906) at lread.c:1316 stream = 0x107cab70 fd = 8 count = 3 gcpro1 = {next = 0x1f, var = 0x1f, nvars = 31} gcpro2 = {next = 0x1f, var = 0x1f, nvars = 31} gcpro3 = {next = 0x1f, var = 0x1f, nvars = 31} ---Type to continue, or q to quit--- found = 276604273 efound = 70367536151680 hist_file_name = 276604337 newer = false compiled = false handler = 24 safe_p = true fmode = 0x10398788 "r" tmp = {276285906, 276604305} version = 0 #10 0x000000001027f44c in eval_sub (form=276523222) at eval.c:2157 numargs = 4 args_left = 276285906 i = 5 maxargs = 5 argvals = {276604081, 276285906, 276285906, 276285906, 276285906, 276285906, 276403666, 276403664} fun = 275407901 val = 276285906 original_fun = 276398514 original_args = 276523206 funcar = 276312672 backtrace = {next = 0x0, function = 276398514, args = 0x3fffffffe4b8, nargs = 1, debug_on_exit = 0} gcpro1 = {next = 0x0, var = 0x107981b2, nvars = 70368744170680} gcpro2 = {next = 0x0, var = 0x107981b2, nvars = 70368744170680} gcpro3 = {next = 0x3fffffffe480, var = 0x3fffffffe4b8, nvars = 5} #11 0x000000001027eb44 in Feval (form=276523222, lexical=276285906) at eval.c:2005 count = 2 #12 0x00000000101a4284 in top_level_2 () at keyboard.c:1177 #13 0x000000001027c86c in internal_condition_case (bfun=0x101a4244 , handlers=276337522, hfun=0x101a3adc ) at eval.c:1289 val = 70368744171024 c = {tag = 276285906, val = 276285906, next = 0x3fffffffe9d0, gcpro = 0x0, jmp = {{__jmpbuf = {7811300748338917787, 272529768, 7811334515022091259, 0 , 70367536151680, 70367536152576, 70367536150448, 276398514, 70368744170912, 2449960692665548799, 0 }, __mask_was_saved = 0, __saved_mask = {__val = {4294967295, 0 , 272500336, 0}}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0} h = {handler = 276337522, var = 276285906, chosen_clause = 0, tag = 0x3fffffffe610, next = 0x0} #14 0x00000000101a4314 in top_level_1 (ignore=276285906) at keyboard.c:1185 #15 0x000000001027bf5c in internal_catch (tag=276333362, func=0x101a42b0 , arg=276285906) at eval.c:1060 c = ---Type to continue, or q to quit--- {tag = 276333362, val = 276285906, next = 0x0, gcpro = 0x0, jmp = {{__jmpbuf = {7811300748338920875, 272529768, 7811334515022080783, 0 , 70367536151680, 70367536152576, 70367536150448, 276398514, 70368744171920, 2449960692665548799, 0 }, __mask_was_saved = 0, __saved_mask = {__val = {276309864, 72057594037927940, 276285906, 276285906, 276506162, 70368744172656, 272151100, 70368744172656, 276506160, 276604080, 276506162, 276312672, 275426328, 276398514, 70368744172656, 70368744172816}}}}, backlist = 0x0, handlerlist = 0x0, lisp_eval_depth = 0, pdlcount = 2, poll_suppress_count = 1, interrupt_input_blocked = 0, byte_stack = 0x0} #16 0x00000000101a4104 in command_loop () at keyboard.c:1146 #17 0x00000000101a3260 in recursive_edit_1 () at keyboard.c:779 count = 1 val = 270153060 #18 0x00000000101a3520 in Frecursive_edit () at keyboard.c:843 count = 0 buffer = 276285906 #19 0x000000001019ff18 in main (argc=5, argv=0x3ffffffff2d8) at emacs.c:1528 dummy = 70368744173184 stack_bottom_variable = 0 '\000' do_initial_setlocale = true dumping = true skip_args = 3 rlim = {rlim_cur = 8720000, rlim_max = 18446744073709551615} no_loadup = false junk = 0x0 dname_arg = 0x0 ch_to_dir = 0x0 (gdb) -- Petr Hracek Software Engineer Developer Experience Red Hat, Inc Mob: +420777056169 email: phracek@redhat.com