diff --git a/common/common.cpp b/common/common.cpp index 7a9583b65..459d352ae 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -1700,6 +1700,7 @@ void dump_kv_cache_view_seqs(const llama_kv_cache_view & view, int row_size) { if (cs_curr[j] < 0) { continue; } if (seqs.find(cs_curr[j]) == seqs.end()) { if (seqs.size() + 1 >= sizeof(slot_chars)) { break; } + // combining the following two lines will result in an UB: https://pvs-studio.com/en/docs/warnings/v708/ auto current_size = seqs.size(); seqs[cs_curr[j]] = current_size; }