[pull] master from golang:master - #201
Merged
Merged
Conversation
Sum vector elements to a scalar, for float32 and float64 Change-Id: Ic6661e61eccee26122a39aadbaa473552291cd15 Reviewed-on: https://go-review.googlesource.com/c/go/+/827424 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Junyang Shao <shaojunyang@google.com>
Correct outdated file paths in comments to match current codebase. Change-Id: Ie7b73c893b2221c62d25f47e74eac1dbe798d9e3 GitHub-Last-Rev: 222fac9 GitHub-Pull-Request: #81053 Reviewed-on: https://go-review.googlesource.com/c/go/+/820140 Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@google.com>
In mergePAX, paxUid and paxGid records are parsed as int64 via strconv.ParseInt, but are subsequently cast directly to platform-native int without bounds checking. On 32-bit platforms, values >= 2^32 silently truncate (e.g. uid=4294967296 truncates to 0) or wrap to negative numbers. This change verifies that the parsed int64 fits within [math.MinInt, math.MaxInt] and returns ErrHeader if out of bounds. Fixes #81129 Change-Id: I1fa7ded5b7a1c9255050cabc0a835cd25d0800c0 GitHub-Last-Rev: 302b4f0 GitHub-Pull-Request: #81130 Reviewed-on: https://go-review.googlesource.com/c/go/+/822060 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> Auto-Submit: Michael Pratt <mpratt@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Log2 combines Log(frac) with the exponent returned by Frexp. Near 1, this cancels most significant digits. For x = 1+2^-52, the relative error is 4.0% on amd64 and 14.9% on arm64. Use Log1p(x-1) for x in [0.5, 2). The subtraction is exact in this range. Exact powers of two and special cases are unchanged. Measured on darwin/arm64: worst error 9.6e14 ulp -> 1.31 ulp over 13442 arguments. Benchmarks on an M3: [0.25, 7500] 5.45ns/op -> 5.61ns/op, [1, 1.001] 5.50ns/op -> 4.43ns/op. Fixes #81121 Change-Id: Iadc25fc568885fa5a81990499c923e8f5a4f9a0e Reviewed-on: https://go-review.googlesource.com/c/go/+/827084 Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Auto-Submit: Michael Pratt <mpratt@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Encode currently counts every rune >= U+10000 as requiring two
UTF-16 code units during preallocation.
However, runes above U+10FFFF are invalid and are encoded as a
single U+FFFD. Restrict the extra allocation to valid supplementary
code points in the range U+10000 through U+10FFFF.
This does not change the encoded output. It only avoids unnecessary
allocation for invalid input.
Benchmark results on darwin/arm64 with an Apple M4, using a mixed
input containing valid and invalid runes:
old time/op new time/op delta
EncodeMixedRunes-10 22.22ns ± 2% 18.91ns ± 1% -14.92%
old alloc/op new alloc/op delta
EncodeMixedRunes-10 32.00B ± 0% 24.00B ± 0% -25.00%
old allocs/op new allocs/op delta
EncodeMixedRunes-10 1.000 ± 0% 1.000 ± 0% ~
Change-Id: I363469e3f798d5d7988ae86476dbdc9dabe23ab3
Reviewed-on: https://go-review.googlesource.com/c/go/+/819461
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Rob Pike <r@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Also rename the struct member now that its type makes it obvious that it is to be accessed atomically. Change-Id: I6f9bc71a2f6bd44c5a471235e500ab95e2f3e5fd Reviewed-on: https://go-review.googlesource.com/c/go/+/826324 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Nicholas Husin <husin@google.com> Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com> Reviewed-by: Nicholas Husin <nsh@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
…ppers CL 751465 updated the compiler to use tail calls for embedded interface wrappers, but the underlying interface calls were not marked as used. As a result, the linker incorrectly drops the callee via DCE, triggering an unreachable method runtime panic. This change fixes the issue by marking the interface calls as used when walking tail call nodes. Fixes #81089 Fixes #81340 Change-Id: I3d433b645f95179698c4b739c89a4e9a2c908604 Reviewed-on: https://go-review.googlesource.com/c/go/+/827624 Auto-Submit: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Michael Pratt <mpratt@google.com>
A Conn's rawInput buffer grows to the maximum record size (~17 kB after receiving full-sized records) and, being a bytes.Buffer, never shrinks. A connection blocked in Read waiting for a new record, often for minutes or hours on long-polling or mostly idle connections, pinned that memory the whole time. Servers with millions of open TLS connections strand gigabytes of heap in buffers holding no data. The hand buffer similarly retained the peer's largest handshake flight for the life of the connection. Instead, return an empty grown rawInput buffer to a sync.Pool before blocking to wait for a new record, mirroring outBufPool on the write side. The record header is read into a small per-connection buffer, and readFromUntil switches back to a pooled record-sized buffer only once the header arrives and the payload length is known. The hand buffer is likewise pooled: it is returned once the handshake completes and after buffered post-handshake messages are consumed. Measured with 1000 idle TLS 1.3 server connections that had each received 16 kB records before blocking in a 4-byte Read (heap bytes per connection, runtime.MemProfileRate=1): HeapAlloc/conn: 23020 B -> 4468 B HeapInuse/conn: 25509 B -> 5726 B The remainder is mostly the AES-GCM cipher states (~1.8 kB), the Conn struct itself (~1 kB), and the small header buffer (~0.6 kB). Throughput is unchanged within noise (geomean +0.4%): benchstat of -bench=Throughput -count=6: no change in 17 of 28 cases, worst case +1.2%, best case -1.8%. Pooling the hand buffer also drops an allocation and ~1% of bytes per server handshake (geomean of -bench=HandshakeServer -benchmem). Fixes #47672 Updates #81348 Change-Id: Idb6f9361d888977a2d655fb2d57da0fa61f61ca5 Reviewed-on: https://go-review.googlesource.com/c/go/+/827524 LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Roland Shoemaker <roland@golang.org> Reviewed-by: Daniel McCarney <daniel@binaryparadox.net> Reviewed-by: Michael Pratt <mpratt@google.com>
In Go 1.26, MarshalText methods were never called on named string map keys, while it is called after the switch to using the v2 implementation. Adjust the legacy compatibility layer to preserve historical behavior. Fixes #81355 Change-Id: I0bcc85da4bf933acebd7e2736d0f820c62f2201d Reviewed-on: https://go-review.googlesource.com/c/go/+/827864 Auto-Submit: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Damien Neil <dneil@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )