11-06-2019 08:46 AM
We are using the ECW/JP2 SDK version 5.4.0 (licensed for read/write, accessed through GDAL), and we have noticed some memory leaks. Call stack is attached below. I assume the call stack is quite short because the leak is occurring in an SDK-internal thread.
It appears that the CSegment destructor can allocate an error message and then fails to clean it up? The leak is small enough that this is not a show-stopper for us, but hopefully it is fixed in an upcoming SDK version.
ERROR: LeakSanitizer: detected memory leaks Direct leak of 4104 byte(s) in 2 object(s) allocated from: #0 0x7fe4f9be7d38 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded38) #1 0x7fe3e822f756 in NCSFormatErrorText (/[redacted]/libNCSEcw.so.5.4.0+0x1d5756) #2 0x4f8b930dc1be3fff (<unknown module>) #3 0x7fe3e86bda3a in NCS::JPC::CSegment::~CSegment() (/[redacted]/libNCSEcw.so.5.4.0+0x663a3a) SUMMARY: AddressSanitizer: 4104 byte(s) leaked in 2 allocation(s).
Solved! Go to Solution.