public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: marco atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: rebase segfault
Date: Tue, 15 Jan 2013 10:36:00 -0000	[thread overview]
Message-ID: <50F5312A.2040503@gmail.com> (raw)
In-Reply-To: <20130115100745.GC2353@calimero.vinschen.de>

On 1/15/2013 11:07 AM, Corinna Vinschen wrote:
> On Jan 15 09:43, marco atzeri wrote:
>> rebase is segfaulting on two dlls of new package
>>
>> postgresql-contrib-9.2.2-1
>>
>> Full packages here
>> http://matzeri.altervista.org/cygwin-1.7/postgresql/
>>
>> Just the two dll's here:
>> http://matzeri.altervista.org/works/rebase/
>>
>> for i in *.dll; do echo $i ; rebase -O  $i ; done
>>
>> dict_snowball.dll
>> Segmentation fault (core dumped)
>>
>> ltree.dll
>> Segmentation fault (core dumped)
>
> I don't know exactly what's going on here, but there's a common
> factor:
>
> $ objdump -h dict_snowball.dll
>
> dict_snowball.dll:     file format pei-i386
>
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>    0 .text         00016808  4ef01000  4ef01000  00000400  2**4
>                    CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
>    1 .data         00017180  4ef18000  4ef18000  00016e00  2**5
>                    CONTENTS, ALLOC, LOAD, DATA
>    2 .bss          000000f8  4ef30000  4ef30000  00000000  2**5
>                    ALLOC
>    3 .edata        00000fe0  4ef31000  4ef31000  0002e000  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>    4 .idata        000003e0  4ef32000  4ef32000  0002f000  2**2
>                    CONTENTS, ALLOC, LOAD, DATA
>    5 .reloc        0000765c  4ef33000  4ef33000  0002f400  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>    6 .gnu_deb      0000001c  4ef3b000  4ef3b000  00036c00  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>
> $ objdump -h ltree.dll
>
> ltree.dll:     file format pei-i386
>
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>    0 .text         000088a8  4ef31000  4ef31000  00000400  2**4
>                    CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
>    1 .data         00000dc0  4ef3a000  4ef3a000  00008e00  2**5
>                    CONTENTS, ALLOC, LOAD, DATA
>    2 .bss          000000f8  4ef3b000  4ef3b000  00000000  2**5
>                    ALLOC
>    3 .edata        00000e3c  4ef3c000  4ef3c000  00009c00  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>    4 .idata        000005b8  4ef3d000  4ef3d000  0000ac00  2**2
>                    CONTENTS, ALLOC, LOAD, DATA
>    5 .reloc        00000adc  4ef3e000  4ef3e000  0000b200  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>    6 .gnu_deb      00000014  4ef3f000  4ef3f000  0000be00  2**2
>                    CONTENTS, ALLOC, LOAD, READONLY, DATA
>
> Both DLLs have a section .gnu_deb, whatever that one is good for.
> Rebase crashes both times when trying to relocate this .gnu_deb section.
> As you can see, the .gnu_deb section is pretty small, only 28 resp. 20
> bytes.  What happens is that the relocation information for the .gnu_deb
> section appears to be too big.  In case of dict_snowball.dll, the reloc
> info covers 44 relocation entries.  The segfault occurs as soon as one
> entry translates into a memory address which is beyond the committed
> area of the file memory map.
>
> Now, that's the *effect*.  From this I can't say what the *cause*
> for this weird relocation info is.
>
>
> Corinna
>

It seems the result of the .dbg creation, that trunks
wrongly the sections.

I uploaded also the build and stripped versions:

$ objdump.exe -h build/dict_snowball.dll

build/dict_snowball.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .text         00016808  67ec1000  67ec1000  00000400  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
   1 .data         00017180  67ed8000  67ed8000  00016e00  2**5
                   CONTENTS, ALLOC, LOAD, DATA
   2 .bss          000000f8  67ef0000  67ef0000  00000000  2**5
                   ALLOC
   3 .edata        00000fe0  67ef1000  67ef1000  0002e000  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   4 .idata        000003e0  67ef2000  67ef2000  0002f000  2**2
                   CONTENTS, ALLOC, LOAD, DATA
   5 .reloc        0000765c  67ef3000  67ef3000  0002f400  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   6 .debug_aranges 00000560  67efb000  67efb000  00036c00  2**0
                   CONTENTS, READONLY, DEBUGGING
   7 .debug_pubnames 00001112  67efc000  67efc000  00037200  2**0
                   CONTENTS, READONLY, DEBUGGING
   8 .debug_pubtypes 00000f49  67efe000  67efe000  00038400  2**0
                   CONTENTS, READONLY, DEBUGGING
   9 .debug_info   00048851  67eff000  67eff000  00039400  2**0
                   CONTENTS, READONLY, DEBUGGING
  10 .debug_abbrev 000050a3  67f48000  67f48000  00081e00  2**0
                   CONTENTS, READONLY, DEBUGGING
  11 .debug_line   000078a3  67f4e000  67f4e000  00087000  2**0
                   CONTENTS, READONLY, DEBUGGING
  12 .debug_frame  00002114  67f56000  67f56000  0008ea00  2**2
                   CONTENTS, READONLY, DEBUGGING
  13 .debug_str    00000664  67f59000  67f59000  00090c00  2**0
                   CONTENTS, READONLY, DEBUGGING
  14 .debug_loc    000170a4  67f5a000  67f5a000  00091400  2**0
                   CONTENTS, READONLY, DEBUGGING
  15 .debug_ranges 0000f3a0  67f72000  67f72000  000a8600  2**0
                   CONTENTS, READONLY, DEBUGGING

