public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug tools/23755] New: Multiple floating point exception in findtextrel.c in eu-findtextrel biniary of elfutils-v.0174.
@ 2018-10-10 13:02 wcventure at 126 dot com
  2018-10-10 13:03 ` [Bug tools/23755] " wcventure at 126 dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: wcventure at 126 dot com @ 2018-10-10 13:02 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=23755

            Bug ID: 23755
           Summary: Multiple floating point exception in findtextrel.c in
                    eu-findtextrel biniary of elfutils-v.0174.
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: tools
          Assignee: unassigned at sourceware dot org
          Reporter: wcventure at 126 dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Created attachment 11311
  --> https://sourceware.org/bugzilla/attachment.cgi?id=11311&action=edit
POC

Hi,

I found some floating point exception in findtextrel.c in eu-findtextrel of the
latest elfutils-0.174 code base. I have confirmed them with GDB and address
sanitizer.

Here are the POC files. I'll also show you the debugging process. It seems that
this is caused by the divide-by-zero problem.

> gdb --args ./eu-findtextrel POC3-findtextrel
> GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
> ...
> Reading symbols from ./eu-findtextrel...done.
> (gdb) b 418
> Breakpoint 1 at 0x40379c: file findtextrel.c, line 418.
> (gdb) start
> Temporary breakpoint 2, main (argc=2, argv=0x7ffffffedfc8) at findtextrel.c:107
> 107     {
> (gdb) c
> Continuing.
> Breakpoint 1, process_file (fname=0x7ffffffee247 "POC3-findtextrel", more_than_one=false) at findtextrel.c:418
> 418                        (size_t) cnt < shdr->sh_size / shdr->sh_entsize;
> (gdb) p shdr->sh_entsize
> $2 = 0
> (gdb) n
> 
> Program received signal SIGFPE, Arithmetic exception.
> 0x0000000000403810 in process_file (fname=0x7ffffffee247 "POC3-findtextrel", more_than_one=false) at findtextrel.c:418
> 418                        (size_t) cnt < shdr->sh_size / shdr->sh_entsize;

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2018-10-19 22:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-10 13:02 [Bug tools/23755] New: Multiple floating point exception in findtextrel.c in eu-findtextrel biniary of elfutils-v.0174 wcventure at 126 dot com
2018-10-10 13:03 ` [Bug tools/23755] " wcventure at 126 dot com
2018-10-10 13:04 ` wcventure at 126 dot com
2018-10-10 16:09 ` wcventure at 126 dot com
2018-10-14 15:01 ` mark at klomp dot org
2018-10-14 16:22 ` wcventure at 126 dot com
2018-10-19 22:27 ` mark at klomp dot org

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).