Repository navigation
Release builds: turn on overflow checks - #22
Merged
LudaLunizz merged 1 commit intoNov 17, 2026
Merged
Conversation
Release builds wrap silently on integer overflow (rustc default), so an arithmetic bug shows up as a wrong number instead of a stop. The screen code does a lot of u16/usize arithmetic and casts. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
This was referenced Nov 17, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release builds wrap silently on integer overflow (the rustc default), so an arithmetic bug gives a wrong number instead of a stop. noname does a lot of
u16/usizearithmetic andascasts when it lays out the screen (about 18 casts inlib.rsalone).This adds
overflow-checks = trueto[profile.release](profile.distinherits it). It follows the rustc exploit-mitigations guidance and the ANSSI secure Rust guide.What it can change: a wrap that was silent before would now panic. Checked:
cargo build --release --locked,cargo test --release --locked(19 tests), and a headless pty run of the release build at 10 window sizes (1x1 up to 250x70) opening/noname, scrolling, typing and pressing Ctrl+C twice, with no panic. Binary size and speed: not measured.If you would rather not risk a panic where it used to wrap, this is easy to drop.
🤖 Generated with Claude Code