bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/28401] New: fail to allocate error in objdump at xmalloc.c


From: irfanariq at kaist dot ac.kr
Subject: [Bug binutils/28401] New: fail to allocate error in objdump at xmalloc.c:147
Date: Thu, 30 Sep 2021 20:28:07 +0000

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

            Bug ID: 28401
           Summary: fail to allocate error in objdump at xmalloc.c:147
           Product: binutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: irfanariq at kaist dot ac.kr
  Target Milestone: ---

Created attachment 13688
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13688&action=edit
poc and full stack trace

Hello,

We are currently working on fuzz testing feature, and we found a *failed to
allocate* error on `objdump`.

The stack traces are as follow:
```
==29580==WARNING: AddressSanitizer failed to allocate 0x40100003034 bytes
==29580==AddressSanitizer CHECK failed:
../../../../src/libsanitizer/sanitizer_common/sanitizer_allocator.cc:218 "((0))
!= (0)" (0x0, 0x0)
    #0 0x7ffa72d6ebf2  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2)
    #1 0x7ffa72d8d575 in __sanitizer::CheckFailed(char const*, int, char
const*, unsigned long long, unsigned long long)
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0x108575)
    #2 0x7ffa72d74332  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xef332)
    #3 0x7ffa72cace46  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x27e46)
    #4 0x7ffa72d63b0a in __interceptor_malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb0a)
    #5 0x55da08b7897b in xmalloc xmalloc.c:147
    #6 0x55da079d8813 in load_specific_debug_section objdump.c:3643
    #7 0x55da079d8fb5 in load_debug_section objdump.c:3740
    #8 0x55da07a338ad in check_for_and_load_links
.../binutils-git/binutils/dwarf.c:11327
    #9 0x55da07a33fdf in load_separate_debug_files
.../binutils-git/binutils/dwarf.c:11465
    #10 0x55da079decd7 in dump_bfd objdump.c:4882
    #11 0x55da079df994 in display_object_bfd objdump.c:5068
    #12 0x55da079dfd2f in display_any_bfd objdump.c:5158
    #13 0x55da079dfda6 in display_file objdump.c:5179
    #14 0x55da079e115a in main objdump.c:5529
```
The full stack trace is attached.

**Step to reproduce**

We configured `objdump` using 

`CFLAGS="-g -O0 -fsanitize=address" ./configure --prefix=$(pwd)/
--disable-shared --enable-targets=all`

and built it using `make -j 10`, and run it with:

```
./objdump --disassembler-options=data16 --debugging-tags <attached file> -d
```

The input file is attached.

**Environment**
- OS: Ubuntu 18.04.5 LTS
- GCC version: gcc 7.5.0
- binutils version: commit (98ca73a) of master branch on sourceware git
([link](https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=98ca73afe51e1e921915c37f242c88d4d445841c))

Thank you.

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]