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.23.2
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.23.3
Choose a head ref
  • 15 commits
  • 25 files changed
  • 11 contributors

Commits on Oct 2, 2024

  1. [release-branch.go1.23] runtime: fix TestGdbAutotmpTypes on gdb versi…

    …on 15
    
    On Arch Linux with gdb version 15.1, the test for TestGdbAutotmpTypes print
    the following output,
    
    ----
    ~/src/go/src/runtime
    $ go test -run=TestGdbAutotmpTypes -v
    === RUN   TestGdbAutotmpTypes
    === PAUSE TestGdbAutotmpTypes
    === CONT  TestGdbAutotmpTypes
        runtime-gdb_test.go:78: gdb version 15.1
        runtime-gdb_test.go:570: gdb output:
            Loading Go Runtime support.
            Target 'exec' cannot support this command.
            Breakpoint 1 at 0x46e416: file /tmp/TestGdbAutotmpTypes750485513/001/main.go, line 8.
    
            This GDB supports auto-downloading debuginfo from the following URLs:
              <https://debuginfod.archlinux.org>
            Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal]
            Debuginfod has been disabled.
            To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit.
            [New LWP 355373]
            [New LWP 355374]
            [New LWP 355375]
            [New LWP 355376]
    
            Thread 1 "a.exe" hit Breakpoint 1, main.main () at /tmp/TestGdbAutotmpTypes750485513/001/main.go:8
            8       func main() {
            9               var iface interface{} = map[string]astruct{}
            All types matching regular expression "astruct":
    
            File runtime:
                    []main.astruct
                    bucket<string,main.astruct>
                    hash<string,main.astruct>
                    main.astruct
                    typedef hash<string,main.astruct> * map[string]main.astruct;
                    typedef noalg.[8]main.astruct noalg.[8]main.astruct;
                    noalg.map.bucket[string]main.astruct
        runtime-gdb_test.go:587: could not find []main.astruct; in 'info typrs astruct' output
    !!! FAIL
    exit status 1
    FAIL    runtime 0.273s
    $
    ----
    
    In the back trace for "File runtime", each output lines does not end with
    ";" anymore, while in test we check the string with it.
    
    While at it, print the expected string with "%q" instead of "%s" for
    better error message.
    
    For #67089
    Fixes #69746
    
    Change-Id: If6019ee68c0d8e495c920f98568741462c7d0fd0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/598135
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Meng Zhuo <mengzhuo1203@gmail.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    (cherry picked from commit ff695ca)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/617455
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    shuLhan authored and gopherbot committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    f8080ed View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.23] os: ignore SIGSYS in checkPidfd

    In Android version 11 and earlier, pidfd-related system calls
    are not allowed by the seccomp policy, which causes crashes due
    to SIGSYS signals.
    
    For #69065
    Fixes #69640
    
    Change-Id: Ib29631639a5cf221ac11b4d82390cb79436b8657
    GitHub-Last-Rev: aad6b3b
    GitHub-Pull-Request: #69543
    Reviewed-on: https://go-review.googlesource.com/c/go/+/614277
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    (cherry picked from commit a3a05ed)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/616077
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: Kirill Kolyshkin <kolyshkin@gmail.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    cions authored and gopherbot committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    9563300 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2024

  1. [release-branch.go1.23] runtime: clear isSending bit earlier

    I've done some more testing of the new isSending field.
    I'm not able to get more than 2 bits set. That said,
    with this change it's significantly less likely to have even
    2 bits set. The idea here is to clear the bit before possibly
    locking the channel we are sending the value on, thus avoiding
    some delay and some serialization.
    
    For #69312
    For #69333
    
    Change-Id: I8b5f167f162bbcbcbf7ea47305967f349b62b0f4
    Reviewed-on: https://go-review.googlesource.com/c/go/+/617596
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Commit-Queue: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    ianlancetaylor authored and gopherbot committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    cc16cdf View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2024

  1. [release-branch.go1.23] os: add clone(CLONE_PIDFD) check to pidfd fea…

    …ture check
    
    clone(CLONE_PIDFD) was added in Linux 5.2 and pidfd_open was added in
    Linux 5.3. Thus our feature check for pidfd_open should be sufficient to
    ensure that clone(CLONE_PIDFD) works.
    
    Unfortuantely, some alternative Linux implementations may not follow
    this strict ordering. For example, QEMU 7.2 (Dec 2022) added pidfd_open,
    but clone(CLONE_PIDFD) was only added in QEMU 8.0 (Apr 2023).
    
    Debian bookworm provides QEMU 7.2 by default.
    
    For #68976.
    Fixes #69259.
    
    Change-Id: Ie3f3dc51f0cd76944871bf98690abf59f68fd7bf
    Reviewed-on: https://go-review.googlesource.com/c/go/+/592078
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    (cherry picked from commit 7a5fc9b)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/612218
    prattmic authored and cherrymui committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    7fc8312 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.23] syscall: use SYS_EXIT_GROUP in CLONE_PIDFD fe…

    …ature check child
    
    Inside Google we have seen issues with QEMU user mode failing to wake a
    parent waitid when this child exits with SYS_EXIT. This bug appears to
    not affect SYS_EXIT_GROUP.
    
    It is currently unclear if this is a general QEMU or specific to
    Google's configuration, but SYS_EXIT and SYS_EXIT_GROUP are semantically
    equivalent here, so we can use the latter here in case this is a general
    QEMU bug.
    
    For #68976.
    For #69259.
    
    Change-Id: I34e51088c9a6b7493a060e2a719a3cc4a3d54aa0
    Reviewed-on: https://go-review.googlesource.com/c/go/+/617417
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 47a9935)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/617716
    prattmic authored and cherrymui committed Oct 11, 2024
    Configuration menu
    Copy the full SHA
    6495ce0 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2024

  1. [release-branch.go1.23] runtime: fix GoroutineProfile stacks not gett…

    …ing null terminated
    
    Fix a regression introduced in CL 572396 causing goroutine stacks not
    getting null terminated.
    
    This bug impacts callers that reuse the []StackRecord slice for multiple
    calls to GoroutineProfile. See felixge/fgprof#33
    for an example of the problem.
    
    Add a test case to prevent similar regressions in the future. Use null
    padding instead of null termination to be consistent with other profile
    types and because it's less code to implement. Also fix the
    ThreadCreateProfile code path.
    
    Fixes #69258
    
    Change-Id: I0b9414f6c694c304bc03a5682586f619e9bf0588
    Reviewed-on: https://go-review.googlesource.com/c/go/+/609815
    Reviewed-by: Tim King <taking@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    (cherry picked from commit 49e542a)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/621277
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    felixge authored and prattmic committed Oct 21, 2024
    Configuration menu
    Copy the full SHA
    35c010a View commit details
    Browse the repository at this point in the history

