Add comment regarding fixed UB
This commit is contained in:
parent
c35004b90d
commit
fcfdc56cc2
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue