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

transport: Fix double release instances of {in,out}goingMsg #583

Merged
merged 3 commits into from
Aug 14, 2024

Conversation

matheusd
Copy link
Contributor

  • transport: Prove double release is occurring
  • transport: Fix double release of incoming message
  • transport: Track outoingMsg release status

This adds a panic on attempts to double release of a message. This might
bubble up to a double release of an Arena, which is a misuse of the
Arena contract.

Adding this panic causes some tests to fail. This will be fixed in a
future commit.
This fixes the double release panic introduced in the prior commit. The
panic was only introduced to prove that double release is possible happening.

Note: In my (matheusd) opinion, Release() calls should panic or error in
case of double release so that callers are fixed and they themselves do
not rely on this protection. This is suggested as a future change
because it potentially breaks clients that were relying on this
protection.
This was not correctly tracked.
@lthibault lthibault merged commit 5f525fa into capnproto:main Aug 14, 2024
0 of 4 checks passed
@matheusd matheusd deleted the fix-transport-double-release branch August 15, 2024 10:30
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