Opened 5 years ago

Closed 5 years ago

#455 closed defect (fixed)

LeakSanitizer: detected Memory leaks

Reported by: fbarbier Owned by:
Priority: minor Milestone: VTM-6.0
Component: VTM Version: VTM-6.0rc1
Keywords: Cc: ksuehring, XiangLi, fbossen, jvet@…

Description

When building with ASAN, some memory leaks may be found.
Please reproduce with the following lines:

git checkout 0b6523f2ceb7371c7788cdb49b8a76dd8e3abc5e

cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS="-fsanitize=address" -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address"
make -j 8
cd ..

./bin/DecoderAppStaticd -b encoded.vvc -o output.yuv

Output:

VVCSoftware: VTM Decoder Version 6.0rc1 [Linux][GCC 8.2.0][64 bit] [SIMD=AVX] 
Note: found NAL_UNIT_ACCESS_UNIT_DELIMITER
Note: found NAL_UNIT_ACCESS_UNIT_DELIMITER
POC    0 TId: 0 ( I-SLICE, QP 30 ) [DT  0.043] [L0 ] [L1 ] [:,(unk)] 
Note: found NAL_UNIT_ACCESS_UNIT_DELIMITER
POC    1 TId: 0 ( P-SLICE, QP 38 ) [DT  0.031] [L0 0 ] [L1 ] [:,(unk)] 
POC    2 TId: 0 ( P-SLICE, QP 36 ) [DT  0.022] [L0 1 0 ] [L1 ] [:,(unk)] 

 Total Time:        0.225 sec.

=================================================================
==27900==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 65536 byte(s) in 2 object(s) allocated from:
    #0 0x7fd41b4a2038 in __interceptor_posix_memalign (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xea038)
    #1 0x555d5dc218aa in short* detail::aligned_malloc<short>(unsigned long, unsigned long) /home/fredb/projects/vtm/source/Lib/CommonLib/CommonDef.h:604
    #2 0x555d5e0b5cd3 in IntraPrediction::init(ChromaFormat, unsigned int) /home/fredb/projects/vtm/source/Lib/CommonLib/IntraPrediction.cpp:227
    #3 0x555d5dfbaee6 in DecLib::xActivateParameterSets() /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:854
    #4 0x555d5dfbf219 in DecLib::xDecodeSlice(InputNALUnit&, int&, int) /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:1173
    #5 0x555d5dfc164a in DecLib::decode(InputNALUnit&, int&, int&) /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:1537
    #6 0x555d5dbe996c in DecApp::decode() /home/fredb/projects/vtm/source/App/DecoderApp/DecApp.cpp:162
    #7 0x555d5dbfb679 in main /home/fredb/projects/vtm/source/App/DecoderApp/decmain.cpp:91
    #8 0x7fd41aea609a in __libc_start_main ../csu/libc-start.c:308

Direct leak of 32768 byte(s) in 2 object(s) allocated from:
    #0 0x7fd41b4a2038 in __interceptor_posix_memalign (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xea038)
    #1 0x555d5dd08b70 in bool* detail::aligned_malloc<bool>(unsigned long, unsigned long) /home/fredb/projects/vtm/source/Lib/CommonLib/CommonDef.h:604
    #2 0x555d5e0b5c8f in IntraPrediction::init(ChromaFormat, unsigned int) /home/fredb/projects/vtm/source/Lib/CommonLib/IntraPrediction.cpp:226
    #3 0x555d5dfbaee6 in DecLib::xActivateParameterSets() /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:854
    #4 0x555d5dfbf219 in DecLib::xDecodeSlice(InputNALUnit&, int&, int) /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:1173
    #5 0x555d5dfc164a in DecLib::decode(InputNALUnit&, int&, int&) /home/fredb/projects/vtm/source/Lib/DecoderLib/DecLib.cpp:1537
    #6 0x555d5dbe996c in DecApp::decode() /home/fredb/projects/vtm/source/App/DecoderApp/DecApp.cpp:162
    #7 0x555d5dbfb679 in main /home/fredb/projects/vtm/source/App/DecoderApp/decmain.cpp:91
    #8 0x7fd41aea609a in __libc_start_main ../csu/libc-start.c:308

SUMMARY: AddressSanitizer: 98304 byte(s) leaked in 4 allocation(s).

Attachments (1)

encoded.vvc (4.4 KB) - added by fbarbier 5 years ago.

Download all attachments as: .zip

Change history (4)

Changed 5 years ago by fbarbier

comment:2 Changed 5 years ago by fbarbier

Ok for me ! Thank you Frank.

comment:3 Changed 5 years ago by XiangLi

  • Milestone set to VTM-6.0
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.