FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Alt

 
 
LinkBack Thread Tools
 
Old 11-27-2009, 07:58 AM
Markus Duft
 
Default scanelf on sparc-solaris-5.10

Hey

just asking before i open a bug: i'm having a reproducible scanelf crash
while building perl:

(gdb) r -v -qyRAF '%T %p'
var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a
Starting program: /tools/gentoo/mduft/toolsbase-2010.0/usr/bin/scanelf
-v -qyRAF '%T %p'
var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a
warning: Temporarily disabling breakpoints for unloaded shared library
"/usr/lib/ld.so.1"

Program received signal SIGSEGV, Segmentation fault.
0x00013148 in readelf_buffer (filename=0x46408
"var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a:sdbm.o",
buffer=0xff3a01ce "177ELF010201",
buffer_len=7152) at paxelf.c:528
528 READELF_HEADER(32)
(gdb) bt
#0 0x00013148 in readelf_buffer (filename=0x46408
"var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a:sdbm.o",
buffer=0xff3a01ce "177ELF010201",
buffer_len=7152) at paxelf.c:528
#1 0x0002db94 in scanelf_archive (filename=0xffbfedbd
"var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a",
fd=6, len=11926) at scanelf.c:1339
#2 0x0002de18 in scanelf_file (filename=0xffbfedbd
"var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a",
st_cache=0xffbfe9dc) at scanelf.c:1377
#3 0x0002dee4 in scanelf_dir (path=0xffbfedbd
"var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a")
at scanelf.c:1401
#4 0x0003041c in parseargs (argc=5, argv=0xffbfebfc) at scanelf.c:1959
#5 0x00030700 in main (argc=5, argv=0xffbfebfc) at scanelf.c:2028
(gdb) lis
523 if (invalid > 1)
524 warn("%s: Invalid section header info
(%i)", filename, invalid);
525 if (invalid)
526 elf->shdr = NULL;
527 }
528 READELF_HEADER(32)
529 READELF_HEADER(64)
530 /* { char *p; strncpy(elf->basename, (p =
strrchr(filename, '/')) == NULL ? "?" : p+1 , sizeof(elf->basename)); } */
531
532 return elf;

seems like either scanelf has a bug, or that perl archive is damaged...?
from what i see in gdb, is the buffer contents what it is expected to be
("177ELF010201")? i think it's off by one, shouldn't ELF be the
first bytes (i don't know ELF that well, just PE/COFF, so i might be
plain wrong here )?

Cheers, Markus
 
Old 11-27-2009, 08:07 AM
Fabian Groffen
 
Default scanelf on sparc-solaris-5.10

On 27-11-2009 09:58:41 +0100, Markus Duft wrote:
> Hey
>
> just asking before i open a bug: i'm having a reproducible scanelf crash
> while building perl:
>
> (gdb) r -v -qyRAF '%T %p'
> var/tmp/portage/dev-lang/perl-5.8.8-r6/work/perl-5.8.8/ext/SDBM_File/sdbm/libsdbm.a
> Starting program: /tools/gentoo/mduft/toolsbase-2010.0/usr/bin/scanelf
> -v -qyRAF '%T %p'
[snip]
>
> seems like either scanelf has a bug, or that perl archive is damaged...?
> from what i see in gdb, is the buffer contents what it is expected to be
> ("177ELF010201")? i think it's off by one, shouldn't ELF be the
> first bytes (i don't know ELF that well, just PE/COFF, so i might be
> plain wrong here )?

You probably want to tell scanelf to scan an archive (-A), but
regardless, scanelf shouldn't crash, so I'd say, file a bug. I had a
similar issue with scanmacho and Java byte-code files a while ago.


--
Fabian Groffen
Gentoo on a different level
 

Thread Tools




All times are GMT. The time now is 10:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org