From 5aceb66d1965ac46a3f36af70496ced17d0ff7a8 Mon Sep 17 00:00:00 2001 From: Aleksandr Misonizhnik Date: Fri, 23 Feb 2024 19:37:35 +0100 Subject: [PATCH] [fix] --- include/klee/ADT/SparseStorage.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/klee/ADT/SparseStorage.h b/include/klee/ADT/SparseStorage.h index 8c19a2f4b70..68bae04f052 100644 --- a/include/klee/ADT/SparseStorage.h +++ b/include/klee/ADT/SparseStorage.h @@ -229,9 +229,14 @@ struct PersistentArray : public StorageAdapter { ValueType defaultValue; public: - persistent_array_iterator(storage_ty it, size_t index, size_t size, - const ValueType &defaultValue) - : it(it), index(index), size(size), defaultValue(defaultValue) {} + persistent_array_iterator(storage_ty _it, size_t _index, size_t _size, + const ValueType &_defaultValue) + : it(_it), index(_index), size(_size), defaultValue(_defaultValue) { + while (index < size && eq(*it, defaultValue)) { + ++it; + ++index; + } + } StorageIteratorKind getKind() const override { return StorageIteratorKind::PersistenArray; }