fix(avm): constraint when unwinding empty call stack #19485
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

internal_call_returnforcesinternal_call_id' = return_id. However, during an error (when the call stack is empty)return_id = 0which forcesinternal_call_id' = 0. When there is another enqueued call after an error row (specifically this only happens when there is a teardown), there are constraints that enforceinternal_call_id' = 1.These are contradictory constraints and the solution is to only enforce
internal_call_id' = return_idif there are no errors.This didnt get detected via other fuzzers or tests because in the single enqueued call variant, the next row is defaulted to zero which enables the buggy relation to pass.