chore(test): Replicate comptime stack overflow in a test#8473
chore(test): Replicate comptime stack overflow in a test#8473TomAFrench merged 2 commits intomasterfrom
Conversation
|
|
Thanks for investigating @asterite 🙏 |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Compilation Time'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: 23fc3cc | Previous: 05ae1f3 | Ratio |
|---|---|---|---|
private-kernel-tail |
1.376 s |
1.08 s |
1.27 |
This comment was automatically generated by workflow using github-action-benchmark.
CC: @TomAFrench
Automated pull of nightly from the [noir](https://github.com/noir-lang/noir) programming language, a dependency of Aztec. BEGIN_COMMIT_OVERRIDE fix: pass Field to ToBits intrinsic in remove_bit_shifts optimization (noir-lang/noir#8493) fix: don't produce `index Field` in value merger (noir-lang/noir#8492) fix: allowing accessing associated constants via `Self::...` (noir-lang/noir#8403) fix: remove unused generic in static_assert (noir-lang/noir#8488) fix: disallow generics on entry points (noir-lang/noir#8490) chore(test): Replicate comptime stack overflow in a test (noir-lang/noir#8473) feat: `#[test(only_fail_with = "...")]` (noir-lang/noir#8460) fix: variable used in fmtstr inside lambda wasn't tracked as captured (noir-lang/noir#8487) chore(test): Add more tests for defunctionalization (noir-lang/noir#8481) END_COMMIT_OVERRIDE Co-authored-by: AztecBot <tech@aztecprotocol.com>
Description
Problem*
Resolves an issue frequently mentioned by @rkarabut, that the comptime vs brillig fuzzer gets stack overflow.
Summary*
I ran the following test after adding a few prints to check how far it gets before it gets a stack overflow, and printed the source that caused it.
cargo test -p noir_ast_fuzzer_fuzz comptime_vs_brillig -- --nocaptureWe get this:
It turned out it was during the call to
prepare_and_compile_snippet. I added a unit test with one of the offending examples:I cannot replicate this stack overflow with
nargo.See comments for why.
Decided to lower the limits in comptime fuzzing.
Additional Context
After adding some prints, the overflow appears in the
Elaborator:Documentation*
Check one:
PR Checklist*
cargo fmton default settings.