Commits on Oct 23, 2024

  1. [release-branch.go1.23] runtime: don't frob isSending for tickers

    The Ticker Stop and Reset methods don't report a value,
    so we don't need to track whether they are interrupting a send.
    
    This includes a test that used to fail about 2% of the time on
    my laptop when run under x/tools/cmd/stress.
    
    For #69880
    Fixes #69882
    
    Change-Id: Ic6d14b344594149dd3c24b37bbe4e42e83f9a9ad
    Reviewed-on: https://go-review.googlesource.com/c/go/+/620136
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    (cherry picked from commit 48849e0)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/620137
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    ianlancetaylor authored and gopherbot committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    8d79bf7 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2024

  1. [release-branch.go1.23] runtime,time: use atomic.Int32 for isSending

    This change switches isSending to be an atomic.Int32 instead of an
    atomic.Uint8. The Int32 version is managed as a counter, which is
    something that we couldn't do with Uint8 without adding a new intrinsic
    which may not be available on all architectures.
    
    That is, instead of only being able to support 8 concurrent timer
    firings on the same timer because we only have 8 independent bits to set
    for each concurrent timer firing, we can now have 2^31-1 concurrent
    timer firings before running into any issues. Like the fact that each
    bit-set was matched with a clear, here we match increments with
    decrements to indicate that we're in the "sending on a channel" critical
    section in the timer code, so we can report the correct result back on
    Stop or Reset.
    
    We choose an Int32 instead of a Uint32 because it's easier to check for
    obviously bad values (negative values are always bad) and 2^31-1
    concurrent timer firings should be enough for anyone.
    
    Previously, we avoided anything bigger than a Uint8 because we could
    pack it into some padding in the runtime.timer struct. But it turns out
    that the type that actually matters, runtime.timeTimer, is exactly 96
    bytes in size. This means its in the next size class up in the 112 byte
    size class because of an allocation header. We thus have some free space
    to work with. This change increases the size of this struct from 96
    bytes to 104 bytes.
    
    (I'm not sure if runtime.timer is often allocated directly, but if it
    is, we get lucky in the same way too. It's exactly 80 bytes in size,
    which means its in the 96-byte size class, leaving us with some space to
    work with.)
    
    Fixes #69978
    For #69969.
    Related to #69880 and #69312 and #69882.
    
    Change-Id: I9fd59cb6a69365c62971d1f225490a65c58f3e77
    Cq-Include-Trybots: luci.golang.try:go1.23-linux-amd64-longtest
    Reviewed-on: https://go-review.googlesource.com/c/go/+/621616
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 6a49f81)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/621856
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    mknyszek authored and gopherbot committed Oct 25, 2024
    Configuration menu
    Copy the full SHA
    58babf6 View commit details
    Browse the repository at this point in the history

