-
When coding CCF apps in C++, there is a possibility to introduce memory leaks, compared to JS apps where each request is served by a new JS engine/context instance. The docs don't have much information on how to make a CCF app production ready. Checking for leaks in C++ apps seems like one of the things developers should do before going to production. If I understand correctly, then this is only possible in virtual mode together with using valgrind etc. The assumption is that an SGX build would have the same leaks. Some guidance on this would be helpful. EDIT: Related: #3711 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@letmaik memory leak detection in C++ is out of scope for CCF. Developers are encouraged to use the tools available on each platform instead, in virtual mode that's ASAN/Valgrind/etc, and in SGX, OpenEnclave debug malloc (https://github.com/openenclave/openenclave/blob/master/samples/debugmalloc/README.md). Developers who wish to do so are welcome to take inspiration from the way CCF does this itself (https://github.com/microsoft/CCF/blob/main/cmake/tools.cmake#L4), but we have no plan to provide specific guidance on this. |
Beta Was this translation helpful? Give feedback.
@letmaik memory leak detection in C++ is out of scope for CCF. Developers are encouraged to use the tools available on each platform instead, in virtual mode that's ASAN/Valgrind/etc, and in SGX, OpenEnclave debug malloc (https://github.com/openenclave/openenclave/blob/master/samples/debugmalloc/README.md).
Developers who wish to do so are welcome to take inspiration from the way CCF does this itself (https://github.com/microsoft/CCF/blob/main/cmake/tools.cmake#L4), but we have no plan to provide specific guidance on this.