Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: golang/go
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: go1.24.1
Choose a base ref
...
head repository: golang/go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: go1.24.2
Choose a head ref
  • 18 commits
  • 45 files changed
  • 12 contributors

Commits on Mar 4, 2025

  1. [release-branch.go1.24] all: updates vendored x/net

    This is to update module version to the fixed x/net.
    
    For #71984
    
    Change-Id: I7d50e302e8ba7d3ee28df2669fc16f19c12cf088
    Reviewed-on: https://go-review.googlesource.com/c/go/+/654795
    Reviewed-by: Michael Pratt <mpratt@google.com>
    Auto-Submit: Junyang Shao <shaojunyang@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    JunyangShao authored and gopherbot committed Mar 4, 2025
    Copy the full SHA
    e4119e9 View commit details

Commits on Mar 5, 2025

  1. [release-branch.go1.24] cmd/compile: fix out of memory when inlining …

    …closure
    
    CL 629195 strongly favor closure inlining, allowing closures to be
    inlined more aggressively.
    
    However, if the closure body contains a call to a function, which itself
    is one of the call arguments, it causes the infinite inlining.
    
    Fixing this by prevent this kind of functions from being inlinable.
    
    Fixes #72067
    
    Change-Id: I5fb5723a819b1e2c5aadb57c1023ec84ca9fa53c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/654195
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/654517
    Commit-Queue: Junyang Shao <shaojunyang@google.com>
    Auto-Submit: Junyang Shao <shaojunyang@google.com>
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    Reviewed-by: Jorropo <jorropo.pgm@gmail.com>
    cuonglm authored and gopherbot committed Mar 5, 2025
    Copy the full SHA
    0ace2d8 View commit details

Commits on Mar 12, 2025

  1. [release-branch.go1.24] cmd/compile: use inline-Pos-based recursion test

    Look at the inlining stack of positions for a call site,
    if the line/col/file of the call site appears in that
    stack, do not inline.  This subsumes all the other
    recently-added recursive inlining checks, but they are
    left in to make this easier+safer to backport.
    
    Fixes #72822
    
    Change-Id: I0f487bb0d4c514015907c649312672b7be464abd
    Reviewed-on: https://go-review.googlesource.com/c/go/+/655155
    Reviewed-by: Keith Randall <khr@golang.org>
    Reviewed-by: Keith Randall <khr@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
    (cherry picked from commit cad4dca)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657075
    dr2chase committed Mar 12, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    c2a34be View commit details

Commits on Mar 17, 2025

  1. [release-branch.go1.24] crypto/tls: allow P-521 in FIPS 140-3 mode an…

    …d Go+BoringCrypto
    
    Partially reverts CL 587296, restoring the Go+BoringCrypto 1.23 behavior
    in terms of supported curves.
    
    Updates #71757
    Fixes #72823
    
    Change-Id: I6a6a465651a8407056fd0fae091d10a945b37997
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657135
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Roland Shoemaker <roland@golang.org>
    Reviewed-by: Daniel McCarney <daniel@binaryparadox.net>
    Reviewed-by: David Chase <drchase@google.com>
    FiloSottile authored and cherrymui committed Mar 17, 2025
    Copy the full SHA
    bd1bc8a View commit details
  2. [release-branch.go1.24] runtime: Added usage example for the runtime.…

    …AddCleanup() function.
    
    The existing description of the function lacks usage examples, which makes it difficult to understand, so I added one.
    
    There is no open issue about this, since the implementation seems trivial.
    
    For #72795
    Fixes #72796
    
    Change-Id: I96b29f0b21d1c7fda04128239633c8a2fc36fef2
    Reviewed-on: https://go-review.googlesource.com/c/go/+/649995
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Carlos Amedee <carlos@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 4c75671)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/656815
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    streamdp authored and cherrymui committed Mar 17, 2025
    Copy the full SHA
    4524009 View commit details
  3. [release-branch.go1.24] net/http: don't modify caller's tls.Config.Ne…

    …xtProtos
    
    Clone the input slice before adjusting NextProtos
    to add or remove "http/1.1" and "h2" entries,
    so as not to modify a slice that the caller might be using.
    (We clone the tls.Config that contains the slice, but
    that's a shallow clone.)
    
    For #72100
    Fixes #72103
    
    Change-Id: I9f228b8fb6f6f2ca5023179ec114929c002dbda9
    Reviewed-on: https://go-review.googlesource.com/c/go/+/654875
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
    Auto-Submit: Damien Neil <dneil@google.com>
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657215
    neild authored and cherrymui committed Mar 17, 2025
    Copy the full SHA
    fd29397 View commit details

Commits on Mar 18, 2025

  1. [release-branch.go1.24] net/http: reject newlines in chunk-size lines

    Unlike request headers, where we are allowed to leniently accept
    a bare LF in place of a CRLF, chunked bodies must always use CRLF
    line terminators. We were already enforcing this for chunk-data lines;
    do so for chunk-size lines as well. Also reject bare CRs anywhere
    other than as part of the CRLF terminator.
    
    Fixes CVE-2025-22871
    Fixes #72011
    For #71988
    
    Change-Id: Ib0e21af5a8ba28c2a1ca52b72af8e2265ec79e4a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/652998
    Reviewed-by: Jonathan Amsterdam <jba@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit d31c805)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657056
    neild authored and cherrymui committed Mar 18, 2025
    Copy the full SHA
    ac1f5aa View commit details

