Skip to content

Enable overflow-checks in release profile - #2203

Open
SashaMIT wants to merge 1 commit into
velocity-exchange:masterfrom
SashaMIT:fix/release-enable-overflow-checks
Open

Enable overflow-checks in release profile#2203
SashaMIT wants to merge 1 commit into
velocity-exchange:masterfrom
SashaMIT:fix/release-enable-overflow-checks

Conversation

@SashaMIT

@SashaMIT SashaMIT commented Aug 5, 2026

Copy link
Copy Markdown

Summary

  • Sets overflow-checks = true under workspace [profile.release] so release builds catch integer overflow instead of wrapping by default.
  • Secure-default / hardening only — no program logic changes.

Context

Amber-authorized hardening note. Already coordinated via hello@drift.trade; opening this small PR so the release profile matches common Solana program secure defaults.

Test plan

  • Confirm tip Cargo.toml [profile.release] includes overflow-checks = true
  • cargo check / usual release build still succeeds for workspace members

Made with Cursor

Summary by CodeRabbit

  • Bug Fixes
    • Added overflow checks to release builds to help detect arithmetic errors and improve runtime reliability.

Hardening secure-default for workspace release builds so arithmetic wraps are caught at runtime rather than silently wrapping. Coordinated privately with hello@drift.trade.
@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 21110225-3555-431e-8bba-eb2ad9858a89

📥 Commits

Reviewing files that changed from the base of the PR and between 13e8e9b and 74c5f80.

📒 Files selected for processing (1)
  • Cargo.toml

Walkthrough

The change updates Cargo.toml to enable runtime integer overflow checks in the release profile.

Changes

Release overflow checks

Layer / File(s) Summary
Release profile overflow check setting
Cargo.toml
The release profile now enables runtime integer overflow checks.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Poem

Little rabbit checked the sum,
In release mode, safe checks now run.
No overflow hops past the gate,
The build stays strict, the math stays straight.
🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the main change: enabling overflow checks in the release profile.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant