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

Some test and general fixes #588

Merged
merged 4 commits into from
Aug 20, 2024
Merged

Some test and general fixes #588

merged 4 commits into from
Aug 20, 2024

Commits on Aug 15, 2024

  1. tests: Fix reuse of SingleSegmentArena

    The arena was reused when it shouldn't after a Release() call.
    matheusd committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    1eb7143 View commit details
    Browse the repository at this point in the history
  2. transport: Remove double Release call from test

    In the future, it would be ideal if wrongful Release() calls could be
    flagged (either through an error or panic).
    matheusd committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    e5b07cb View commit details
    Browse the repository at this point in the history
  3. transport: Test for released messages earlier

    This moves the check for released messages earlier in the Release() call
    for transport messages. This prevents triggering the race detector, due
    to the check happening before an attempt is made at accessing the
    message (which involves indirection through a segment that may have been
    released already).
    
    While the prior code would not have actually caused a fault in current
    code (because the conditional checks both for the released flag and
    whether the message is nil), checking by the release flag first is
    more correct and may prevent future bugs.
    matheusd committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    0a32436 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. codec: Enforce NumSegments limit

    Previously this was not enforced by the Encode function. While this
    limit is unlikely to be hit in practice, it's important to assert it due
    to the type allowing it and a count of segments greater than 2^32
    causing an invalid marshaling.
    matheusd committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    cf2a39a View commit details
    Browse the repository at this point in the history