Stripped

$ objdump.exe -h strip/dict_snowball.dll

strip/dict_snowball.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .text         00016808  67ec1000  67ec1000  00000400  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
   1 .data         00017180  67ed8000  67ed8000  00016e00  2**5
                   CONTENTS, ALLOC, LOAD, DATA
   2 .bss          000000f8  67ef0000  67ef0000  00000000  2**5
                   ALLOC
   3 .edata        00000fe0  67ef1000  67ef1000  0002e000  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   4 .idata        000003e0  67ef2000  67ef2000  0002f000  2**2
                   CONTENTS, ALLOC, LOAD, DATA
   5 .reloc        0000765c  67ef3000  67ef3000  0002f400  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA


for what I can see a dll with debug symbols
should have a .gnu_debuglink sections:

$ objdump -h /usr/bin/cygmpi-0.dll

/usr/bin/cygmpi-0.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
   0 .text         00181a28  5e1d1000  5e1d1000  00000400  2**4
                   CONTENTS, ALLOC, LOAD, READONLY, CODE, DATA
   1 .data         00035a40  5e353000  5e353000  00182000  2**5
                   CONTENTS, ALLOC, LOAD, DATA
   2 .rdata        00008460  5e389000  5e389000  001b7c00  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   3 .eh_frame     000250b8  5e392000  5e392000  001c0200  2**2
                   CONTENTS, ALLOC, LOAD, DATA
   4 .bss          0008cd98  5e3b8000  5e3b8000  00000000  2**5
                   ALLOC
   5 .edata        000214b4  5e445000  5e445000  001e5400  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   6 .idata        00002adc  5e467000  5e467000  00206a00  2**2
                   CONTENTS, ALLOC, LOAD, DATA
   7 .reloc        0001459c  5e46a000  5e46a000  00209600  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA
   8 .gnu_debuglink 00000018  5e47f000  5e47f000  0021dc00  2**2
                   CONTENTS, ALLOC, LOAD, READONLY, DATA





Marco



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2013-01-15 10:36 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15  8:44 marco atzeri
2013-01-15 10:08 ` Corinna Vinschen
2013-01-15 10:36   ` marco atzeri [this message]
2013-01-15 11:24     ` Corinna Vinschen
2013-01-15 22:04       ` marco atzeri
2013-01-16  7:16         ` marco atzeri
2013-01-16 12:35           ` Binutils objcopy bug (was Re: rebase segfault) Corinna Vinschen
2013-01-16 13:38             ` marco atzeri
2013-01-16 14:42               ` Corinna Vinschen
2013-01-16 15:12                 ` marco atzeri
2013-01-16 16:26                   ` Corinna Vinschen
2013-01-24  9:02               ` Yaakov
2013-01-24  9:28                 ` Corinna Vinschen
2013-01-24  9:49                   ` marco atzeri
2013-01-24 10:01                     ` Corinna Vinschen
2013-01-24 10:16                       ` marco atzeri
2013-01-24 12:09                         ` Corinna Vinschen
2013-01-24 12:35                           ` marco atzeri
2013-01-24 14:12                             ` Corinna Vinschen
2013-01-25 12:34                       ` marco atzeri
2013-01-25 13:20                         ` Kai Tietz
2013-01-25 15:01                           ` Corinna Vinschen
2013-01-25 15:12                             ` marco atzeri
2013-01-26  6:32                               ` Reini Urban
2013-01-26  7:53                                 ` marco atzeri
2013-01-29 22:30                                   ` Reini Urban
2013-01-30 16:46                                     ` Andrew Dunstan
2013-01-30 17:03                                       ` marco atzeri
2013-03-04 20:01                                       ` Andrew Dunstan
2013-03-04 21:30                                         ` marco atzeri
2013-03-04 21:41                                           ` Andrew Dunstan
2013-03-04 22:32                                           ` Andrew Dunstan
2013-03-05  5:42                                             ` marco atzeri
2013-03-05 15:39                                               ` Andrew Dunstan
2013-01-25 13:22                         ` Kai Tietz
2013-01-24 15:56                     ` Christopher Faylor
2013-01-24 16:17                       ` marco atzeri
2013-01-18 15:34             ` marco atzeri
2013-01-18 15:44               ` Christopher Faylor
2013-01-19  8:56             ` marco atzeri
2013-01-19 15:23               ` Corinna Vinschen

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=50F5312A.2040503@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).