Skip to content

fix(cheatcodes): fix interval notation in memory error#14126

Merged
mattsse merged 2 commits intofoundry-rs:masterfrom
zeroprooff:fix/safe-memory-range-notation
Apr 4, 2026
Merged

fix(cheatcodes): fix interval notation in memory error#14126
mattsse merged 2 commits intofoundry-rs:masterfrom
zeroprooff:fix/safe-memory-range-notation

Conversation

@zeroprooff
Copy link
Copy Markdown
Contributor

Fix incorrect interval notation in disallowed_mem_write error message. Rust's Range<u64> is [start, end) (start included, end excluded), but the message showed (start, end] (opposite).

Before: safe range: (0x00, 0x20]
After: safe range: [0x00, 0x20)

Copy link
Copy Markdown
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the CLI golden output to match the corrected safe-memory interval notation. Focused verification: cargo test -p forge --test cli failure_assertions::mem_safety_test_should_fail -- --exact --nocapture

@mattsse mattsse merged commit 60f27c0 into foundry-rs:master Apr 4, 2026
15 checks passed
@github-project-automation github-project-automation Bot moved this to Done in Foundry Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants