This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
disassembler bug
- From: Roland McGrath <roland at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 26 Nov 2008 01:34:38 -0800
- Subject: disassembler bug
cf https://bugzilla.redhat.com/show_bug.cgi?id=469739
This manifests with:
$ rpm -qf /usr/lib64/libavcodec.so.51
ffmpeg-libs-0.4.9-0.52.20080908.fc10.x86_64
$ eu-objdump -d /usr/lib64/libavcodec.so.51 > d
eu-objdump: i386_disasm.c:354: x86_64_disasm: Assertion `avail > 0' failed.
Aborted (core dumped)
$
It first goes off the rails with a mis-disassembly. But even if confused
and/or having bogus input, it shouldn't hit an assert. So there are
probably two bugs to fix. The first wrongly-shown instruction:
$ objdump -d /tmp/foo.o
/tmp/foo.o: file format elf64-x86-64
Disassembly of section .text:
0000000000000000 <.text>:
0: 0f 0f 00 bf pavgusb (%rax),%mm0
4: 0f 0f 0c 30 bf pavgusb (%rax,%rsi,1),%mm1
$ eu-objdump -d /tmp/foo.o
/tmp/foo.o: elf64-elf_x86_64
Disassembly of section .text:
0: 0f pop %cs
1: 0f pop %cs
2: 00 bf 0f 0f 0c 30 add %bh,0x300c0f0f(%rdi)
8: bf mov (bad)
That is a big file full of wacky SSE or whatnot instructions, so probably a
good test to check that all the disassemblies from eu-objdump match those
from objdump, not just this first one I noticed.
Thanks,
Roland