[Nasm-bugs] [Bug 3392843] New: Simple memory leak is nasm

noreply-nasm at dev.nasm.us noreply-nasm at dev.nasm.us
Thu Mar 16 00:57:36 PDT 2023


https://bugzilla.nasm.us/show_bug.cgi?id=3392843

            Bug ID: 3392843
           Summary: Simple memory leak is nasm
           Product: NASM
           Version: 2.17 (development)
          Hardware: All
                OS: Linux
            Status: OPEN
          Severity: normal
          Priority: Medium
         Component: Assembler
          Assignee: nobody at nasm.us
          Reporter: youngseok.main at gmail.com
                CC: chang.seok.bae at intel.com, gorcunov at gmail.com,
                    hpa at zytor.com, nasm-bugs at nasm.us
     Obtained from: Built from git using configure

Hello,

Our fuzzer found a memory leak in nasm. It is not serious, but I think this bug
needs to be fixed because it will help fuzz testing on nasm to reduce false
alarms.

Command Input:
nasm a

(a is a nonexisting file)

Output:
a: warning: default output file same as input, using `nasm.out' for output
 [-w+other]
nasm: fatal: unable to open input file `a' No such file or directory

Sanitizer Dump:
==419==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2 byte(s) in 1 object(s) allocated from:
    #0 0x7ffff6ef6b40 in __interceptor_malloc
(/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    #1 0x555555688c3f in nasm_malloc nasmlib/alloc.c:55
    #2 0x55555568b367 in filename_set_extension nasmlib/filename.c:57
    #3 0x5555556819d7 in main asm/nasm.c:607
    #4 0x7ffff6a48c86 in __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Environment:
OS: Ubuntu 18.04
gcc: 7.5.0
nasm: 2.17rc0 (Git master branch, a916e4127b2eaa3bf40bddf3de9b0ceefc0d98a)

Note that we built nasm with sanitizers.

Thank you.

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


More information about the Nasm-bugs mailing list