-
Notifications
You must be signed in to change notification settings - Fork 219
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
Test brillig_cow
fails with inliner = -Inf
#6439
Comments
brillig_cow
fails with inliner = -Inf
A bit more detail. I modified the program like so:
The print shows that the constrained and unconstrained agree:
The
So What is strange is that if I call the CLI with the ❯ nargo execute --force --inliner-aggressiveness -9223372036854775808 --show-ssa
Initial SSA:
brillig(inline) fn main f0 {
...
brillig(inline) fn eq f11 {
b0(v0: Field, v1: Field):
v2 = eq v0, v1
return v2
}
uncons: ExecutionResult { original: [0x00, 0x01, 0x02, 0x03, 0x04], modified_once: [0x00, 0x01, 0x1b, 0x03, 0x04], modified_twice: [0x00, 0x01, 0x1b, 0x1b, 0x04] }
cons: ExecutionResult { original: [0x00, 0x01, 0x02, 0x03, 0x04], modified_once: [0x00, 0x01, 0x1b, 0x03, 0x04], modified_twice: [0x00, 0x01, 0x1b, 0x1b, 0x04] }
expect: ExecutionResult { original: [0x00, 0x01, 0x02, 0x03, 0x04], modified_once: [0x00, 0x01, 0x1b, 0x03, 0x04], modified_twice: [0x00, 0x01, 0x1b, 0x1b, 0x04] }
[brillig_cow] Circuit witness successfully solved
[brillig_cow] Witness saved to /Users/aakoshh/Work/aztec/noir/test_programs/execution_success/brillig_cow/target/brillig_cow.gz A genuine Heisenbug 👀 |
I changed printing the SSA to do it without normalising the IDs, which avoids "fixing" the bug: fn print(mut self, msg: &str) -> Self {
if self.print_ssa_passes {
//self.ssa.normalize_ids();
println!("{msg}\n{}", self.ssa);
}
self
} To keep the SSA smaller the
With this the last SSA printed before the error looks like this: After Array Set Optimizations:
My branch does include #6355 but since this test is also about mutable arrays, I tried to run it without this last SSA pass, which is where the previous bug was. Without that array optimisations, the test passes. The last SSA in that case looks like this: After Simplifying:
Indeed the difference is again a
|
Since we know that calling With normalisation it looks like this:
Without normalisation the IDs of the variables have higher values:
The code that decides whether the setting of the The problem is that if we print the value of the
Here we see
|
Aim
Trying to run
test_programs
with different--inliner-aggressiveness
in #6429Expected Behavior
execution_success
tests should pass with any inliner settingBug
test_brillig_cow
fails with the following error message:To Reproduce
cd test_programs/execution_success/brillig_cow
nargo execute --force --inliner-aggressiveness -9223372036854775808
Alternatively:
3.
cargo run -p nargo_cli -- --program-dir . execute --force --inliner-aggressiveness -9223372036854775808
Workaround
None
Workaround Description
No response
Additional Context
No response
Project Impact
None
Blocker Context
No response
Nargo Version
nargo version = 0.36.0 noirc version = 0.36.0+2f0cb3e80f3d93a1dee77fffacc397811e300257 (git version hash: 2f0cb3e, is dirty: false)
NoirJS Version
No response
Proving Backend Tooling & Version
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: