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.5
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.6
Choose a head ref
  • 7 commits
  • 16 files changed
  • 7 contributors

Commits on Jul 10, 2025

  1. [release-branch.go1.24] runtime: stash allpSnapshot on the M

    findRunnable takes a snapshot of allp prior to dropping the P because
    afterwards procresize may mutate allp without synchronization.
    procresize is careful to never mutate the contents up to cap(allp), so
    findRunnable can still safely access the Ps in the slice.
    
    Unfortunately, growing allp is problematic. If procresize grows the allp
    backing array, it drops the reference to the old array. allpSnapshot
    still refers to the old array, but allpSnapshot is on the system stack
    in findRunnable, which also likely no longer has a P at all.
    
    This means that a future GC will not find the reference and can free the
    array and use it for another allocation. This would corrupt later reads
    that findRunnable does from the array.
    
    The fix is simple: the M struct itself is reachable by the GC, so we can
    stash the snapshot in the M to ensure it is visible to the GC.
    
    The ugliest part of the CL is the cleanup when we are done with the
    snapshot because there are so many return/goto top sites. I am tempted
    to put mp.clearAllpSnapshot() in the caller and at top to make this less
    error prone, at the expensive of extra unnecessary writes.
    
    For #74414.
    For #74416.
    
    Change-Id: I6a6a636c484e4f4b34794fd07910b3fffeca830b
    Reviewed-on: https://go-review.googlesource.com/c/go/+/684460
    Reviewed-by: Cherry Mui <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Michael Pratt <[email protected]>
    (cherry picked from commit 740857f)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/685056
    prattmic authored and cagedmantis committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    b454859 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.24] runtime: prevent unnecessary zeroing of large…

    … objects with pointers
    
    CL 614257 refactored mallocgc but lost an optimization: if a span for a
    large object is already backed by memory fresh from the OS (and thus
    zeroed), we don't need to zero it. CL 614257 unconditionally zeroed
    spans for large objects that contain pointers.
    
    This change restores the optimization from before CL 614257, which seems
    to matter in some real-world programs.
    
    While we're here, let's also fix a hole with the garbage collector being
    able to observe uninitialized memory of the large object is observed
    by the conservative scanner before being published. The gory details are
    in a comment in heapSetTypeLarge. In short, this change makes
    span.largeType an atomic variable, such that the GC can only observe
    initialized memory if span.largeType != nil.
    
    For #72991.
    Fixes #73800.
    
    Change-Id: I2048aeb220ab363d252ffda7d980b8788e9674dc
    Reviewed-on: https://go-review.googlesource.com/c/go/+/659956
    Reviewed-by: Keith Randall <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Keith Randall <[email protected]>
    Reviewed-by: Felix Geisendörfer <[email protected]>
    (cherry picked from commit df9888e)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/682356
    mknyszek authored and cagedmantis committed Jul 10, 2025
    Configuration menu
    Copy the full SHA
    390ffce View commit details
    Browse the repository at this point in the history

