]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
kv-cache : fix use-after-move of defrag info (#14189)
authorGeorgi Gerganov <redacted>
Sun, 15 Jun 2025 07:52:11 +0000 (10:52 +0300)
committerGitHub <redacted>
Sun, 15 Jun 2025 07:52:11 +0000 (10:52 +0300)
ggml-ci

src/llama-kv-cache-unified.cpp

index 03107057079ca6c1ff3d6a70096a56d62e89c349..b17936abdb4c6a433dfd403458d2248756dbe4d1 100644 (file)
@@ -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;
     }
 }