Skip to content

A timeout while calling NpgsqlReader.Read can re-read from the buffer #3212

Closed

Description

@vonzshik

If there was a timeout here

{
var oversizeBuffer = ReadBuffer.AllocateOversize(len);
if (_origReadBuffer == null)
_origReadBuffer = ReadBuffer;
else
ReadBuffer.Dispose();
ReadBuffer = oversizeBuffer;
}
await ReadBuffer.Ensure(len, async, cancellationToken);

we would re-read from the buffer, which leads to an undefined behavior.

Activity

  1. changed the title [-]Timeout while calling NpgsqlReader.Read can re-read from the buffer[/-] [+]A timeout while calling NpgsqlReader.Read can re-read from the buffer[/+] on Oct 4, 2020
  2. added this to the 5.0.0 milestone on Oct 4, 2020
  3. removed this from the 5.0.0 milestone on Oct 22, 2020
  4. added theissue type on Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions