Skip to content

Conversation

@DeVikingMark
Copy link

Fixes #374

Problem:
Assertion !(ctx->componentMemory[mySubcomponents[cmp_index_ref]].inputCounter) fails when scalar inputs are assigned before array signals in loops.

Root Cause:
Input signal analysis incorrectly marks signals as "Last" instead of "Unknown" when scalar signals are assigned before array signals in loops.

Solution:
Modified visit_address_type function to be more conservative in loop contexts:

  • Changed condition from if found_unknown_address to if found_unknown_address || inside_loop
  • Fixed field references in visit_loop and visit_create_cmp functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unexpected Assertion in Circom 2.2.2 C++ Witness Generation

1 participant