Skip to content
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

Update scopeContext's stack to have correct contract address while tracing for contract calls #2487

Merged
merged 4 commits into from
Jul 15, 2024

Conversation

ganeshvanahalli
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli commented Jul 12, 2024

If a Stylus contract invoked another contract, scopeContext used in tracing of such calls didn't have the correct contract address in its stack, resulting in situations like- null dereference in prestateTracers.

This PR fixes such cases by calling CaptureState with the new contract's address included in the scopeContext's stack.

Part of NIT-2664

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Jul 12, 2024
@ganeshvanahalli ganeshvanahalli marked this pull request as ready for review July 15, 2024 14:50
@joshuacolvin0 joshuacolvin0 enabled auto-merge July 15, 2024 20:50
@joshuacolvin0 joshuacolvin0 merged commit 262d934 into master Jul 15, 2024
13 checks passed
@joshuacolvin0 joshuacolvin0 deleted the fix-stylus-prestatetracerbug branch July 15, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design-approved s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants