From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117940 invoked by alias); 8 Oct 2019 15:00:52 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 117874 invoked by uid 48); 8 Oct 2019 15:00:48 -0000 From: "leftcopy.chx at gmail dot com" To: elfutils-devel@sourceware.org Subject: [Bug libelf/25083] New: Unexpected hangs at elf32_updatefile.c:518 Date: Tue, 08 Oct 2019 15:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libelf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: leftcopy.chx at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2019-q4/txt/msg00014.txt.bz2 https://sourceware.org/bugzilla/show_bug.cgi?id=3D25083 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=3D12034&action=3Ded= it 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 $F= ILE.=20 When interrupted, the gdb backtrace is like: #0 0x00007ffff763e6e7 in __libc_pwrite64 (fd=3Dfd@entry=3D5, buf=3Dbuf@entry=3D0x7fffffff1b30, count=3Dcount@entry=3D4096, offset=3Doffset@entry=3D4640862844) at ../sysdeps/unix/sysv/linux/pwrite64.= c:29 #1 0x00007ffff7bcabd0 in pwrite_retry (off=3D4640862844, len=3D4096, buf=3D0x7fffffff1b30, fd=3D5) at ../lib/system.h:95 #2 fill (fd=3D, pos=3D4640862844, len=3D914482139140, fillbuf=3Dfillbuf@entry=3D0x7fffffff1b30 "", filledp=3Dfilledp@entry=3D0x7f= ffffff1ae0) at elf32_updatefile.c:518 #3 0x00007ffff7bcbe86 in __elf64_updatefile (elf=3Delf@entry=3D0x555555765= 930, change_bo=3Dchange_bo@entry=3D0, shnum=3Dshnum@entry=3D38) at elf32_updatef= ile.c:728 #4 0x00007ffff7bc7e99 in write_file (shnum=3D38, change_bo=3D0, size=3D919= 123089320, elf=3D0x555555765930) at elf_update.c:132 #5 elf_update (elf=3D0x555555765930, cmd=3D) at elf_update.= c:231 #6 0x000055555555b64e in copy_elided_sections (unstripped=3D0x555555765930, stripped=3D, stripped_ehdr=3D, bias=3D) at unstrip.c:2074 #7 0x000055555555bb82 in handle_file (output_file=3D, create_dirs=3D, stripped=3D0x555555761950, stripped_ehdr=3D0x7fffffffc0c0, unstripped=3D0x555555763940) at unstrip.c:2162 #8 0x000055555555be97 in handle_explicit_files (output_file=3D0x7fffffffc9= e1 "/tmp/test.file", create_dirs=3D, force=3D) at unstrip.c:2227 #9 0x0000555555557b4b in main (argc=3D, argv=3D0x7fffffffc4= 28) at unstrip.c:2562 Relevant files are attached. --=20 You are receiving this mail because: You are on the CC list for the bug.