Commits on Mar 24, 2025

  1. [release-branch.go1.24] internal/godebugs: fix changed version for wi…

    …nsymlink and winreadlinkvolume to 1.23
    
    https://go.dev/doc/godebug#go-123 documents changes to winsymlink and
    winreadlinkvolume in Go 1.23.
    
    This fixes the registered "changed" minor version to Go 1.23,
    so that defaults when building a Go 1.22 module are correct.
    
    Fixes #72938
    
    Change-Id: I5d5bf31ca04f9e95208fb0fdaad2232f9db653ff
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659035
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    (cherry picked from commit 2e749a6)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659036
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
    liggitt authored and gopherbot committed Mar 24, 2025
    Copy the full SHA
    213f156 View commit details

Commits on Mar 25, 2025

  1. [release-branch.go1.24] testing: allow manual timer control in testin…

    …g.B.Loop
    
    Fixes #72934
    
    Change-Id: I56610d2d11d151a8f95b6434bbedbfcd5c11c317
    Reviewed-on: https://go-review.googlesource.com/c/go/+/658975
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Commit-Queue: Junyang Shao <shaojunyang@google.com>
    Reviewed-by: Austin Clements <austin@google.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/660555
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    JunyangShao authored and gopherbot committed Mar 25, 2025
    Copy the full SHA
    d107ee9 View commit details
  2. [release-branch.go1.24] go/types,types2: externalize used objects

    The 'used' field on Var and PkgName is fundamentally an aspect of the
    type checking pass: it records when objects are used, for the purposes
    of reporting errors for unused variables or package names. While
    expedient and performant, recording this information in the types.Object
    instances themselves increases the memory footprint of type-checked
    packages, and (as we saw in #71817) can lead to data races when
    Objects are reused in follow-up type checking, such as is done with the
    CheckExpr and Eval APIs.
    
    Fix this by externalizing the 'used' information into two maps (one for
    variables and one for packages) on the types.Checker, so that they are
    garbage-collected after type checking, and cannot be a source of data
    races.
    
    Benchmarks showed essentially no change in performance.
    
    For #72826
    
    Change-Id: I40daeabe4ecaca3bcb494e2f1c62a04232098e49
    Reviewed-on: https://go-review.googlesource.com/c/go/+/650796
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Robert Findley <rfindley@google.com>
    Reviewed-by: Robert Griesemer <gri@google.com>
    (cherry picked from commit 9189921)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657675
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    findleyr authored and gopherbot committed Mar 25, 2025
    Copy the full SHA
    e9162e7 View commit details
  3. [release-branch.go1.24] go/types,types2: allocate the used* maps in i…

    …nitFiles
    
    As described in the associated comment, we need to reallocate usedVars
    and usedPkgNames in initFiles, as they are nilled out at the end of
    Checker.Files, which may be called multiple times.
    
    For #72122
    For #72826
    
    Change-Id: I9f6eb86e072d9d43a8720f6a5e86d827de6006a9
    Reviewed-on: https://go-review.googlesource.com/c/go/+/655437
    Auto-Submit: Robert Findley <rfindley@google.com>
    Reviewed-by: Robert Griesemer <gri@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Alan Donovan <adonovan@google.com>
    (cherry picked from commit fe9b292)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/657695
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    TryBot-Bypass: Dmitri Shuralyov <dmitshur@google.com>
    findleyr authored and gopherbot committed Mar 25, 2025
    Copy the full SHA
    311096a View commit details
  4. [release-branch.go1.24] runtime: only set isExtraInC if there are no …

    …Go frames left
    
    mp.isExtraInC is intended to indicate that this M has no Go frames at
    all; it is entirely executing in C.
    
    If there was a cgocallback to Go and then a cgocall to C, such that the
    leaf frames are C, that is fine. e.g., traceback can handle this fine
    with SetCgoTraceback (or by simply skipping the C frames).
    
    However, we currently mismanage isExtraInC, unconditionally setting it
    on return from cgocallback. This means that if there are two levels of
    cgocallback, we end up running Go code with isExtraInC set.
    
    1. C-created thread calls into Go function 1 (via cgocallback).
    2. Go function 1 calls into C function 1 (via cgocall).
    3. C function 1 calls into Go function 2 (via cgocallback).
    4. Go function 2 returns back to C function 1 (returning via the remainder of cgocallback).
    5. C function 1 returns back to Go function 1 (returning via the remainder of cgocall).
    6. Go function 1 is now running with mp.isExtraInC == true.
    
    The fix is simple; only set isExtraInC on return from cgocallback if
    there are no more Go frames. There can't be more Go frames unless there
    is an active cgocall out of the Go frames.
    
    For #72870.
    Fixes #72872.
    
    Cq-Include-Trybots: luci.golang.try:go1.24-linux-amd64-longtest
    Change-Id: I6a6a636c4e7ba75a29639d7036c5af3738033467
    Reviewed-on: https://go-review.googlesource.com/c/go/+/658035
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    Commit-Queue: Michael Pratt <mpratt@google.com>
    Auto-Submit: Michael Pratt <mpratt@google.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 577bb3d)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/658056
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    prattmic authored and gopherbot committed Mar 25, 2025
    Copy the full SHA
    b7fd97a View commit details
  5. [release-branch.go1.24] runtime: skip TestCgoCallbackPprof on platfor…

    …ms with broken profiling
    
    CL 658035 added TestCgoCallbackPprof, which is consistently failing on
    solaris. runtime/pprof maintains a list of platforms where CPU profiling
    does not work properly. Since this test requires CPU profiling, skip the
    this test on those platforms.
    
    For #72870.
    For #72876.
    For #72872.
    
    Change-Id: I6a6a636cbf6b16abcbba8771178fe1d001be9d9b
    Reviewed-on: https://go-review.googlesource.com/c/go/+/658415
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Michael Pratt <mpratt@google.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/658416
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    prattmic authored and gopherbot committed Mar 25, 2025
    Copy the full SHA
    dae59b5 View commit details

Commits on Mar 26, 2025

  1. [release-branch.go1.24] runtime: explicitly disable async preempt for…

    … internal/runtime
    
    Fixes #72115
    For #71591
    Relevant CL 560155
    
    Change-Id: Iebc497d56b36d50c13a6dd88e7bca4578a03cf63
    Reviewed-on: https://go-review.googlesource.com/c/go/+/654916
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    Auto-Submit: Michael Pratt <mpratt@google.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    (cherry picked from commit 92a63bd)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/660857
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    panjf2000 authored and gopherbot committed Mar 26, 2025
    Copy the full SHA
    0ae3ca0 View commit details
  2. [release-branch.go1.24] testing: separate b.Loop counter from b.N

    Currently, b.Loop uses b.N as the iteration count target. However,
    since it updates the target as it goes, the behavior is quite
    different from a b.N-style benchmark. To avoid user confusion, this CL
    gives b.Loop a separate, unexported iteration count target. It ensures
    b.N is 0 within the b.Loop loop to help catch misuses, and commits the
    final iteration count to b.N only once the loop is done (as the
    documentation states "After Loop returns false, b.N contains the total
    number of iterations that ran, so the benchmark may use b.N to compute
    other average metrics.")
    
    Since there are now two variables used by b.Loop, we put them in an
    unnamed struct. Also, we rename b.loopN to b.loop.i because this
    variable tracks the current iteration index (conventionally "i"), not
    the target (conventionally "n").
    
    Unfortunately, a simple renaming causes B.Loop to be too large for the
    inliner. Thus, we make one simplification to B.Loop to keep it under
    the threshold. We're about to lean into that simplification anyway in
    a follow-up CL, so this is just temporary.
    
    For #72974.
    
    Change-Id: Ide1c4f1b9ca37f300f3beb0e60ba6202331b183e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659655
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    Auto-Submit: Austin Clements <austin@google.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/660556
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    aclements authored and gopherbot committed Mar 26, 2025
    Copy the full SHA
    9204aca View commit details
  3. [release-branch.go1.24] testing: detect early return from B.Loop

    Currently, if a benchmark function returns prior to B.Loop() returning
    false, we'll report a bogus result. While there was no way to detect
    this with b.N-style benchmarks, one way b.Loop()-style benchmarks are
    more robust is that we *can* detect it.
    
    This CL adds a flag to B that tracks if B.Loop() has finished and
    checks it after the benchmark completes. If there was an early exit
    (not caused by another error), it reports a B.Error.
    
    For #72974.
    
    Change-Id: I731c1350e6df938c0ffa08fcedc11dc147e78854
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659656
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Austin Clements <austin@google.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/660557
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    aclements authored and gopherbot committed Mar 26, 2025
    Copy the full SHA
    1d755aa View commit details
  4. [release-branch.go1.24] testing: detect a stopped timer in B.Loop

    Currently, if the user stops the timer in a B.Loop benchmark loop, the
    benchmark will run until it hits the timeout and fails.
    
    Fix this by detecting that the timer is stopped and failing the
    benchmark right away. We avoid making the fast path more expensive for
    this check by "poisoning" the B.Loop iteration counter when the timer
    is stopped so that it falls back to the slow path, which can check the
    timer.
    
    This causes b to escape from B.Loop, which is totally harmless because
    it was already definitely heap-allocated. But it causes the
    test/inline_testingbloop.go errorcheck test to fail. I don't think the
    escape messages actually mattered to that test, they just had to be
    matched. To fix this, we drop the debug level to -m=1, since -m=2
    prints a lot of extra information for escaping parameters that we
    don't want to deal with, and change one error check to allow b to
    escape.
    
    Fixes #72974.
    
    Change-Id: I7d4abbb1ec1e096685514536f91ba0d581cca6b7
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659657
    Auto-Submit: Austin Clements <austin@google.com>
    Reviewed-by: Junyang Shao <shaojunyang@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/660558
    Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
    aclements authored and gopherbot committed Mar 26, 2025
    Copy the full SHA
    f3a3023 View commit details

Commits on Apr 1, 2025

  1. [release-branch.go1.24] go1.24.2

    Change-Id: I8e6c68d7fff0519e2bdbc48f6dbf153bc40c02cb
    Reviewed-on: https://go-review.googlesource.com/c/go/+/661916
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Auto-Submit: Gopher Robot <gobot@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    gopherbot committed Apr 1, 2025
    Copy the full SHA
    49860cf View commit details
Loading