-
Notifications
You must be signed in to change notification settings - Fork 259
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
Stack trace order in nargo debug
is broken
#7195
Labels
bug
Something isn't working
Comments
I think this is a duplicate issue of #7093 with them both sharing the same root cause. |
Thanks for the reply! Might be the same root cause, although we experienced the issue only yesterday. |
michaeljklein
added a commit
that referenced
this issue
Jan 29, 2025
… test of expected trace when stepping through test that was failing in #7195
TomAFrench
added a commit
that referenced
this issue
Feb 25, 2025
* master: (74 commits) feat: optimize out range checks on limiting cases (#7510) chore: clippy fixes (#7505) chore(docs): Supplement docs on `modexp` as a required precompile for Barretenberg's Solidity verifier (#7508) feat(debugger): REPL add breakpoint by sourcecode line (#5204) fix: issue duplicate error on impl function without self (#7490) feat(experimental): Support struct constructors in match patterns (#7489) feat: use resolved type instead of needing Constructor.struct_type (#7500) feat: better error message when keyword is found instead of type in p… (#7501) chore: bump external pinned commits (#7497) feat(experimental): Add invalid pattern syntax error (#7487) fix(performance): Accurately mark safe constant indices for arrays of complex types (#7491) fix(experimental): Allow shadowing in match patterns (#7484) chore: regression test #7195 (#7233) chore(docs): Section on `noir-profiler execution-opcodes` (#7480) chore: improve proptesting of 128bit values in `noirc_abi` (#7485) chore(profiler): Use brillig names for outputted flamegraphs (#7470) chore(docs): Profiler images reference (#7481) fix: don't use dummy location when inserting debug code (#7482) feat(cli)!: Add `--unstable-features` to gate unstable features (#7449) feat: Sync from aztec-packages (#7474) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Aim
Use
nargo debug
to inspect the stack trace of a simple program.Expected Behavior
Before #7163,
nargo debug
used to work in the following way.Consider the program:
When running
nargo debug
on it, and stepping until theassert(y != 0);
line, the printed trace is the following:Note that the order of the stack frames here is correct. First is
main
, thenfoo
, thenbar
. This is chronological. This happens after about 6 steps into the program (six times callingnext
in the debugger CLI).Bug
#7163 seems to break
nargo debug
in the following way.With the same program,
nargo debug
prints the following stack trace after a fewnext
commands:Note that the order in which the stack frames are printed is not the order in which they are created:
main
is first,bar
is next,foo
is last. It should bemain
->foo
->bar
, because that's the chronological order in which they appear.To Reproduce
nargo new
;src/main.nr
with the sample program;x = 4
andy = 5
;nargo debug
and step until theassert
line.Workaround
Yes
Workaround Description
Reverting the changes in
preprocess_fns.rs
from #7163 fixes the issue.But, we suspect the issue is in
nargo debug
itself.Additional Context
No response
Project Impact
Blocker
Blocker Context
This is blocking other work we're doing in our fork of Noir in https://github.com/blocksense-network/noir , so we have a temporary patch, but we'd love it if this is fixed upstream.
Nargo Version
nargo version = 1.0.0-beta.1 noirc version = 1.0.0-beta.1+c44b62615f1c8ee657eedd82f2b80e2ec76c9078 (git version hash: c44b626, 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: