Skip to content

Check that slice are in the reserved space in Accumulator push and shift#6302

Merged
Amxx merged 8 commits intoOpenZeppelin:masterfrom
Amxx:check-slice-validity-in-Accumulator
Feb 12, 2026
Merged

Check that slice are in the reserved space in Accumulator push and shift#6302
Amxx merged 8 commits intoOpenZeppelin:masterfrom
Amxx:check-slice-validity-in-Accumulator

Conversation

@Amxx
Copy link
Collaborator

@Amxx Amxx commented Jan 19, 2026

No description provided.

@Amxx Amxx added this to the 5.6 milestone Jan 19, 2026
@Amxx Amxx requested a review from a team as a code owner January 19, 2026 16:44
@changeset-bot
Copy link

changeset-bot bot commented Jan 19, 2026

🦋 Changeset detected

Latest commit: eba8954

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openzeppelin-solidity Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 19, 2026

Walkthrough

The pull request introduces memory reservation validation to the OpenZeppelin Solidity library. Two changeset entries document a minor version bump. A new internal function isReserved(Slice) is added to the Memory utility module to check whether a memory slice is within reserved space. The Accumulators struct operations (push and shift) are updated with runtime guards that validate memory slice reservation, triggering a resource error panic if validation fails. Panic.sol is imported to support error handling. No changes to public function signatures or data structures are made.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess whether the description relates to the changeset. Add a description explaining the purpose of the changes, such as why slice validation is necessary and what problems it prevents.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding validation to check that slices are in reserved space during Accumulator push and shift operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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

@Amxx Amxx requested a review from ernestognw January 19, 2026 17:04
Copy link
Member

@ernestognw ernestognw left a comment

Choose a reason for hiding this comment

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

Looks good

ernestognw
ernestognw previously approved these changes Feb 11, 2026
@Amxx Amxx force-pushed the check-slice-validity-in-Accumulator branch from f6db7a0 to 47379be Compare February 11, 2026 17:50
@Amxx
Copy link
Collaborator Author

Amxx commented Feb 11, 2026

Rebased.

Note: coverage issue is a false positive.

@Amxx Amxx merged commit 9e6fa29 into OpenZeppelin:master Feb 12, 2026
20 of 21 checks passed
@Amxx Amxx deleted the check-slice-validity-in-Accumulator branch February 12, 2026 15:14
Amxx added a commit that referenced this pull request Feb 12, 2026
…ift (#6302)

Co-authored-by: ernestognw <ernestognw@gmail.com>
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
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.

2 participants