From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14911 invoked by alias); 15 Jan 2013 10:36:41 -0000 Received: (qmail 14882 invoked by uid 22791); 15 Jan 2013 10:36:38 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SARE_BAYES_5x8,TW_BJ X-Spam-Check-By: sourceware.org Received: from mail-lb0-f173.google.com (HELO mail-lb0-f173.google.com) (209.85.217.173) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 15 Jan 2013 10:36:30 +0000 Received: by mail-lb0-f173.google.com with SMTP id c1so35379lbg.18 for ; Tue, 15 Jan 2013 02:36:28 -0800 (PST) X-Received: by 10.112.49.202 with SMTP id w10mr34867325lbn.2.1358246188309; Tue, 15 Jan 2013 02:36:28 -0800 (PST) Received: from [172.21.193.109] (85-18-126-22.ip.fastwebnet.it. [85.18.126.22]) by mx.google.com with ESMTPS id ns7sm6465300lab.5.2013.01.15.02.36.26 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 15 Jan 2013 02:36:27 -0800 (PST) Message-ID: <50F5312A.2040503@gmail.com> Date: Tue, 15 Jan 2013 10:36:00 -0000 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: rebase segfault References: <50F516C8.9050602@gmail.com> <20130115100745.GC2353@calimero.vinschen.de> In-Reply-To: <20130115100745.GC2353@calimero.vinschen.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2013-01/txt/msg00203.txt.bz2 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