Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly construct Region to uphold deallocation safety invariant (backport #2062) #2073

Merged
merged 7 commits into from
Mar 26, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Mar 26, 2024

Closes #2061

To cite from the comments of the patch:

Shrinking the buffer down to the length is important to uphold a safety invariant by the dealloc method.
Passing in a differing size into the dealloc layout is considered undefined behaviour.

See: https://doc.rust-lang.org/stable/alloc/alloc/trait.GlobalAlloc.html#safety-2


This is an automatic backport of pull request #2062 done by [Mergify](https://mergify.com).

aumetra added 6 commits March 26, 2024 15:17
(cherry picked from commit c688732)
Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
(cherry picked from commit 666e709)
(cherry picked from commit 682c5af)
(cherry picked from commit e0f963d)

# Conflicts:
#	CHANGELOG.md
@mergify mergify bot added the conflicts label Mar 26, 2024
Copy link
Contributor Author

mergify bot commented Mar 26, 2024

Cherry-pick of e0f963d has failed:

On branch mergify/bp/release/2.0/pr-2062
Your branch is ahead of 'origin/release/2.0' by 5 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit e0f963d78.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   CHANGELOG.md

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@aumetra aumetra merged commit a771622 into release/2.0 Mar 26, 2024
29 checks passed
@aumetra aumetra deleted the mergify/bp/release/2.0/pr-2062 branch March 26, 2024 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant