Description
Name and Version
llama.cpp integrated in a personal project, using CMake's FetchContent_Declare / FetchContent_Declare.
Version:
int LLAMA_BUILD_NUMBER = 5544;
char const *LLAMA_COMMIT = "b49a8ff9";
char const *LLAMA_COMPILER = "Apple clang version 17.0.0 (clang-1700.0.13.5)";
char const *LLAMA_BUILD_TARGET = "arm64-apple-darwin24.5.0";
Operating systems
Mac
Which llama.cpp modules do you know to be affected?
Other (Please specify in the next section)
Command line
Problem description & steps to reproduce
I am reusing code similar to mdmd-cli, inside my application. For now, I am including code from tools/mtmd, in particular mdmd-helper.
I am seeing memory leaks stemming from mtmd_helper_eval_chunk_single. I think this is because text_batch seems to be left hanging on success and no reference is kept in the mtmd context so it can be freed once it's not needed any more.
I'm still in the process of analysing this section of the code and I'm not sure how a fix should look.
I'm only mentioning because it might be useful to someone else.
First Bad Commit
No response