Skip to content

Conversation

@jannotti
Copy link
Contributor

@jannotti jannotti commented Nov 1, 2022

When the Debugger is set, we were using a defer() to set the debugstate on every exit from eval(). Unfortunately, we exited for some conditions before the debugState was setup, so there was a nil pointer dereference while trying to communicate the error to the Debugger.

This moves those error checks down until after the debugState is setup. It also has the tiny advantage of not setting up the defer() unless it is needed (cx.Debugger is set)

(This contains some final specs changes approved by Foundation as well.)

@jannotti jannotti changed the title fix early eval exits for Debugger AVM: fix early eval exits for Debugger Nov 1, 2022
@codecov
Copy link

codecov bot commented Nov 1, 2022

Codecov Report

Merging #4719 (2a7138b) into master (97c232d) will decrease coverage by 0.99%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #4719      +/-   ##
==========================================
- Coverage   54.37%   53.38%   -1.00%     
==========================================
  Files         414      414              
  Lines       53504    53501       -3     
==========================================
- Hits        29095    28559     -536     
- Misses      22002    22497     +495     
- Partials     2407     2445      +38     
Impacted Files Coverage Δ
data/transactions/logic/doc.go 61.53% <ø> (ø)
data/transactions/logic/eval.go 86.92% <100.00%> (-3.24%) ⬇️
daemon/algod/api/server/v2/account.go 24.83% <0.00%> (-52.95%) ⬇️
data/transactions/payset.go 50.00% <0.00%> (-50.00%) ⬇️
network/limitlistener/rejectingLimitListener.go 55.55% <0.00%> (-33.34%) ⬇️
network/topics.go 70.83% <0.00%> (-27.09%) ⬇️
ledger/roundlru.go 69.81% <0.00%> (-26.42%) ⬇️
network/msgOfInterest.go 75.00% <0.00%> (-25.00%) ⬇️
ledger/blockqueue.go 66.66% <0.00%> (-18.97%) ⬇️
stateproof/stateproofMessageGenerator.go 74.57% <0.00%> (-8.48%) ⬇️
... and 36 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@michaeldiamant michaeldiamant self-requested a review November 1, 2022 16:04
jannotti and others added 2 commits November 1, 2022 12:07
Co-authored-by: Michael Diamant <michaeldiamant@users.noreply.github.com>
Copy link
Contributor

@michaeldiamant michaeldiamant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jannotti Thanks for fixing - I confirmed TestDryrunEarlyExit fails in master as intended.

Copy link
Contributor

@jasonpaulos jasonpaulos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes make sense

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants