bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/28402] New: fail to allocate error in objdump at objalloc.


From: irfanariq at kaist dot ac.kr
Subject: [Bug binutils/28402] New: fail to allocate error in objdump at objalloc.c:143
Date: Thu, 30 Sep 2021 20:31:17 +0000

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

            Bug ID: 28402
           Summary: fail to allocate error in objdump at objalloc.c:143
           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 13689
  --> https://sourceware.org/bugzilla/attachment.cgi?id=13689&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:

==29506==ERROR: AddressSanitizer failed to allocate 0x8c9b9e000 (37744140288)
bytes of LargeMmapAllocator (error code: 12)
==29506==AddressSanitizer CHECK failed:
../../../../src/libsanitizer/sanitizer_common/sanitizer_common.cc:118 "((0 &&
"unable to mmap")) != (0)" (0x0, 0x0)
    #0 0x7f2253019bf2  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xe9bf2)
    #1 0x7f2253038575 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 0x7f2253023482  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xf3482)
    #3 0x7f225302f895  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xff895)
    #4 0x7f2252f587fd  (/usr/lib/x86_64-linux-gnu/libasan.so.4+0x287fd)
    #5 0x7f225300eb0a in __interceptor_malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb0a)
    #6 0x563b480a1792 in _objalloc_alloc objalloc.c:143
    #7 0x563b473d1794 in bfd_alloc .../binutils-git/bfd/opncls.c:1032
    #8 0x563b47677b8e in coff_slurp_line_table
.../binutils-git/bfd/coffcode.h:4374
    #9 0x563b4767a917 in coff_slurp_symbol_table
.../binutils-git/bfd/coffcode.h:4915
    #10 0x563b4767ae4d in coff_slurp_reloc_table
.../binutils-git/bfd/coffcode.h:5090
    #11 0x563b4767be5c in coff_canonicalize_reloc
.../binutils-git/bfd/coffcode.h:5238
    #12 0x563b473b99f2 in bfd_canonicalize_reloc
.../binutils-git/bfd/bfd.c:1579
    #13 0x563b46f08bef in disassemble_section objdump.c:3202
    #14 0x563b473d53c0 in bfd_map_over_sections
.../binutils-git/bfd/section.c:1383
    #15 0x563b46f0b293 in disassemble_data objdump.c:3599
    #16 0x563b46f126cc in dump_bfd objdump.c:5006
    #17 0x563b46f12994 in display_object_bfd objdump.c:5068
    #18 0x563b46f12d2f in display_any_bfd objdump.c:5158
    #19 0x563b46f12da6 in display_file objdump.c:5179
    #20 0x563b46f1415a 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 <attached file> --no-show-raw-insn --show-raw-insn i8086
--file-offsets -S booke --debugging --disassembler-options=addr16 -r --demangle
```

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]