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: 3979fb9
Choose a base ref
...
head repository: golang/go
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9baddd3
Choose a head ref
  • 12 commits
  • 37 files changed
  • 9 contributors

Commits on Mar 12, 2021

  1. [release-branch.go1.16] runtime, time: disable preemption in addtimer

    The timerpMask optimization updates a mask of Ps (potentially)
    containing timers in pidleget / pidleput. For correctness, it depends on
    the assumption that new timers can only be added to a P's own heap.
    
    addtimer violates this assumption if it is preempted after computing pp.
    That G may then run on a different P, but adding a timer to the original
    P's heap.
    
    Avoid this by disabling preemption while pp is in use.
    
    Other uses of doaddtimer should be OK:
    
    * moveTimers: always moves to the current P's heap
    * modtimer, cleantimers, addAdjustedTimers, runtimer: does not add net
      new timers to the heap while locked
    
    For #44868
    Fixes #44869
    
    Change-Id: I4a5d080865e854931d0a3a09a51ca36879101d72
    Reviewed-on: https://go-review.googlesource.com/c/go/+/300610
    Trust: Michael Pratt <[email protected]>
    Run-TryBot: Michael Pratt <[email protected]>
    Reviewed-by: Michael Knyszek <[email protected]>
    Reviewed-by: Ian Lance Taylor <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    (cherry picked from commit aa26687)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/300611
    prattmic authored and toothrot committed Mar 12, 2021
    3 Configuration menu
    Copy the full SHA
    0da04a6 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.16] cmd/go: fix godoc formatting for text from 'g…

    …o help install'
    
    Fixes #44860
    
    Change-Id: I5a12c6437a91ce59307483ffcc70e084edc32197
    Reviewed-on: https://go-review.googlesource.com/c/go/+/301329
    Trust: Jay Conrod <[email protected]>
    Run-TryBot: Jay Conrod <[email protected]>
    Reviewed-by: Bryan C. Mills <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    (cherry picked from commit 86bbf4b)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/301429
    Jay Conrod authored and dmitshur committed Mar 12, 2021
    Configuration menu
    Copy the full SHA
    f39c4de View commit details
    Browse the repository at this point in the history

Commits on Mar 24, 2021

  1. [release-branch.go1.16] testing: update helperNames just before check…

    …ing it
    
    parent's helperNames has not been set when frameSkip called, moving
    helperNames initilazing to frameSkip.
    
    For #44887
    Fixes #44888
    
    Change-Id: I5107c5951033e5e47d1ac441eac3ba5344a7bdc0
    GitHub-Last-Rev: 44b90b2
    GitHub-Pull-Request: #45071
    Reviewed-on: https://go-review.googlesource.com/c/go/+/302469
    Trust: Cherry Zhang <[email protected]>
    Reviewed-by: Ian Lance Taylor <[email protected]>
    Run-TryBot: Ian Lance Taylor <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    (cherry picked from commit 6704843)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/303189
    Trust: Ian Lance Taylor <[email protected]>
    Reviewed-by: Emmanuel Odeke <[email protected]>
    qingyunha authored and ianlancetaylor committed Mar 24, 2021
    Configuration menu
    Copy the full SHA
    902d16e View commit details
    Browse the repository at this point in the history

