bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/25249] New: Memory leak in microblaze-dis.c


From: xhwu_steven at 163 dot com
Subject: [Bug binutils/25249] New: Memory leak in microblaze-dis.c
Date: Wed, 04 Dec 2019 11:45:24 +0000

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

            Bug ID: 25249
           Summary: Memory leak in microblaze-dis.c
           Product: binutils
           Version: 2.34 (HEAD)
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: xhwu_steven at 163 dot com
  Target Milestone: ---

Created attachment 12106
  --> https://sourceware.org/bugzilla/attachment.cgi?id=12106&action=edit
Compile binutils with ASAN, and read this file as input.

ASAN log:

==60==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 3 byte(s) in 1 object(s) allocated from:
    #0 0x483514 in __strdup
/src/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:468:3
    #1 0x6e76d0 in get_field /src/binutils-gdb/opcodes/microblaze-dis.c:46:11
    #2 0x6e6826 in print_insn_microblaze
/src/binutils-gdb/opcodes/microblaze-dis.c
    #3 0x4ca15d in LLVMFuzzerTestOneInput
/src/binutils-gdb/fuzz/fuzz_disassemble.c:71:13
    #4 0x51a8c6 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15
    #5 0x4cb0af in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned
long) /src/libfuzzer/FuzzerDriver.cpp:292:6
    #6 0x4d8d12 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:774:9
    #7 0x4ca6f7 in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #8 0x7f801cfda82f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

Direct leak of 3 byte(s) in 1 object(s) allocated from:
    #0 0x483514 in __strdup
/src/llvm-project/compiler-rt/lib/asan/asan_interceptors.cpp:468:3
    #1 0x6e76d0 in get_field /src/binutils-gdb/opcodes/microblaze-dis.c:46:11
    #2 0x6e64b9 in print_insn_microblaze
/src/binutils-gdb/opcodes/microblaze-dis.c:296:36
    #3 0x4ca15d in LLVMFuzzerTestOneInput
/src/binutils-gdb/fuzz/fuzz_disassemble.c:71:13
    #4 0x51a8c6 in fuzzer::Fuzzer::ExecuteCallback(unsigned char const*,
unsigned long) /src/libfuzzer/FuzzerLoop.cpp:556:15
    #5 0x4cb0af in fuzzer::RunOneTest(fuzzer::Fuzzer*, char const*, unsigned
long) /src/libfuzzer/FuzzerDriver.cpp:292:6
    #6 0x4d8d12 in fuzzer::FuzzerDriver(int*, char***, int (*)(unsigned char
const*, unsigned long)) /src/libfuzzer/FuzzerDriver.cpp:774:9
    #7 0x4ca6f7 in main /src/libfuzzer/FuzzerMain.cpp:19:10
    #8 0x7f801cfda82f in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x2082f)

SUMMARY: AddressSanitizer: 6 byte(s) leaked in 2 allocation(s).

Code here:

      int print_insn_microblaze(bfd_vma memaddr, struct disassemble_info *
info):  
     .......
     .......
     case INST_TYPE_RD_R1:
          print_func (stream, "\t%s, %s", get_field_rd (inst), get_field_r1
(inst));
     .......

-- 
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]