Commits on Jul 30, 2025

  1. [release-branch.go1.24] os/user: user random name for the test user a…

    …ccount
    
    TestImpersonated and TestGroupIdsTestUser are flaky due to sporadic
    failures when creating the test user account when running the tests
    from different processes at the same time.
    
    This flakiness can be fixed by using a random name for the test user
    account.
    
    For #73523.
    Fixes #74760.
    
    Cq-Include-Trybots: luci.golang.try:go1.24-windows-amd64-longtest
    Change-Id: Ib2283a888437420502b1c11d876c975f5af4bc03
    Reviewed-on: https://go-review.googlesource.com/c/go/+/690175
    Auto-Submit: Quim Muntal <[email protected]>
    Reviewed-by: Michael Pratt <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    TryBot-Bypass: Dmitri Shuralyov <[email protected]>
    (cherry picked from commit 374e3be)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/690556
    Reviewed-by: Mark Freeman <[email protected]>
    Reviewed-by: Quim Muntal <[email protected]>
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Dmitri Shuralyov <[email protected]>
    qmuntal authored and gopherbot committed Jul 30, 2025
    Configuration menu
    Copy the full SHA
    731de13 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.24] cmd/compile: for arm64 epilog, do SP incremen…

    …t with a single instruction
    
    That way, the frame is atomically popped. Previously, for big frames
    the SP was unwound in two steps (because arm64 can only add constants
    up to 1<<12 in a single instruction).
    
    Fixes #74694
    
    Change-Id: I382c249194ad7bc9fc19607c27487c58d90d49e5
    Reviewed-on: https://go-review.googlesource.com/c/go/+/689235
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Reviewed-by: Michael Pratt <[email protected]>
    Reviewed-by: Keith Randall <[email protected]>
    (cherry picked from commit f7cc61e)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/689596
    randall77 authored and Mark Freeman committed Jul 30, 2025
    Configuration menu
    Copy the full SHA
    6e1c452 View commit details
    Browse the repository at this point in the history
  3. [release-branch.go1.24] os/exec: fix incorrect expansion of "", "." a…

    …nd ".." in LookPath
    
    Fix incorrect expansion of "" and "." when $PATH contains an executable
    file or, on Windows, a parent directory of a %PATH% element contains an
    file with the same name as the %PATH% element but with one of the
    %PATHEXT% extension (ex: C:\utils\bin is in PATH, and C:\utils\bin.exe
    exists).
    
    Fix incorrect expansion of ".." when $PATH contains an element which is
    an the concatenation of the path to an executable file (or on Windows
    a path that can be expanded to an executable by appending a %PATHEXT%
    extension), a path separator and a name.
    
    "", "." and ".." are now rejected early with ErrNotFound.
    
    Fixes CVE-2025-47906
    Fixes #74804
    
    Change-Id: Ie50cc0a660fce8fbdc952a7f2e05c36062dcb50e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/685755
    LUCI-TryBot-Result: Go LUCI <[email protected]>
    Auto-Submit: Damien Neil <[email protected]>
    Reviewed-by: Roland Shoemaker <[email protected]>
    Reviewed-by: Damien Neil <[email protected]>
    (cherry picked from commit e0b07dc)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/691875
    Reviewed-by: Michael Knyszek <[email protected]>
    dolmen authored and Mark Freeman committed Jul 30, 2025
    Configuration menu
    Copy the full SHA
    0f5133b View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2025

  1. [release-branch.go1.24] database/sql: avoid closing Rows while scan i…

    …s in progress
    
    A database/sql/driver.Rows can return database-owned data
    from Rows.Next. The driver.Rows documentation doesn't explicitly
    document the lifetime guarantees for this data, but a reasonable
    expectation is that the caller of Next should only access it
    until the next call to Rows.Close or Rows.Next.
    
    Avoid violating that constraint when a query is cancelled while
    a call to database/sql.Rows.Scan (note the difference between
    the two different Rows types!) is in progress. We previously
    took care to avoid closing a driver.Rows while the user has
    access to driver-owned memory via a RawData, but we could still
    close a driver.Rows while a Scan call was in the process of
    reading previously-returned driver-owned data.
    
    Update the fake DB used in database/sql tests to invalidate
    returned data to help catch other places we might be
    incorrectly retaining it.
    
    Updates #74831
    Fixes #74833
    
    Change-Id: Ice45b5fad51b679c38e3e1d21ef39156b56d6037
    Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2540
    Reviewed-by: Roland Shoemaker <[email protected]>
    Reviewed-by: Neal Patel <[email protected]>
    Reviewed-on: https://go-internal-review.googlesource.com/c/go/+/2620
    Reviewed-on: https://go-review.googlesource.com/c/go/+/693616
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Auto-Submit: Dmitri Shuralyov <[email protected]>
    TryBot-Bypass: Dmitri Shuralyov <[email protected]>
    Reviewed-by: Mark Freeman <[email protected]>
    neild authored and gopherbot committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    83b4a5d View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.24] go1.24.6

    Change-Id: I01fc50fa6e6ea1bd93cbbd17885a8934bf97b223
    Reviewed-on: https://go-review.googlesource.com/c/go/+/693715
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Auto-Submit: Gopher Robot <[email protected]>
    TryBot-Bypass: Gopher Robot <[email protected]>
    Reviewed-by: Mark Freeman <[email protected]>
    gopherbot committed Aug 6, 2025
    Configuration menu
    Copy the full SHA
    7f36edc View commit details
    Browse the repository at this point in the history
Loading