Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
main.c
a,a1,iterator1,a2,a3,iterator2,a4,a5,iterator3,a6,a7,array2,a8 --harness-type initialize-with-memory-snapshot --initial-goto-location main:4
^EXIT=10$
Expand All @@ -14,5 +14,3 @@ a,a1,iterator1,a2,a3,iterator2,a4,a5,iterator3,a6,a7,array2,a8 --harness-type in
VERIFICATION FAILED
--
unwinding assertion loop \d+: FAILURE
--
For more information take a look at github#5351
5 changes: 1 addition & 4 deletions regression/snapshot-harness/dynamic-array-int/test.desc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
KNOWNBUG
CORE
main.c
array,iterator1,iterator2,iterator3 --harness-type initialize-with-memory-snapshot --initial-goto-location main:4
^EXIT=10$
Expand All @@ -14,6 +14,3 @@ array,iterator1,iterator2,iterator3 --harness-type initialize-with-memory-snapsh
VERIFICATION FAILED
--
unwinding assertion loop \d+: FAILURE
--
Broken by https://github.com/diffblue/cbmc/issues/4978
For more information take a look at github#5351
6 changes: 3 additions & 3 deletions src/goto-harness/memory_snapshot_harness_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,9 @@ class memory_snapshot_harness_generatort : public goto_harness_generatort
auto push_to_output = [&output](const valuet &value) {
output.push_back(value);
};
// Clear the sets before starting the sort to ensure a fresh traversal
seen.clear();
inserted.clear();
for(const auto &item : input)
{
dfs(item, associate_key_with_t, push_to_output);
Expand All @@ -339,10 +342,7 @@ class memory_snapshot_harness_generatort : public goto_harness_generatort
template <typename Value, typename Map, typename Handler>
void dfs(Value &&node, Map &&key_to_t, Handler &&handle)
{
PRECONDITION(seen.empty() && inserted.empty());
dfs_inner(node, key_to_t, handle);
seen.clear();
inserted.clear();
}

template <typename Value, typename Map, typename Handler>
Expand Down
Loading