This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rebase segfault


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]