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

llvm-context: disable call re-entrancy for send and transfer #196

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

xermicus
Copy link
Member

@xermicus xermicus commented Feb 6, 2025

Closes #117

Improves related tests as a drive-by.

@xermicus xermicus requested a review from athei February 6, 2025 13:43
let flags = REENTRANT_CALL_FLAG | STATIC_CALL_FLAG;
(
context.xlen_type().const_int(flags as u64, false),
context.word_type().const_all_ones(),
Copy link
Member

Choose a reason for hiding this comment

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

Could make sense to set this to zero here. A static call can't set any storage. But it should not the necessary.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah I think this is a good point. Let's do the defensive approach and set it to zero. Thanks for pointing this out!

@xermicus xermicus merged commit 60fc09f into main Feb 6, 2025
6 checks passed
@xermicus xermicus deleted the cl/transfers branch February 6, 2025 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Gas limits for calls
2 participants