Skip to content

Feature Request: Consider activating Rust integer overflow protection in release builds #1306

@johnsaigle

Description

@johnsaigle

Feature Request: Consider activating Rust integer overflow protection in release builds

The Cargo.toml does not enable overflow checks in release builds, meaning that integer underflow or overflow will wrap instead of causing panics.

It looks like the node code uses checked math in most cases but it's safer to do this as a policy in release builds rather than to rely only on catching individual cases, especially as the codebase changes over time.

https://doc.rust-lang.org/cargo/reference/profiles.html#overflow-checks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions