public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug libelf/25083] New: Unexpected hangs at elf32_updatefile.c:518
@ 2019-10-08 15:00 leftcopy.chx at gmail dot com
  2019-10-19 19:27 ` [Bug libelf/25083] " mark at klomp dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: leftcopy.chx at gmail dot com @ 2019-10-08 15:00 UTC (permalink / raw)
  To: elfutils-devel

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-07-28  4:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-08 15:00 [Bug libelf/25083] New: Unexpected hangs at elf32_updatefile.c:518 leftcopy.chx at gmail dot com
2019-10-19 19:27 ` [Bug libelf/25083] " mark at klomp dot org
2019-10-20  3:43 ` leftcopy.chx at gmail dot com
2019-10-20 10:18 ` mark at klomp dot org
2019-10-20 15:24 ` mark at klomp dot org
2019-10-21 20:58 ` [Bug tools/25083] unstrip tries to write out an enormous amount of data mark at klomp dot org
2019-10-26  0:21 ` mark at klomp dot org
2020-07-28  4:46 ` meave390 at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).