You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there!
I've started to work with onnxruntime lib aproximately 2 mounth ago. I've tried to search for documentation for C++ and found some inferencing examples from ultralitycs and others (including your examples). After all i succesfuly run model inferencing and spent some time for postprocessing. However, I decided to check my code for memory leaks and other problems using clang sanitizer and found some memory leaks. After endless attempts to fix it, I still didn't understand why my code causes memory leaks, so i decided to check docs examples for memory leaks. And clang sanitizer found it:
==3972466==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x7fc26e8d5a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154#1 0x7fc26e3b4df9 (/usr/local/lib/libonnxruntime.so.1.18.0+0xa2cdf9)
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 0x7fc26e8d5a57 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154#1 0x7fc26e3b4ddd (/usr/local/lib/libonnxruntime.so.1.18.0+0xa2cddd)
Please build the binary locally with symbols. Then run the example again. You will either see the "memory leak" is gone, or you will get a full stacktrace.
Hi, there!
I've started to work with onnxruntime lib aproximately 2 mounth ago. I've tried to search for documentation for
C++
and found some inferencing examples fromultralitycs
and others (including yourexamples
). After all i succesfuly run model inferencing and spent some time for postprocessing. However, I decided to check my code for memory leaks and other problems usingclang
sanitizer and found somememory leaks
. After endless attempts to fix it, I still didn't understand why my code causes memory leaks, so i decided to check docs examples formemory leaks
. Andclang
sanitizer found it:I've used this example.
This was my
Cmake
:Interesting fact - if i will run this code it will still cause
memory leaks
:Or this one:
They all will cause the same leak with no explainings (i've tried to find symbols by adress that sanitizer gives me, but it was no use)
The text was updated successfully, but these errors were encountered: