quic: fix race condition in fast-path reads Receiving resent data for a stream could cause racy access to the fast-path input buffer, when the resent data overwrote the input buffer (with identical data). Add a mutex guarding the fast-path input buffer. This is not necessary to avoid this race, but makes racing calls to Stream.Read safe (so far as the race detector is concerned, at least). Avoid rewriting portions of the input buffer which might be accessed by the fast-path. For #78737 Change-Id: I1cb086e3590e6854935b7c655d1573e16a6a6964 Reviewed-on: https://go-review.googlesource.com/c/net/+/766941 Reviewed-by: Nicholas Husin <nsh@golang.org> Auto-Submit: Damien Neil <dneil@google.com> Reviewed-by: Nicholas Husin <husin@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This repository holds supplementary Go networking packages.
This repository uses Gerrit for code changes. To learn how to submit changes to this repository, see https://go.dev/doc/contribute.
The git repository is https://go.googlesource.com/net.
The main issue tracker for the net repository is located at https://go.dev/issues. Prefix your issue with “x/net:” in the subject line, so it is easy to find.