fuzz: Fix variable in clusterlin_postlinearize_tree check

The test intends to verify that running `PostLinearize` a
second time on a tree-structured graph doesn't change the
result. But `PostLinearize` was being called on the original
variable, not the copy. So the check was comparing the
unmodified copy against itself, which is useless.

Fix by post-linearizing the correct variable.
This commit is contained in:
marcofleon
2025-12-12 13:35:49 +00:00
parent 876e2849b4
commit ce29d7d626

View File

@@ -1309,8 +1309,8 @@ FUZZ_TARGET(clusterlin_postlinearize_tree)
// Verify that post-linearizing again does not change the diagram. The result must be identical
// as post_linearization ought to be optimal already with a tree-structured graph.
auto post_post_linearization = post_linearization;
PostLinearize(depgraph_tree, post_linearization);
SanityCheck(depgraph_tree, post_linearization);
PostLinearize(depgraph_tree, post_post_linearization);
SanityCheck(depgraph_tree, post_post_linearization);
auto post_post_chunking = ChunkLinearization(depgraph_tree, post_post_linearization);
auto cmp_post = CompareChunks(post_post_chunking, post_chunking);
assert(cmp_post == 0);