Created attachment 354399 [details] Fix an assert fail with gaps between sections Description of problem: When updating grub2 package, I hit an assertion fail when running find-debuginfo.sh. Further investigation led me to a rather minimal test case and a patch which somehow fixes the problem and passes the test suite, though may not be completely correct due to my lack of expertise. Version-Release number of selected component (if applicable): elfutils-0.141-1.fc12.i586 How reproducible: Always, will attach reproducer. Actual results: crasher: elf32_updatefile.c:383: __elf32_updatemmap: Assertion `scn_start + dl->data.d.d_off + dl->data.d.d_size == last_position' failed. make: *** [run] Aborted (core dumped)
Created attachment 354401 [details] Offending file (i386 ELF32, passes elflint) Reproducer (hope it's short enough so that posting inline's not a problem): #include <stdlib.h> #include <fcntl.h> #include <libelf.h> main () { elf_version (EV_CURRENT); Elf *elf = elf_begin (open ("setjmp.elf", O_RDWR), ELF_C_RDWR_MMAP, NULL); elf_flagelf (elf, ELF_C_SET, ELF_F_LAYOUT); /* Section 8 will become section 13 when sorted. * elf_getdata causes scn->data_list_rear be not-NULL */ elf_getdata (elf_getscn (elf, 8), NULL); elf_update (elf, ELF_C_WRITE); return 0; } Sections in setjmp.elf: Sorted Orig Section Start Size Index Index Name 0 00 000000 000000 1 01 .text 000034 000030 2 02 .data 000064 000000 3 03 .bss 000064 000000 4 04 .modname 000064 000007 5 05 .note.GNU-stack 00006b 000000 6 06 .comment 00006b 00002e 7 07 .debug_info 000099 00006f 8 09 .debug_abbrev 000108 000033 9 10 .debug_line 00013b 00001d 10 11 .debug_str 000158 0000d0 11 12 .debug_pubtypes 000228 000012 12 14 .shstrtab 00023a 000097 13 08 .rel.debug_info 00057c 000080 14 13 .rel.debug_pubtyp 0005fc 000008 15 15 .symtab 000604 000100 16 16 .strtab 000704 000030
Patch checked in upstream.
elfutils-0.142-1.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/elfutils-0.142-1.fc11
elfutils-0.142-1.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/elfutils-0.142-1.fc10
elfutils-0.142-1.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update elfutils'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-8078
elfutils-0.142-1.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update elfutils'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8083
elfutils-0.142-1.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report.
elfutils-0.142-1.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report.