Skip to content

Comments

Experimental changes to envelope serialization#2102

Merged
jeremydmiller merged 1 commit intomainfrom
envelope-serialization
Feb 6, 2026
Merged

Experimental changes to envelope serialization#2102
jeremydmiller merged 1 commit intomainfrom
envelope-serialization

Conversation

@jeremydmiller
Copy link
Member

No description provided.

@jeremydmiller jeremydmiller marked this pull request as draft February 3, 2026 22:31
@jeremydmiller jeremydmiller added this to the 5.15 milestone Feb 4, 2026
@jeremydmiller jeremydmiller marked this pull request as ready for review February 6, 2026 00:32
@jeremydmiller jeremydmiller merged commit d36a4b8 into main Feb 6, 2026
1 check passed
catch (NotSupportedException)
{
// Buffer was too small, fall back to expandable stream
ReturnBuffer(buffer);
Copy link
Contributor

@jorik jorik Feb 6, 2026

Choose a reason for hiding this comment

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

I was looking at the code, and saw you're returning the buffer twice @jeremydmiller. Once here in the catched exception, and then again in the finally

This will return the same buffer twice to the pool, causing future Rent() calls to return the same array to 2 different callers, which can cause some nasty issues

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