Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Implement ASR pass that checks every signed and unsigned integer arithmetic and casts #2183

Open
@certik

Description

@certik

This pass will only be run in Debug mode, but not in Release mode. The pass replaces IntegerBinOp with a function call to ASR functions (that the pass generates) such as add_checked(u32, u32) -> u32 which internally checks that the operation fits into u32, otherwise gives a runtime error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions