Skip to content

Use checked arithmetic by default #9469

Closed
@brson

Description

@brson

There's a lot of concern that having +, -, and * overflow by default is incorrect - it's a source of many security vulnerabilities. Let's try changing the default to being checked and measure the impact on performance and code size.

There are some open questions:

  • what happens on overflow? Probably fail!. It could also raise a condition, but having codegen raise conditions is a big step to take, and we're not sure we like conditions.
  • how do you turn it off? Either with unchecked blocks, explicit methods, or additional types.

Nominating well defined.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-codegenArea: Code generation

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions