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

Division by zero in constant evaluation is not detected in Tact and leaks to FunC #327

Closed
anton-trunov opened this issue May 7, 2024 · 0 comments · Fixed by #352
Closed
Assignees
Labels
bug Something isn't working or isn't right scope: const-eval The constant and partial evaluation optimization mechanisms typechecker
Milestone

Comments

@anton-trunov
Copy link
Member

This contract

contract DivisionByZero {

    get fun foo(): Int {
        let x: Int = 1 / 0;
        return 42;
    }
}

fails with the following error:

Func compilation error: cannot generate code for function `$DivisionByZero$_fun_foo`:
/dist/tact_DivisionByZero.code.fc:20:17: error: division by zero
int $x = (1 / 0); 
``
@anton-trunov anton-trunov added bug Something isn't working or isn't right typechecker scope: const-eval The constant and partial evaluation optimization mechanisms labels May 7, 2024
@anton-trunov anton-trunov added this to the v1.4.0 milestone May 7, 2024
@anton-trunov anton-trunov modified the milestones: v1.4.0, v1.3.1 May 17, 2024
@Gusarich Gusarich self-assigned this May 23, 2024
@Gusarich Gusarich mentioned this issue May 23, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or isn't right scope: const-eval The constant and partial evaluation optimization mechanisms typechecker
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants