-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
crypto/rand: Read argument escapes to heap #66779
Comments
I' ve been investigating this once, and the remaining problem was that the
will always cause the buffer passed to |
But i guess we can make the |
Change https://go.dev/cl/578516 mentions this issue: |
Change https://go.dev/cl/602498 mentions this issue: |
Updates golang#66779 Change-Id: Iaa3eda4309bb1e8c28136dd048479e7269f4c189
Change https://go.dev/cl/616696 mentions this issue: |
Updates #66779 Updates #69577 Change-Id: I0dea5a30aab87aaa443e7e6646c1d07aa865ac1c GitHub-Last-Rev: 1cea46d GitHub-Pull-Request: #69719 Reviewed-on: https://go-review.googlesource.com/c/go/+/616696 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Commit-Queue: Ian Lance Taylor <iant@google.com> Reviewed-by: Filippo Valsorda <filippo@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com>
Change https://go.dev/cl/618275 mentions this issue: |
Without optimizations escape analysis can't do as much. Updates #66779 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt Change-Id: I9ccd1b995c62427ceebd9ce5c98170dbf4a93e8b Reviewed-on: https://go-review.googlesource.com/c/go/+/618275 Reviewed-by: Roland Shoemaker <roland@golang.org> Auto-Submit: Filippo Valsorda <filippo@golang.org> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Currently, Read is implemented as
io.ReadFull(Reader, b)
which escape analysis can't track, so b escapes to the heap.This is somewhat annoying, since it causes allocations in paths that could otherwise have none.
It should be possible to rewrite the package so that it doesn't escape on major platforms.
The text was updated successfully, but these errors were encountered: