Skip to content

Memory Leak error in Nasm 3.01 #175

@kittener

Description

@kittener

Hello
Before submitting the actual bug details, I would like to mention that the link referenced in the documentation:
https://bugzilla.nasm.us/
currently appears unreachable (connection timeout / site not responding).
Therefore, I am reporting the issue here.

When I test my new fuzzer, I found a bug in the release version.

Environment

Tool(s): nasm
Version: 3.01

Platform: Linux version 5.4.0-200-generic (buildd@lcy02-amd64-023) (gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2))

Build details (if relevant):

Built from: gcc

Compiler options: -g -fsanitize=address -fno-omit-frame-pointer

### Detailed Reports
Memory Leak in gmem.cc
Tool: nasm

Command line to reproduce:

nasm -M -MD /tmp/output.d -o /tmp/output.o crash1
Input file: crash1

Observed behavior:

==2023014==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 102 byte(s) in 1 object(s) allocated from:
#0 0x7f7bdfa2c808 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cc:144
#1 0x5650186d61e7 in nasm_malloc ../nasmlib/alloc.c:25
#2 0x56501864d178 in dup_Token ../asm/preproc.c:2111
#3 0x56501866411f in expand_smacro_noreset ../asm/preproc.c:6549
#4 0x56501864f7b5 in tlist_filename ../asm/preproc.c:2644
#5 0x56501864fc83 in pp_do_depend ../asm/preproc.c:2699
#6 0x565018659afa in do_directive ../asm/preproc.c:4720
#7 0x56501867006f in pp_tokline ../asm/preproc.c:8748
#8 0x5650186705ce in pp_getline ../asm/preproc.c:8803
#9 0x5650186173c4 in main ../asm/nasm.c:591
#10 0x7f7bdf735082 in __libc_start_main ../csu/libc-start.c:308

SUMMARY: AddressSanitizer: 102 byte(s) leaked in 1 allocation(s).

By
Kaiyu xie,
Institute of Information Engineering,Chinese Academy of Sciences

Metadata

Metadata

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions