Bug#728539: Re[2]: Bug#728539: elfutils: eu-readelf crashes when reading a shared library

2013-11-02 Thread Vadim Zeitlin
On Sat, 2 Nov 2013 18:50:04 +0100 Kurt Roeckx k...@roeckx.be wrote:

KR On Sat, Nov 02, 2013 at 06:46:44PM +0100, Kurt Roeckx wrote:
KR  On Sat, Nov 02, 2013 at 06:23:14PM +0100, Vadim Zeitlin wrote:
KR   Package: elfutils
KR   Version: 0.148-1
KR   Severity: important
KR   
KR   I'm trying to use abi-dumper tool for analyzing the ABI of my own shared
KR   library. This tools uses eu-readelf to actually read the library symbols
KR   but eu-readelf crashes, making it unusable:
KR   
KR   % eu-readelf -N --debug-dump=loc libwx_baseu-3.0.so  /dev/null
KR   [2]16820 segmentation fault (core dumped)  eu-readelf -N 
--debug-dump=loc   /dev/null
KR  
KR  I can at least reproduce this with any shared library.
KR 
KR I even seem to be able to do this with any binary with the 0.156-1
KR version, but 0.153-2 working without a problem for me.
KR 
KR Is that 0.148-1 version right?

 I've tested both 0.148-1 (from Debian) and the latest 0.157 (from their
Git). Thanks for the hint about 0.153, I'm going to try this a.s.a.p. to
see if it works for me.

 And thanks for looking at this!
VZ


pgp0jQkvlZ3ul.pgp
Description: PGP signature


Bug#728539: Re[2]: Bug#728539: elfutils: eu-readelf crashes when reading a shared library

2013-11-02 Thread Vadim Zeitlin
On Sat, 2 Nov 2013 19:35:39 +0100 Kurt Roeckx k...@roeckx.be wrote:

KR So for me I have this problem with this combination:
KR elfutils 0.157-1
KR libdw1 0.157-1
KR libelf1 0.153-2
KR 
KR Upgrading libelf1 to 0.157-1 makes the problem go away for me.

 Sorry, I was wrong in my initial bug report: it does indeed work correctly
with all of 0.153, 0.154, 0.157 and the latest git master if I run it
properly, i.e. by setting LD_LIBRARY_PATH, from the source tree. When I
tested git sources initially, I hadn't realized that I was still using the
packaged version of libelf1 (and libdw1 too).

 Retesting with the correct versions, I see the bug with 0.148 I build
myself and here is the backtrace:

Starting program: /home/zeitlin/build/elfutils/src/readelf -N --debug-dump=loc 
/home/zeitlin/build/wx-gtkud/lib/libwx_baseu-3.0.so  /dev/null

Program received signal SIGSEGV, Segmentation fault.
print_block (n=33477184, block=0x77231000) at 
/home/zeitlin/mirrors/elfutils/src/readelf.c:3803
3803   printf ( %02x, *data++);
(gdb) bt
#0  print_block (n=33477184, block=0x77231000) at 
/home/zeitlin/mirrors/elfutils/src/readelf.c:3803
#1  0x0040cf62 in print_ops (dwflmod=optimized out, dbg=optimized 
out, indent=50, indentrest=50, addrsize=optimized out, offset_size=4, 
len=18446744073707981979, data=0x7721e242 \037\200)
at /home/zeitlin/mirrors/elfutils/src/readelf.c:4200
#2  0x0040d42f in print_debug_loc_section (dwflmod=optimized out, 
ebl=optimized out, ehdr=optimized out, scn=optimized out, shdr=optimized 
out, dbg=0x623380) at /home/zeitlin/mirrors/elfutils/src/readelf.c:6140
#3  0x00409682 in print_debug (dwflmod=optimized out, ebl=0x6230d0, 
ehdr=0x7fffde90) at /home/zeitlin/mirrors/elfutils/src/readelf.c:6732
#4  0x004116e8 in process_elf_file (dwflmod=optimized out, 
fd=optimized out) at /home/zeitlin/mirrors/elfutils/src/readelf.c:698
#5  0x00412749 in process_dwflmod (dwflmod=0x622f30, 
userdata=optimized out, name=0x7778edf0 _IO_stdfile_1_lock , 
base=4284098, arg=0x0) at /home/zeitlin/mirrors/elfutils/src/readelf.c:526
#6  0x77bc5eae in dwfl_getmodules (dwfl=0x621030, callback=0x4126f0 
process_dwflmod, arg=0x7fffe080, offset=1) at 
/home/zeitlin/mirrors/elfutils/libdwfl/dwfl_getmodules.c:103
#7  0x00404243 in process_file (only_one=true, fname=optimized out, 
fd=optimized out) at /home/zeitlin/mirrors/elfutils/src/readelf.c:596
#8  main (argc=optimized out, argv=optimized out) at 
/home/zeitlin/mirrors/elfutils/src/readelf.c:277

 But this was fixed since then and so it looks like there is nothing much
to do here, knowing that Wheezy has 0.152 which does work (just tested in a
chroot).

 Sorry again for the initial confusion!
VZ


pgpJMOQa26wGN.pgp
Description: PGP signature