googlefonts / googlefonts/fontations

More systematic way to identify overflow

Open
#1,287 0 comments 0 reactions 1 assignee Claimed by @dfrg View on GitHub
correctness enhancement ergonomics
Dominant language
Rust
Stars
827
Forks
76
Avg merge
22h 33m
Merged PRs (30d)
75

Description

Due to Chrome enabling overflow checks (https://doc.rust-lang.org/book/ch03-02-data-types.html#integer-overflow) we end up fighting overflow issues, most recently #1286.

We don't want to check the entire codebase for potential overflow, we want a targeted check. The overflow lint is apparently ill suited for the task because we cannot tell it that e.g. Fixed doesn't overflow.

So ... what can we do?

One idea might be to do a targeted scan of MIR? - https://blog.rust-lang.org/2016/04/19/MIR.html

Other ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.