From: Georgi Gerganov Date: Sun, 15 Jun 2025 07:52:11 +0000 (+0300) Subject: kv-cache : fix use-after-move of defrag info (#14189) X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=5fce5f948df8f189a5401a8ecaa9753106e75abb;p=pkg%2Fggml%2Fsources%2Fllama.cpp kv-cache : fix use-after-move of defrag info (#14189) ggml-ci --- diff --git a/src/llama-kv-cache-unified.cpp b/src/llama-kv-cache-unified.cpp index 03107057..b17936ab 100644 --- a/src/llama-kv-cache-unified.cpp +++ b/src/llama-kv-cache-unified.cpp @@ -1739,7 +1739,7 @@ llama_kv_cache_unified_state::llama_kv_cache_unified_state( llama_context * lctx, bool do_shift, defrag_info dinfo) : status(LLAMA_MEMORY_STATUS_SUCCESS), kv(kv), lctx(lctx), do_shift(do_shift), dinfo(std::move(dinfo)) { - if (!do_shift && dinfo.empty()) { + if (!do_shift && this->dinfo.empty()) { status = LLAMA_MEMORY_STATUS_NO_UPDATE; } }