all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Petr Hracek <phracek@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 20614@debbugs.gnu.org
Subject: bug#20614: Segmentation fault when building on Power8 Little Endian
Date: Mon, 5 Oct 2015 09:40:15 +0200	[thread overview]
Message-ID: <5612295F.4000607@redhat.com> (raw)
In-Reply-To: <83wpv55qog.fsf@gnu.org>

On 10/02/2015 03:46 PM, Eli Zaretskii wrote:
>> Cc: 20614@debbugs.gnu.org
>> From: Petr Hracek <phracek@redhat.com>
>> Date: Fri, 2 Oct 2015 14:58:56 +0200
>>
>> On 10/02/2015 10:49 AM, Eli Zaretskii wrote:
>>>> Cc: 20614@debbugs.gnu.org
>>>> From: Petr Hracek <phracek@redhat.com>
>>>> Date: Fri, 2 Oct 2015 10:36:27 +0200
>>>>
>>>> What does this GDB command display in frame #1:
>>>>
>>>>     (gdb) p old_section_names + NEW_SECTION_H (nn).sh_name
>>>>
>>>> ?
>>>>
>>>> It is a really strange.
>>>> in our unexelf.c is NEW_SECTION_H defined as
>>>>
>>>> #define NEW_SECTION_H(n) \
>>>> (*(ElfW (Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (n)))
>>>>
>>>> Paul Eggert did a some patch 1 or 2 year ago and modify it to
>>>> #define NEW_SECTION_H(n) \
>>>>     (*(ElfW (Shdr) *) entry_address (new_section_h, n, new_file_h->e_shentsize))
>>>>
>>>> (gdb) frame 1
>>>> #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
>>>> 1258 if (!strcmp (old_section_names + NEW_SECTION_H (nn).sh_name, ".data")
>>>> (gdb) p old_section_names
>>>> $1 = 0x3fffab1dbfcc ""
>>>> (gdb) p old_section_names + NEW_SECTION_H (nn).sh_name
>>>> No symbol "NEW_SECTION_H" in current context.
>>> Use the expansion of that macro instead to display the value.
>> How to use the expansion.
> Just type it by hand:
>
>   (gdb) p old_section_names + (*(ElfW (Shdr) *) ((byte *) new_section_h + new_file_h->e_shentsize * (nn)))
>
>> Are you connected on freenode #emacs.
> No.
First of all thank you for your time.
Well,
(gdb) p (*(ElfW (Shdr) *) ((byte *) new_section_h + 
new_file_h->e_shentsize * (nn)))
No symbol "ElfW" in current context.
(gdb)
Also ElfBitsW does not exists.
(gdb) p ElfBitsW
No symbol "ElfBitsW" in current context.
(gdb)

I tried to find out what could be used from elf.h header file
but no any idea.

I guess that ELFSIZE should be defined from unexec.h, right?
http://git.savannah.gnu.org/cgit/emacs.git/tree/src/unexelf.c?h=emacs-24#n513
(gdb) p ELFSIZE
No symbol "ELFSIZE" in current context.
(gdb)

(gdb) frame 1
#1  0x00000000102e4174 in unexec (new_name=0x115c2868 
"/home/phracek/rpmbuild/BUILD/emacs-24.3/src/emacs", old_name=0x115c28b8 
"/home/phracek/rpmbuild/BUILD/emacs-24.3/src/temacs")
     at unexelf.c:1257
1257          if (!strcmp (old_section_names + NEW_SECTION_H 
(nn).sh_name, ".data")
(gdb) i locals
section = {sh_name = 122, sh_type = 4, sh_flags = 2, sh_addr = 
268483520, sh_offset = 48064, sh_size = 768, sh_link = 5, sh_info = 0, 
sh_addralign = 8, sh_entsize = 24}
new_file = 10
old_file = 9
new_file_size = 30325149
new_break = 0x11690000
old_base = 0x3fffaa7a0000 "\177ELF\002\001\001"
new_base = 0x3fffa8ab0000 "\177ELF\002\001\001"
old_file_h = 0x3fffaa7a0000
new_file_h = 0x3fffa8ab0000
old_program_h = 0x3fffaa7a0040
new_program_h = 0x3fffa8ab0040
old_section_h = 0x3fffab17a798
new_section_h = 0x3fffaa72a798
old_section_names = 0x3fffab17a657 ""
old_bss_addr = 272564224
new_bss_addr = 292093952
old_bss_size = 563096
new_data2_size = 19529728
new_data2_offset = 4063232
new_data2_addr = 272564224
old_bss_offset = 4063232
new_data2_incr = 19529728
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 = 5119868, st_nlink = 1, st_mode = 
33261, st_uid = 20582, st_gid = 20582, __pad2 = 0, st_rdev = 0, st_size 
= 10795357, st_blksize = 4096,
   st_blocks = 20976, st_atim = {tv_sec = 1444028953, tv_nsec = 
509013261}, st_mtim = {tv_sec = 1444028953, tv_nsec = 379013248}, 
st_ctim = {tv_sec = 1444028953, tv_nsec = 379013248},
   __unused4 = 0, __unused5 = 0, __unused6 = 0}
old_file_size = 10795357
(gdb)

It seems like some compilation directives are missing. But of course I 
am guessing.

Local exec file:
     `/home/phracek/rpmbuild/BUILD/emacs-24.3/src/temacs', file type 
elf64-powerpcle.
     Entry point: 0x10016100
     0x0000000010000238 - 0x0000000010000249 is .interp
     0x000000001000024c - 0x000000001000026c is .note.ABI-tag
     0x000000001000026c - 0x0000000010000290 is .note.gnu.build-id
     0x0000000010000290 - 0x000000001000036c is .gnu.hash
     0x0000000010000370 - 0x0000000010006790 is .dynsym
     0x0000000010006790 - 0x000000001000b204 is .dynstr
     0x000000001000b204 - 0x000000001000ba5c is .gnu.version
     0x000000001000ba60 - 0x000000001000bbc0 is .gnu.version_r
     0x000000001000bbc0 - 0x000000001000bec0 is .rela.toc
     0x000000001000bec0 - 0x0000000010011ff8 is .rela.plt
     0x0000000010012000 - 0x000000001001204c is .init
     0x0000000010012060 - 0x000000001037d398 is .text
     0x000000001037d398 - 0x000000001037d3bc is .fini
     0x000000001037d3c0 - 0x00000000103a08e2 is .rodata
     0x00000000103a08e4 - 0x00000000103a9178 is .eh_frame_hdr
     0x00000000103a9178 - 0x00000000103d0258 is .eh_frame
     0x00000000103ef100 - 0x00000000103ef530 is .data.rel.ro
     0x00000000103ef530 - 0x00000000103ef970 is .dynamic
     0x00000000103ef970 - 0x00000000103f0000 is .got
     0x00000000103f0000 - 0x00000000103f2078 is .plt
     0x00000000103f2078 - 0x00000000106b91b8 is .data
     0x00000000106b91c0 - 0x00000000107408e0 is .bss
     0x00003fffb7fb0200 - 0x00003fffb7fb0224 is .note.gnu.build-id in 
/lib64/ld64.so.2
     0x00003fffb7fb0228 - 0x00003fffb7fb02e4 is .hash in /lib64/ld64.so.2

-- 
Petr Hracek
Software Engineer
Developer Experience
Red Hat, Inc
Mob: +420777056169
email: phracek@redhat.com






  reply	other threads:[~2015-10-05  7:40 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20  7:56 bug#20614: Segmentation fault when building on Power8 Little Endian Petr Hracek
2015-05-20 14:45 ` Eli Zaretskii
2015-05-20 16:12 ` Glenn Morris
2015-05-21 12:55   ` Petr Hracek
2015-07-13 11:27     ` Petr Hracek
2015-07-13 13:16       ` Andreas Schwab
2015-07-14  7:52         ` Petr Hracek
2015-07-14  8:14           ` Andreas Schwab
2015-09-16 11:28           ` Petr Hracek
2015-09-22 10:17             ` Petr Hracek
2015-09-23  8:06               ` Petr Hracek
2015-09-23  9:34                 ` Eli Zaretskii
2015-09-23 11:00                   ` Petr Hracek
2015-09-23 11:14                     ` Eli Zaretskii
2015-09-23 12:11                       ` Petr Hracek
2015-09-23 12:23                         ` Eli Zaretskii
2015-09-24 11:04                           ` Petr Hracek
2015-09-24 15:32                             ` Eli Zaretskii
2015-09-24 17:56                               ` Petr Hracek
2015-09-26  7:58                                 ` Eli Zaretskii
2015-09-30 10:39                                   ` Petr Hracek
2015-10-01  7:43                                     ` Eli Zaretskii
2015-10-01  8:46                                       ` Petr Hracek
2015-10-01 11:44                                       ` Petr Hracek
2015-10-01 11:53                                       ` Petr Hracek
2015-10-01 12:22                                         ` Eli Zaretskii
2015-10-01 14:05                                           ` Petr Hracek
2015-10-01 16:01                                             ` Eli Zaretskii
2015-10-02  8:36                                               ` Petr Hracek
2015-10-02  8:49                                                 ` Eli Zaretskii
2015-10-02 12:58                                                   ` Petr Hracek
2015-10-02 13:46                                                     ` Eli Zaretskii
2015-10-05  7:40                                                       ` Petr Hracek [this message]
2015-10-05  8:27                                                         ` Eli Zaretskii
2015-10-05  9:16                                                           ` Petr Hracek
2015-10-05  9:39                                                             ` Eli Zaretskii
2015-10-05 11:23                                                               ` Petr Hracek
2015-10-05 11:40                                                                 ` Eli Zaretskii
2015-10-05 14:07                                                                   ` Petr Hracek
2015-10-05 16:52                                                                     ` Eli Zaretskii
2015-10-06  8:41                                                                       ` Petr Hracek
2015-10-06 11:52                                                                         ` Petr Hracek
2015-10-06 14:55                                                                           ` Eli Zaretskii
2015-10-07  8:17                                                                             ` Petr Hracek
2015-10-07 10:56                                                                               ` YAMAMOTO Mitsuharu
2015-10-07 12:26                                                                                 ` Petr Hracek
2015-10-08  0:54                                                                                   ` YAMAMOTO Mitsuharu
2015-10-08 13:27                                                                                     ` Jaromir Capik
2015-10-10  1:40                                                                                       ` YAMAMOTO Mitsuharu
2015-10-10 15:44                                                                                         ` Andreas Schwab
2015-10-13  7:30                                                                                           ` Petr Hracek
2015-10-13  8:30                                                                                             ` Andreas Schwab
2015-10-16 15:24                                                                                               ` Jaromir Capik
2015-10-19  7:20                                                                                                 ` Andreas Schwab
2015-09-23 12:10                   ` Petr Hracek
2015-09-23 12:21                     ` Eli Zaretskii
2015-09-23 13:10                       ` Petr Hracek
2015-09-23 13:38                       ` Petr Hracek
2015-09-23 13:57                         ` Eli Zaretskii
2015-09-23 17:25                           ` Glenn Morris
2015-09-23 17:47               ` Glenn Morris
2015-09-29  8:15                 ` Florian Weimer
2015-07-13 12:17   ` bug#20614: Segmentation fault when building on Power8 Little Endian (ppc64le) Petr Hracek
2015-11-17  1:59 ` bug#20614: alignment problem with recent Emacs unexelf.c changes Paul Eggert
2015-11-17  9:03   ` Alan Modra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5612295F.4000607@redhat.com \
    --to=phracek@redhat.com \
    --cc=20614@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.