https://sourceware.org/bugzilla/show_bug.cgi?id=25083
Bug ID: 25083
Summary: Unexpected hangs at elf32_updatefile.c:518
Product: elfutils
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: libelf
Assignee: unassigned at sourceware dot org
Reporter: leftcopy.chx at gmail dot com
CC: elfutils-devel at sourceware dot org
Target Milestone: ---
Created attachment 12034
--> https://sourceware.org/bugzilla/attachment.cgi?id=12034&action=edit
hang input file and gdb backtrace
When executing `./eu-unstrip $FILE ./stripped -o /dev/null` (git commit
47780c9e), it may cause unexpected hangs against some crafted input file $FILE.
When interrupted, the gdb backtrace is like:
#0 0x00007ffff763e6e7 in __libc_pwrite64 (fd=fd@entry=5,
buf=buf@entry=0x7fffffff1b30, count=count@entry=4096,
offset=offset@entry=4640862844) at ../sysdeps/unix/sysv/linux/pwrite64.c:29
#1 0x00007ffff7bcabd0 in pwrite_retry (off=4640862844, len=4096,
buf=0x7fffffff1b30, fd=5) at ../lib/system.h:95
#2 fill (fd=<optimized out>, pos=4640862844, len=914482139140,
fillbuf=fillbuf@entry=0x7fffffff1b30 "", filledp=filledp@entry=0x7fffffff1ae0)
at elf32_updatefile.c:518
#3 0x00007ffff7bcbe86 in __elf64_updatefile (elf=elf@entry=0x555555765930,
change_bo=change_bo@entry=0, shnum=shnum@entry=38) at elf32_updatefile.c:728
#4 0x00007ffff7bc7e99 in write_file (shnum=38, change_bo=0, size=919123089320,
elf=0x555555765930) at elf_update.c:132
#5 elf_update (elf=0x555555765930, cmd=<optimized out>) at elf_update.c:231
#6 0x000055555555b64e in copy_elided_sections (unstripped=0x555555765930,
stripped=<optimized out>, stripped_ehdr=<optimized out>, bias=<optimized out>)
at unstrip.c:2074
#7 0x000055555555bb82 in handle_file (output_file=<optimized out>,
create_dirs=<optimized out>, stripped=0x555555761950,
stripped_ehdr=0x7fffffffc0c0, unstripped=0x555555763940)
at unstrip.c:2162
#8 0x000055555555be97 in handle_explicit_files (output_file=0x7fffffffc9e1
"/tmp/test.file", create_dirs=<optimized out>, force=<optimized out>) at
unstrip.c:2227
#9 0x0000555555557b4b in main (argc=<optimized out>, argv=0x7fffffffc428) at
unstrip.c:2562
Relevant files are attached.
--
You are receiving this mail because:
You are on the CC list for the bug.