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

Suspicious Loop #171

Open
Esorat opened this issue Oct 10, 2024 · 0 comments · May be fixed by #206
Open

Suspicious Loop #171

Esorat opened this issue Oct 10, 2024 · 0 comments · May be fixed by #206
Assignees
Labels
Milestone

Comments

@Esorat
Copy link
Member

Esorat commented Oct 10, 2024

Summary
An optional detector for identifying potentially problematic loops. It focuses on loops whose conditions are either always true or compare against unusually large constants. This detector would utilize the Tact constant evaluator to analyze condition expressions.

Context
Such loops pose risks of being unbounded or consuming excessive gas. By flagging these suspicious patterns, this optional detector aims to assist auditors in their code review process, enhancing the identification of potential performance and security issues.

Examples

// Loop with excessive iterations
repeat (1_000_001) { // Highlighted by detector 
  // ...
}
@jubnzv jubnzv added the good first issue Good for newcomers label Oct 10, 2024
@Esorat Esorat linked a pull request Nov 3, 2024 that will close this issue
4 tasks
@jubnzv jubnzv added this to the v0.7 milestone Jan 24, 2025
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 a pull request may close this issue.

2 participants