caesium-clt icon indicating copy to clipboard operation
caesium-clt copied to clipboard

detected memory leaks

Open Cvjark opened this issue 2 years ago • 0 comments

hi, i found something interesting in this repo.

crash sample

detected memory leaks.zip

command to reproduce

./caesiumclt -q 80 -e -S -o /dev/null crash_sample

crash info

==71957==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x44c980 in strdup /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cpp:437
    #1 0x501209 in get_filename /home/bupt/Desktop/caesium-clt/src/utils.c:182:14
    #2 0x4fdd7b in start_compression /home/bupt/Desktop/caesium-clt/src/helper.c:240:26
    #3 0x4fee98 in main /home/bupt/Desktop/caesium-clt/src/main.c:51:2
    #4 0x7fb3203d7c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x4af350 in malloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:145
    #1 0x4fd267 in parse_arguments /home/bupt/Desktop/caesium-clt/src/helper.c:196:62
    #2 0x4fee27 in main /home/bupt/Desktop/caesium-clt/src/main.c:46:12
    #3 0x7fb3203d7c86 in __libc_start_main /build/glibc-CVJwZb/glibc-2.27/csu/../csu/libc-start.c:310

Direct leak of 18 byte(s) in 1 object(s) allocated from:
    #0 0x4af6e8 in realloc /home/bupt/Desktop/tools/llvm-12.0.1/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cpp:164
    #1 0x7fb321608d2f in alloc::alloc::realloc::hc736fd5de89fa3ef /build/rustc-0m8Yd4/rustc-1.59.0+dfsg1~ubuntu1~llvm/library/alloc/src/alloc.rs:124:14
    #2 0x7fb321608d2f in alloc::alloc::Global::grow_impl::hf0049006e7ebdb0d /build/rustc-0m8Yd4/rustc-1.59.0+dfsg1~ubuntu1~llvm/library/alloc/src/alloc.rs:201:31
    #3 0x7fb321608d2f in _$LT$alloc..alloc..Global$u20$as$u20$core..alloc..Allocator$GT$::grow::hb9fcdcf97d0e846b /build/rustc-0m8Yd4/rustc-1.59.0+dfsg1~ubuntu1~llvm/library/alloc/src/alloc.rs:254:18
    #4 0x7fb321608d2f in alloc::raw_vec::finish_grow::hd9007cf6faf1aed9 (.llvm.9900164880652801993) /build/rustc-0m8Yd4/rustc-1.59.0+dfsg1~ubuntu1~llvm/library/alloc/src/raw_vec.rs:466:13

SUMMARY: AddressSanitizer: 66 byte(s) leaked in 3 allocation(s).

Cvjark avatar Jun 30 '22 07:06 Cvjark