Skip to content
Open
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
5 changes: 5 additions & 0 deletions src/map/if/acd/ac_decomposition.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,11 @@ class ac_decomposition_impl
for ( uint32_t i = 0; i < num_vars; ++i )
{
pComb[i] = pInvPerm[i] = i;
/* bestPerm is written only when some combination beats the initial
* best_cost. When none does, the loop below still evaluates
* permutations[bestPerm[i]], which reads uninitialised stack and then
* indexes permutations[] with it. Seed the identity permutation. */
bestPerm[i] = i;
}

/* early bail-out conditions */
Expand Down