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.19.7
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.19.8
Choose a head ref
  • 16 commits
  • 35 files changed
  • 11 contributors

Commits on Mar 8, 2023

  1. [release-branch.go1.19] os/signal/internal/pty: fix error handling

    When calling a c library function, you discover that an error has
    occurred, typically by looking at the return value of the function. Only
    after that can you use errno to figure out the cause of the error.
    
    Nothing about cgo changes that story -- you still have to look at the
    result before checking the error that represents errno. If not you can
    get false errors if the function happens to leak a non-zero errno.
    
    Fix testpty to check errors correctly.
    
    Fixes #58941
    
    Change-Id: I4009e10b344e43fec291b941a63bcf4548937d44
    Reviewed-on: https://go-review.googlesource.com/c/go/+/474619
    Run-TryBot: Heschi Kreinick <heschi@google.com>
    Reviewed-by: Carlos Amedee <carlos@golang.org>
    Auto-Submit: Heschi Kreinick <heschi@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    heschi authored and gopherbot committed Mar 8, 2023
    Configuration menu
    Copy the full SHA
    20c96a7 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. [release-branch.go1.19] cmd/go: avoid running slow tests on non-longt…

    …est builders
    
    Also annotate calls to tooSlow with specific reasons.
    
    This will somewhat reduce test coverage on the 'darwin' builders until
    we have darwin 'longtest' builders (#35678,#49055), but still seems
    worthwhile to avoid alert fatigue from tests that really shouldn't be
    running in the short configurations.
    
    Updates #58918.
    Updates #58919.
    Fixes #58937.
    
    Change-Id: I0000f0084b262beeec3eca3e9b8a45d61fab4313
    Reviewed-on: https://go-review.googlesource.com/c/go/+/474137
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    Auto-Submit: Bryan Mills <bcmills@google.com>
    Run-TryBot: Bryan Mills <bcmills@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    (cherry picked from commit 9f532dd)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/474581
    Bryan C. Mills authored and cagedmantis committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    fbf4c04 View commit details
    Browse the repository at this point in the history

Commits on Mar 15, 2023

  1. [release-branch.go1.19] runtime/pprof: improve output of TestLabelSys…

    …temstack
    
    The current output of TestLabelSystemstack is a bit cryptic. This CL
    improves various messages and hopefully simplifies the logic in the
    test.
    
    Simplifying the logic leads to three changes in possible outcomes,
    which I verified by running the logic before and after this change
    through all 2^4 possibilities (https://go.dev/play/p/bnfb-OQCT4j):
    
    1. If a sample both must be labeled and must not be labeled, the test
    now reports that explicitly rather than giving other confusing output.
    
    2. If a sample must not be labeled but is, the current logic will
    print two identical error messages. The new logic prints only one.
    
    3. If the test finds no frames at all that it recognizes, but the
    sample is labeled, it will currently print a confusing "Sample labeled
    got true want false" message. The new logic prints nothing. We've seen
    this triggered by empty stacks in profiles.
    
    Fixes #51550. This bug was caused by case 3 above, where it was
    triggered by a profile label on an empty stack. It's valid for empty
    stacks to appear in a profile if we sample a goroutine just as it's
    exiting (and that goroutine may have a profile label), so the test
    shouldn't fail in this case.
    
    For #58939.
    
    Change-Id: I1593ec4ac33eced5bb89572a3ba7623e56f2fb3d
    Reviewed-on: https://go-review.googlesource.com/c/go/+/460516
    Run-TryBot: Austin Clements <austin@google.com>
    Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
    Reviewed-by: Michael Pratt <mpratt@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    (cherry picked from commit d9f23cf)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/474618
    Run-TryBot: Michael Pratt <mpratt@google.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    aclements authored and cherrymui committed Mar 15, 2023
    Configuration menu
    Copy the full SHA
    3a50af1 View commit details
    Browse the repository at this point in the history

Commits on Mar 17, 2023

  1. [release-branch.go1.19] cmd/go,cmd/link: prefer external linking when…

    … strange cgo flags seen
    
    This patch changes the Go command to examine the set of compiler
    flags feeding into the C compiler when packages that use cgo are built.
    If any of a specific set of strange/dangerous flags are in use,
    then the Go command generates a token file ("preferlinkext") and
    embeds it into the compiled package's archive.
    
    When the Go linker reads the archives of the packages feeding into the
    link and detects a "preferlinkext" token, it will then use external
    linking for the program by default (although this default can be
    overridden with an explicit "-linkmode" flag).
    
    The intent here is to avoid having to teach the Go linker's host object
    reader to grok/understand the various odd symbols/sections/types that
    can result from boutique flag use, but rather to just boot the objects
    in question over to the C linker instead.
    
    Fixes #59050.
    Updates #58619.
    Updates #58620.
    Updates #58848.
    
    Change-Id: I56382dd305de8dac3841a7a7e664277826061eaa
    Reviewed-on: https://go-review.googlesource.com/c/go/+/475375
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    Reviewed-by: Bryan Mills <bcmills@google.com>
    Run-TryBot: Than McIntosh <thanm@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    (cherry picked from commit 035db07)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/476576
    thanm authored and cherrymui committed Mar 17, 2023
    Configuration menu
    Copy the full SHA
    2094fd0 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. [release-branch.go1.19] cmd/link/internal/arm: fix off-by-1 in trampo…

    …line reachability computation
    
    Tweak the code in trampoline generation that determines if a given
    call branch will reach, changing the lower limit guard from "x <
    -0x800000" to "x <= -0x800000". This is to resolve linking failures
    when the computed displacement is exactly -0x800000, which results in
    errors of the form
    
      .../ld.gold: internal error in arm_branch_common, at ../../gold/arm.cc:4079
    
    when using the Gold linker, and
    
      ...:(.text+0x...): relocation truncated to fit: R_ARM_CALL against `runtime.morestack_noctxt'
    
    when using the bfd linker.
    
    Fixes #59058.
    Updates #59034.
    Updates #58425.
    
    Change-Id: I8a76986b38727df1b961654824c2af23f06b9fcf
    Reviewed-on: https://go-review.googlesource.com/c/go/+/475957
    Run-TryBot: Than McIntosh <thanm@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    (cherry picked from commit f26bf20)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/476935
    thanm authored and heschi committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    826fa3e View commit details
    Browse the repository at this point in the history

Commits on Mar 23, 2023

  1. [release-branch.go1.19] time: fix timezone lookup logic for non-DST z…

    …ones
    
    This change fixes time.LoadLocationFromTZData and time.Location.lookup logic if the given time is after the last transition and the extend string doesn't have the DST rule.
    
    For #58682
    Fixes #59074
    
    Change-Id: Ie34a6d658d14c2b33098b29ab83c041ef0d34266
    GitHub-Last-Rev: f6681eb
    GitHub-Pull-Request: #58684
    Reviewed-on: https://go-review.googlesource.com/c/go/+/471020
    Reviewed-by: Ian Lance Taylor <iant@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Auto-Submit: Ian Lance Taylor <iant@google.com>
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    Run-TryBot: Ian Lance Taylor <iant@golang.org>
    Run-TryBot: Ian Lance Taylor <iant@google.com>
    (cherry picked from commit 90dde5d)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/478657
    Reviewed-by: Heschi Kreinick <heschi@google.com>
    Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
    Auto-Submit: Heschi Kreinick <heschi@google.com>
    KimMachineGun authored and gopherbot committed Mar 23, 2023
    Configuration menu
    Copy the full SHA
    2adec52 View commit details
    Browse the repository at this point in the history

Commits on Mar 29, 2023

  1. [release-branch.go1.19] cmd/internal/obj/ppc64: fix incorrect base re…

    …g causing segv
    
    This fixes a segv that was reported due to building minio. The
    problem occurred because of an incorrect selection of the
    base register, which was introduced by CL 306369.
    
    Fixes #59219
    
    Change-Id: Ieb77b2afa8fb4e6f3943df5ce138679f6750d376
    Reviewed-on: https://go-review.googlesource.com/c/go/+/479628
    Reviewed-by: Cherry Mui <cherryyz@google.com>
    Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    laboger authored and mdempsky committed Mar 29, 2023
    Configuration menu
    Copy the full SHA
    6d9df0a View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. [release-branch.go1.19] cmd/compile: defer transitive inlining until …

    …after AST is edited
    
    This CL changes the inliner to process transitive inlining iteratively
    after the AST has actually been edited, rather than recursively and
    immediately. This is important for handling indirect function calls
    correctly, because ir.reassigned walks the function body looking for
    reassignments; whereas previously the inlined reassignments might not
    have been actually added to the AST yet.
    
    Fixes #59158.
    
    Change-Id: I0dd69813c8a70b965174e0072335bc00afedf286
    Reviewed-on: https://go-review.googlesource.com/c/go/+/425257
    Run-TryBot: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
    Reviewed-by: David Chase <drchase@google.com>
    (cherry picked from commit f983a93)
    Reviewed-on: https://go-review.googlesource.com/c/go/+/479629
    Reviewed-by: Heschi Kreinick <heschi@google.com>
    mdempsky authored and mknyszek committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    837b131 View commit details
    Browse the repository at this point in the history
  2. Revert "[release-branch.go1.19] cmd/compile: defer transitive inlinin…

    …g until after AST is edited"
    
    This reverts commit 837b131.
    
    Reason for revert: The branch is currently frozen for the release.
    
    Change-Id: I800e241b8676564ea893ae673d407b41e55f0473
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481796
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: David Chase <drchase@google.com>
    mknyszek authored and gopherbot committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    7a5787f View commit details
    Browse the repository at this point in the history

Commits on Apr 4, 2023

  1. [release-branch.go1.19] net/textproto: avoid overpredicting the numbe…

    …r of MIME header keys
    
    A parsed MIME header is a map[string][]string. In the common case,
    a header contains many one-element []string slices. To avoid
    allocating a separate slice for each key, ReadMIMEHeader looks
    ahead in the input to predict the number of keys that will be
    parsed, and allocates a single []string of that length.
    The individual slices are then allocated out of the larger one.
    
    The prediction of the number of header keys was done by counting
    newlines in the input buffer, which does not take into account
    header continuation lines (where a header key/value spans multiple
    lines) or the end of the header block and the start of the body.
    This could lead to a substantial amount of overallocation, for
    example when the body consists of nothing but a large block of
    newlines.
    
    Fix header key count prediction to take into account the end of
    the headers (indicated by a blank line) and continuation lines
    (starting with whitespace).
    
    Thanks to Jakob Ackermann (@das7pad) for reporting this issue.
    
    Fixes CVE-2023-24534
    For #58975
    Fixes #59267
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802452
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    (cherry picked from commit f739f080a72fd5b06d35c8e244165159645e2ed6)
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802393
    Reviewed-by: Damien Neil <dneil@google.com>
    Run-TryBot: Roland Shoemaker <bracewell@google.com>
    Change-Id: I675451438d619a9130360c56daf529559004903f
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481982
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    neild authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    d6759e7 View commit details
    Browse the repository at this point in the history
  2. [release-branch.go1.19] mime/multipart: avoid excessive copy buffer a…

    …llocations in ReadForm
    
    When copying form data to disk with io.Copy,
    allocate only one copy buffer and reuse it rather than
    creating two buffers per file (one from io.multiReader.WriteTo,
    and a second one from os.File.ReadFrom).
    
    Thanks to Jakob Ackermann (@das7pad) for reporting this issue.
    
    For CVE-2023-24536
    For #59153
    For #59269
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802453
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802395
    Run-TryBot: Roland Shoemaker <bracewell@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    Change-Id: Ie405470c92abffed3356913b37d813e982c96c8b
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481983
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    neild authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    ef41a4e View commit details
    Browse the repository at this point in the history
  3. [release-branch.go1.19] net/textproto, mime/multipart: improve accoun…

    …ting of non-file data
    
    For requests containing large numbers of small parts,
    memory consumption of a parsed form could be about 250%
    over the estimated size.
    
    When considering the size of parsed forms, account for the size of
    FileHeader structs and increase the estimate of memory consumed by
    map entries.
    
    Thanks to Jakob Ackermann (@das7pad) for reporting this issue.
    
    For CVE-2023-24536
    For #59153
    For #59269
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802454
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802396
    Run-TryBot: Roland Shoemaker <bracewell@google.com>
    Reviewed-by: Damien Neil <dneil@google.com>
    Change-Id: I31bc50e9346b4eee6fbe51a18c3c57230cc066db
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481984
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    neild authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    7a359a6 View commit details
    Browse the repository at this point in the history
  4. [release-branch.go1.19] mime/multipart: limit parsed mime message sizes

    The parsed forms of MIME headers and multipart forms can consume
    substantially more memory than the size of the input data.
    A malicious input containing a very large number of headers or
    form parts can cause excessively large memory allocations.
    
    Set limits on the size of MIME data:
    
    Reader.NextPart and Reader.NextRawPart limit the the number
    of headers in a part to 10000.
    
    Reader.ReadForm limits the total number of headers in all
    FileHeaders to 10000.
    
    Both of these limits may be set with with
    GODEBUG=multipartmaxheaders=<values>.
    
    Reader.ReadForm limits the number of parts in a form to 1000.
    This limit may be set with GODEBUG=multipartmaxparts=<value>.
    
    Thanks for Jakob Ackermann (@das7pad) for reporting this issue.
    
    For CVE-2023-24536
    For #59153
    For #59269
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802455
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1801087
    Reviewed-by: Damien Neil <dneil@google.com>
    Run-TryBot: Roland Shoemaker <bracewell@google.com>
    Change-Id: If134890d75f0d95c681d67234daf191ba08e6424
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481985
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    neild authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    7917b5f View commit details
    Browse the repository at this point in the history
  5. [release-branch.go1.19] go/scanner: reject large line and column numb…

    …ers in //line directives
    
    Setting a large line or column number using a //line directive can cause
    integer overflow even in small source files.
    
    Limit line and column numbers in //line directives to 2^30-1, which
    is small enough to avoid int32 overflow on all reasonbly-sized files.
    
    Fixes CVE-2023-24537
    Fixes #59273
    For #59180
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802456
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802611
    Reviewed-by: Damien Neil <dneil@google.com>
    Change-Id: Ifdfa192d54f722d781a4d8c5f35b5fb72d122168
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481986
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    neild authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    126a1d0 View commit details
    Browse the repository at this point in the history
  6. [release-branch.go1.19] html/template: disallow actions in JS templat…

    …e literals
    
    ECMAScript 6 introduced template literals[0][1] which are delimited with
    backticks. These need to be escaped in a similar fashion to the
    delimiters for other string literals. Additionally template literals can
    contain special syntax for string interpolation.
    
    There is no clear way to allow safe insertion of actions within JS
    template literals, as handling (JS) string interpolation inside of these
    literals is rather complex. As such we've chosen to simply disallow
    template actions within these template literals.
    
    A new error code is added for this parsing failure case, errJsTmplLit,
    but it is unexported as it is not backwards compatible with other minor
    release versions to introduce an API change in a minor release. We will
    export this code in the next major release.
    
    The previous behavior (with the cavet that backticks are now escaped
    properly) can be re-enabled with GODEBUG=jstmpllitinterp=1.
    
    This change subsumes CL471455.
    
    Thanks to Sohom Datta, Manipal Institute of Technology, for reporting
    this issue.
    
    Fixes CVE-2023-24538
    For #59234
    Fixes #59271
    
    [0] https://tc39.es/ecma262/multipage/ecmascript-language-expressions.html#sec-template-literals
    [1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals
    
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802457
    Reviewed-by: Damien Neil <dneil@google.com>
    Run-TryBot: Damien Neil <dneil@google.com>
    Reviewed-by: Julie Qiu <julieqiu@google.com>
    Reviewed-by: Roland Shoemaker <bracewell@google.com>
    Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1802612
    Run-TryBot: Roland Shoemaker <bracewell@google.com>
    Change-Id: Ic7f10595615f2b2740d9c85ad7ef40dc0e78c04c
    Reviewed-on: https://go-review.googlesource.com/c/go/+/481987
    Auto-Submit: Michael Knyszek <mknyszek@google.com>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Run-TryBot: Michael Knyszek <mknyszek@google.com>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    rolandshoemaker authored and gopherbot committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    b1e3ecf View commit details
    Browse the repository at this point in the history
  7. [release-branch.go1.19] go1.19.8

    Change-Id: If779869c8f3357fbf5df28bdb2640b183e608f46
    Reviewed-on: https://go-review.googlesource.com/c/go/+/482098
    Auto-Submit: Gopher Robot <gobot@golang.org>
    Run-TryBot: Gopher Robot <gobot@golang.org>
    TryBot-Result: Gopher Robot <gobot@golang.org>
    Reviewed-by: Matthew Dempsky <mdempsky@google.com>
    Reviewed-by: Michael Knyszek <mknyszek@google.com>
    gopherbot authored and mknyszek committed Apr 4, 2023
    Configuration menu
    Copy the full SHA
    ca305e1 View commit details
    Browse the repository at this point in the history
Loading