Commits on Mar 25, 2021

  1. [release-branch.go1.16] cmd/go/internal/modfetch: detect and recover …

    …from missing ziphash file
    
    Previously, if an extracted module directory existed in the module
    cache, but the corresponding ziphash file did not, if the sum was
    missing from go.sum, we would not verify the sum. This caused 'go get'
    not to write missing sums. 'go build' in readonly mode (now the
    default) checks for missing sums and doesn't attempt to fetch modules
    that can't be verified against go.sum.
    
    With this change, when requesting the module directory with
    modfetch.DownloadDir, if the ziphash file is missing, the go command
    will re-hash the zip without downloading or re-extracting it again.
    
    Note that the go command creates the ziphash file before the module
    directory, but another program could remove it separately, and it
    might not be present after a crash.
    
    Fixes #44812
    
    Change-Id: I64551e048a3ba17d069de1ec123d5b8b2757543c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/298352
    Trust: Jay Conrod <[email protected]>
    Run-TryBot: Jay Conrod <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Bryan C. Mills <[email protected]>
    (cherry picked from commit 302a400)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/298851
    Jay Conrod authored and toothrot committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    33fb479 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.16] cmd/compile, cmd/link: dynamically export wri…

    …table static tmps
    
    Static tmps are private to a package, but with plugins a package
    can be shared among multiple DSOs. They need to have a consistent
    view of the static tmps, especially for writable ones. So export
    them. (Read-only static tmps have the same values anyway, so it
    doesn't matter. Also Mach-O doesn't support dynamically exporting
    read-only symbols anyway.)
    
    Updates #44956.
    Fixes #45030.
    
    Change-Id: I921e25b7ab73cd5d5347800eccdb7931e3448779
    Reviewed-on: https://go-review.googlesource.com/c/go/+/301793
    Trust: Cherry Zhang <[email protected]>
    Run-TryBot: Cherry Zhang <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Than McIntosh <[email protected]>
    (cherry picked from commit de012bc095359e1b552d4ea6fb6b2995f3ab04f5)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/302449
    cherrymui authored and toothrot committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    ac59d7a View commit details
    Browse the repository at this point in the history
  3. [release-branch.go1.16] cmd/link: generate trampoline for inter-depen…

    …dent packages
    
    Currently, in the trampoline generation pass we expect packages
    are laid out in dependency order, so a cross-package jump always
    has a known target address so we can check if a trampoline is
    needed. With linknames, there can be cycles in the package
    dependency graph, making this algorithm no longer work. For them,
    as the target address is unkown we conservatively generate a
    trampoline. This may generate unnecessary trampolines (if the
    packages turn out laid together), but package cycles are extremely
    rare so this is fine.
    
    Updates #44639.
    Fixes #44640.
    
    Change-Id: I2dc2998edacbda27d726fc79452313a21d07787a
    Reviewed-on: https://go-review.googlesource.com/c/go/+/292490
    Trust: Cherry Zhang <[email protected]>
    Reviewed-by: Than McIntosh <[email protected]>
    (cherry picked from commit 098504c)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/296909
    Run-TryBot: Cherry Zhang <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    cherrymui authored and toothrot committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    9c7463c View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2021

  1. [release-branch.go1.16] build: set GOPATH consistently in run.bash, r…

    …un.bat, run.rc
    
    We used to clear GOPATH in all the build scripts.
    Clearing GOPATH is misleading at best, since you just end up
    with the default GOPATH (%USERPROFILE%\go on Windows).
    Unless that's your GOROOT, in which case you end up with a
    fatal error from the go command (#43938).
    
    run.bash changed to setting GOPATH=/dev/null, which has no
    clear analogue on Windows.
    
    run.rc still clears GOPATH.
    
    Change them all to set GOPATH to a non-existent directory
    /nonexist-gopath or c:\nonexist-gopath.
    
    For #45238.
    Fixes #45240.
    
    Change-Id: I51edd66d37ff6a891b0d0541d91ecba97fbbb03d
    Reviewed-on: https://go-review.googlesource.com/c/go/+/288818
    Trust: Russ Cox <[email protected]>
    Trust: Jason A. Donenfeld <[email protected]>
    Reviewed-by: Cherry Zhang <[email protected]>
    Reviewed-by: Alex Brainman <[email protected]>
    Reviewed-by: Jason A. Donenfeld <[email protected]>
    (cherry picked from commit bb6efb9)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/304772
    Run-TryBot: Dmitri Shuralyov <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Alexander Rakoczy <[email protected]>
    Reviewed-by: Carlos Amedee <[email protected]>
    Trust: Carlos Amedee <[email protected]>
    rsc authored and dmitshur committed Mar 29, 2021
    Configuration menu
    Copy the full SHA
    1d967ab View commit details
    Browse the repository at this point in the history

Commits on Mar 31, 2021

  1. [release-branch.go1.16] cmd/go: allow '+' in package import paths in …

    …module mode
    
    This change upgrades x/mod to pull in the fix from CL 300152.
    
    Updates #44776.
    Fixes #44885.
    
    Change-Id: I273f41df2abfff76d91315b7f19fce851c8770d8
    Reviewed-on: https://go-review.googlesource.com/c/go/+/300176
    Trust: Bryan C. Mills <[email protected]>
    Run-TryBot: Bryan C. Mills <[email protected]>
    Reviewed-by: Jay Conrod <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    (cherry picked from commit d33e219)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/300153
    Bryan C. Mills authored and dr2chase committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    2940614 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.16] cmd/compile: disable shortcircuit optimizatio…

    …n for intertwined phi values
    
    We need to be careful that when doing value graph surgery, we not
    re-substitute a value that has already been substituted. That can lead
    to confusing a previous iteration's value with the current iteration's
    value.
    
    The simple fix in this CL just aborts the optimization if it detects
    intertwined phis (a phi which is the argument to another phi). It
    might be possible to keep the optimization with a more complicated
    CL, but:
      1) This CL is clearly safe to backport.
      2) There were no instances of this abort triggering in
         all.bash, prior to the test introduced in this CL.
    
    Fixes #45192
    
    Change-Id: I2411dca03948653c053291f6829a76bec0c32330
    Reviewed-on: https://go-review.googlesource.com/c/go/+/304251
    Trust: Keith Randall <[email protected]>
    Trust: Josh Bleecher Snyder <[email protected]>
    Run-TryBot: Keith Randall <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Josh Bleecher Snyder <[email protected]>
    (cherry picked from commit 771c57e)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/304530
    randall77 authored and dr2chase committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    3a45c13 View commit details
    Browse the repository at this point in the history
  3. [release-branch.go1.16] runtime: non-strict InlTreeIndex lookup in Fr…

    …ames.Next
    
    When using cgo, some of the frames can be provided by cgoTraceback, a
    cgo-provided function to generate C tracebacks. Unlike Go tracebacks,
    cgoTraceback has no particular guarantees that it produces valid
    tracebacks.
    
    If one of the (invalid) frames happens to put the PC in the alignment
    region at the end of a function (filled with int 3's on amd64), then
    Frames.Next will find a valid funcInfo for the PC, but pcdatavalue will
    panic because PCDATA doesn't cover this PC.
    
    Tolerate this case by doing a non-strict PCDATA lookup. We'll still show
    a bogus frame, but at least avoid throwing.
    
    For #44971
    Fixes #45303
    
    Change-Id: I9eed728470d6f264179a7615bd19845c941db78c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/301369
    Trust: Michael Pratt <[email protected]>
    Run-TryBot: Michael Pratt <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Cherry Zhang <[email protected]>
    (cherry picked from commit e4a4161)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/305889
    prattmic authored and dr2chase committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    887c0d8 View commit details
    Browse the repository at this point in the history
  4. [release-branch.go1.16] cmd/compile: fix long RMW bit operations on A…

    …MD64
    
    Under certain circumstances, the existing rules for bit operations can
    produce code that writes beyond its intended bounds. For example,
    consider the following code:
    
        func repro(b []byte, addr, bit int32) {
    	    _ = b[3]
    	    v := uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 | uint32(b[3])<<24 | 1<<(bit&31)
    	    b[0] = byte(v)
    	    b[1] = byte(v >> 8)
    	    b[2] = byte(v >> 16)
    	    b[3] = byte(v >> 24)
        }
    
    Roughly speaking:
    
    1. The expression `1 << (bit & 31)` is rewritten into `(SHLL 1 bit)`
    2. The expression `uint32(b[0]) | uint32(b[1])<<8 | uint32(b[2])<<16 |
       uint32(b[3])<<24` is rewritten into `(MOVLload &b[0])`
    3. The statements `b[0] = byte(v) ... b[3] = byte(v >> 24)` are
       rewritten into `(MOVLstore &b[0], v)`
    4. `(ORL (SHLL 1, bit) (MOVLload &b[0]))` is rewritten into
       `(BTSL (MOVLload &b[0]) bit)`. This is a valid transformation because
       the destination is a register: in this case, the bit offset is masked
       by the number of bits in the destination register. This is identical
       to the masking performed by `SHL`.
    5. `(MOVLstore &b[0] (BTSL (MOVLload &b[0]) bit))` is rewritten into
       `(BTSLmodify &b[0] bit)`. This is an invalid transformation because
       the destination is memory: in this case, the bit offset is not
       masked, and the chosen instruction may write outside its intended
       32-bit location.
    
    These changes fix the invalid rewrite performed in step (5) by
    explicitly maksing the bit offset operand to `BT(S|R|C)(L|Q)modify`. In
    the example above, the adjusted rules produce
    `(BTSLmodify &b[0] (ANDLconst [31] bit))` in step (5).
    
    These changes also add several new rules to rewrite bit sets, toggles,
    and clears that are rooted at `(OR|XOR|AND)(L|Q)modify` operators into
    appropriate `BT(S|R|C)(L|Q)modify` operators. These rules catch cases
    where `MOV(L|Q)store ((OR|XOR|AND)(L|Q) ...)` is rewritten to
    `(OR|XOR|AND)(L|Q)modify` before the `(OR|XOR|AND)(L|Q) ...` can be
    rewritten to `BT(S|R|C)(L|Q) ...`.
    
    Overall, compilecmp reports small improvements in code size on
    darwin/amd64 when the changes to the compiler itself are exlcuded:
    
    file                               before   after    Δ       %
    runtime.s                          536464   536412   -52     -0.010%
    bytes.s                            32629    32593    -36     -0.110%
    strings.s                          44565    44529    -36     -0.081%
    os/signal.s                        7967     7959     -8      -0.100%
    cmd/vendor/golang.org/x/sys/unix.s 81686    81678    -8      -0.010%
    math/big.s                         188235   188253   +18     +0.010%
    cmd/link/internal/loader.s         89295    89056    -239    -0.268%
    cmd/link/internal/ld.s             633551   633232   -319    -0.050%
    cmd/link/internal/arm.s            18934    18928    -6      -0.032%
    cmd/link/internal/arm64.s          31814    31801    -13     -0.041%
    cmd/link/internal/riscv64.s        7347     7345     -2      -0.027%
    cmd/compile/internal/ssa.s         4029173  4033066  +3893   +0.097%
    total                              21298280 21301472 +3192   +0.015%
    
    Fixes #45253
    
    Change-Id: I2e560548b515865129e1724e150e30540e9d29ce
    GitHub-Last-Rev: ab94ede
    GitHub-Pull-Request: #45242
    Reviewed-on: https://go-review.googlesource.com/c/go/+/305069
    Trust: Emmanuel Odeke <[email protected]>
    Run-TryBot: Emmanuel Odeke <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    Reviewed-by: Keith Randall <[email protected]>
    pgavlin authored and dr2chase committed Mar 31, 2021
    Configuration menu
    Copy the full SHA
    96139f2 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. [release-branch.go1.16] go1.16.3

    Change-Id: Iace7cfec757a6d0bac25f729be5ecb2ae3b59d74
    Reviewed-on: https://go-review.googlesource.com/c/go/+/306569
    Run-TryBot: Dmitri Shuralyov <[email protected]>
    Run-TryBot: Carlos Amedee <[email protected]>
    Reviewed-by: Dmitri Shuralyov <[email protected]>
    Reviewed-by: David Chase <[email protected]>
    TryBot-Result: Go Bot <[email protected]>
    dmitshur authored and dr2chase committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    9baddd3 View commit details
    Browse the repository at this point in the history
Loading