Commits on Oct 30, 2024

  1. [release-branch.go1.23] runtime: uphold goroutine profile invariants …

    …in coroswitch
    
    Goroutine profiles require checking in with the profiler before any
    goroutine starts running. coroswitch is a place where a goroutine may
    start running, but where we do not check in with the profiler, which
    leads to crashes. Fix this by checking in with the profiler the same way
    execute does.
    
    For #69998.
    Fixes #70001.
    
    Change-Id: Idef6dd31b70a73dd1c967b56c307c7a46a26ba73
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622016
    Reviewed-by: David Chase <drchase@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 2a98a18)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622375
    Reviewed-by: Michael Pratt <mpratt@google.com>
    mknyszek authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    cfe0ae0 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.23] cmd/link: generate Mach-O UUID when -B flag i…

    …s specified
    
    Currently, on Mach-O, the Go linker doesn't generate LC_UUID in
    internal linking mode. This causes some macOS system tools unable
    to track the binary, as well as in some cases the binary unable
    to access local network on macOS 15.
    
    This CL makes the linker start generate LC_UUID. Currently, the
    UUID is generated if the -B flag is specified. And we'll make it
    generate UUID by default in a later CL. The -B flag is currently
    for generating GNU build ID on ELF, which is a similar concept to
    Mach-O's UUID. Instead of introducing another flag, we just use
    the same flag and the same setting. Specifically, "-B gobuildid"
    will generate a UUID based on the Go build ID.
    
    Updates #68678.
    Fixes #69992.
    
    Cq-Include-Trybots: luci.golang.try:go1.23-darwin-amd64_14,go1.23-darwin-arm64_13
    Change-Id: I90089a78ba144110bf06c1c6836daf2d737ff10a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/618595
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: Ingo Oeser <nightlyone@googlemail.com>
    Reviewed-by: Than McIntosh <thanm@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit 20ed603)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622595
    Reviewed-by: Michael Pratt <mpratt@google.com>
    cherrymui authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    5472853 View commit details
    Browse the repository at this point in the history
  3. [release-branch.go1.23] internal/poll: keep copying after successful …

    …Sendfile return on BSD
    
    The BSD implementation of poll.SendFile incorrectly halted
    copying after succesfully writing one full chunk of data.
    Adjust the copy loop to match the Linux and Solaris
    implementations.
    
    In testing, empirically macOS appears to sometimes return
    EAGAIN from sendfile after successfully copying a full
    chunk. Add a check to all implementations to return nil
    after successfully copying all data if the last sendfile
    call returns EAGAIN.
    
    For #70000
    For #70020
    
    Change-Id: I57ba649491fc078c7330310b23e1cfd85135c8ff
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622235
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    (cherry picked from commit bd388c0)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622696
    neild authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    6ba3a8a View commit details
    Browse the repository at this point in the history
  4. [release-branch.go1.23] internal/poll: handle the special case of sen…

    …dfile(2) sending the full chunk
    
    CL 622235 would fix #70000 while resulting in one extra sendfile(2) system
    call when sendfile(2) returns (>0, EAGAIN).
    That's also why I left sendfile_bsd.go behind, and didn't make it line up
    with other two implementations: sendfile_linux.go and sendfile_solaris.go.
    
    Unlike sendfile(2)'s on Linux and Solaris that always return (0, EAGAIN),
    sendfile(2)'s on *BSD and macOS may return (>0, EAGAIN) when using a socket
    marked for non-blocking I/O. In that case, the current code will try to re-call
    sendfile(2) immediately, which will most likely get us a (0, EAGAIN).
    After that, it goes to `dstFD.pd.waitWrite(dstFD.isFile)` below,
    which should have been done in the first place.
    
    Thus, the real problem that leads to #70000 is that the old code doesn't handle
    the special case of sendfile(2) sending the exact number of bytes the caller requested.
    
    Fixes #70000
    Fixes #70020
    
    Change-Id: I6073d6b9feb58b3d7e114ec21e4e80d9727bca66
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622255
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Damien Neil <dneil@google.com>
    Run-TryBot: Andy Pan <panjf2000@gmail.com>
    Reviewed-on: https://go-review.googlesource.com/c/go/+/622697
    panjf2000 authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    958f3a0 View commit details
    Browse the repository at this point in the history
  5. [release-branch.go1.23] runtime: fix MutexProfile missing root frames

    Fix a regression introduced in CL 598515 causing runtime.MutexProfile
    stack traces to omit their root frames.
    
    In most cases this was merely causing the `runtime.goexit` frame to go
    missing. But in the case of runtime._LostContendedRuntimeLock, an empty
    stack trace was being produced.
    
    Add a test that catches this regression by checking for a stack trace
    with the `runtime.goexit` frame.
    
    Also fix a separate problem in expandFrame that could cause
    out-of-bounds panics when profstackdepth is set to a value below 32.
    There is no test for this fix because profstackdepth can't be changed at
    runtime right now.
    
    Fixes #69865
    
    Change-Id: I1600fe62548ea84981df0916d25072c3ddf1ea1a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/611615
    Reviewed-by: David Chase <drchase@google.com>
    Reviewed-by: Nick Ripley <nick.ripley@datadoghq.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    (cherry picked from commit c64ca8c)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/621276
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    felixge authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    a0d15cb View commit details
    Browse the repository at this point in the history
  6. [release-branch.go1.23] runtime: reduce syscall.SyscallX stack usage

    syscall.SyscallX consumes a lot of stack space, which is a problem
    because they are nosplit functions. They used to use less stack space,
    but CL 563315, that landed in Go 1.23, increased the stack usage by a
    lot.
    
    This CL reduces the stack usage back to the previous level.
    
    Fixes #69848
    Updates #69813
    
    Change-Id: Iddedd28b693c66a258da687389768055c493fc2e
    Reviewed-on: https://go-review.googlesource.com/c/go/+/618497
    Reviewed-by: Cherry Mui <cherryyz@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 fa7343a)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/623516
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    qmuntal authored and prattmic committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    1207de4 View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. [release-branch.go1.23] go1.23.3

    Change-Id: I065005a4a18f801d09ad3ebc886e90a6dd1df69a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/626137
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
    Auto-Submit: Gopher Robot <gobot@golang.org>
    Reviewed-by: David Chase <drchase@google.com>
    gopherbot committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    c390a1c View commit details
    Browse the repository at this point in the history
Loading