Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ssa): conditionalise array indexes under IF statements #1395

Merged
merged 4 commits into from
Jun 2, 2023

Conversation

guipublic
Copy link
Contributor

@guipublic guipublic commented May 24, 2023

Description

Problem*

Issue reported by Nouns here: https://github.com/aragonzkresearch/noir-storage-proofs/blob/14cb94207fc466e4682ac2717555e5a7dd229f4a/lib/src/lib.nr#LL244C2-L251C13

Same error is also reported here: #1347

Summary*

This PR sets out to conditionalise array access indexes that are under if statement to avoid out-of-bounds errors.

Example

cf. regression test added in array_dynamic

Documentation

  • This PR requires documentation updates when merged.

    • I will submit a noir-lang/docs PR.
    • I will request for and support Dev Rel's help in documenting this PR.

Additional Context

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@Savio-Sou Savio-Sou linked an issue May 25, 2023 that may be closed by this pull request
1 task
@jfecher jfecher added this pull request to the merge queue Jun 2, 2023
Merged via the queue into master with commit ddca3b4 Jun 2, 2023
@jfecher jfecher deleted the gd/index_cond branch June 2, 2023 17:59
kevaundray pushed a commit that referenced this pull request Jun 6, 2023
* Condionalize also array access index

* Adds regression test

* Code review
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.

"Expression has too many unknowns" error
2 participants