- 14 Dec, 2017 16 commits
-
-
Russ Cox authored
Two minor changes to allow fixes in cmd/vet's printf checking. 1. Pass package import path in vet config, so that vet knows whether it is, for example, vetting "fmt". 2. Add new, but undocumented and for now unsupported flag -vettool to control which vet binary is invoked during go vet. This lets the cmd/vet tests build and test a throwaway vet.exe using cmd/go to ensure type checking information, all without installing a potentially buggy cmd/vet. For #22936. Change-Id: I18df7c796ebc711361c847c63eb3ee17fb041ff7 Reviewed-on: https://go-review.googlesource.com/83837 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Mike Samuel authored
Srcset is largely the same as a URL, but is escaped in URL contexts. Inside a srcset attribute, URLs have their commas percent-escaped to avoid having the URL be interpreted as multiple URLs. Srcset is placed in a srcset attribute literally. Fixes #17441 Change-Id: I676b544784c7e54954ddb91eeff242cab25d02c4 Reviewed-on: https://go-review.googlesource.com/38324Reviewed-by:
Kunpei Sakai <namusyaka@gmail.com> Reviewed-by:
Mike Samuel <mikesamuel@gmail.com> Reviewed-by:
Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Russ Cox authored
(This only manifested in test vet failures for packages without tests, or else we'd probably have seen this sooner.) Fixes #23047. Change-Id: I41d09a7780999bbe1951377ffcc811ba86ea5000 Reviewed-on: https://go-review.googlesource.com/83955 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
JBD authored
Updates #22027. Change-Id: I5a5bae77a744c7a2ecb75172846e6461a98ee8af Reviewed-on: https://go-review.googlesource.com/83916Reviewed-by:
Andrew Bonventre <andybons@golang.org>
-
Brad Fitzpatrick authored
Remove the ambiguity, know that we know it's actually broken, per https://github.com/golang/go/issues/23073#issuecomment-351045421 Updates #23073 Change-Id: I9b904da2f4c7105a0727d2a9056aaa6895d3dadc Reviewed-on: https://go-review.googlesource.com/83856Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Brad Fitzpatrick authored
Add Adam Thomason (individual CLA) Add Adrian Hesketh (individual CLA) Add Aeneas Rekkas (arekkas) (individual CLA) Add Afanasev Stanislav (individual CLA) Add Agniva De Sarker (individual CLA) Add Alexander Pantyukhin (individual CLA) Add Alexandre Parentea (individual CLA) Add Aman Gupta (individual CLA) Add Anand K. Mistry (individual CLA) Add Andrii Soldatenko (individual CLA) Add Andrii Soluk (individual CLA) Add Andrzej Żeżel (individual CLA) Add Anthony Alves (individual CLA) Add Anthony Sottile (individual CLA) Add Ariel Mashraki (individual CLA) Add Axel Wagner (individual CLA) Add Ben Haines (individual CLA) Add Ben Laurie (corporate CLA for Google Inc.) Add Ben Schwartz (corporate CLA for Google Inc.) Add Blain Smith (individual CLA) Add Blake Mesdag (individual CLA) Add Borja Clemente (individual CLA) Add Brett Merrill (individual CLA) Add Brian Kessler (individual CLA) Add Burak Guven (individual CLA) Add Cholerae Hu (individual CLA) Add Chris Ball (individual CLA) Add Christian Alexander (individual CLA) Add Christopher Henderson (individual CLA) Add Christopher Koch (corporate CLA for Google Inc.) Add Christos Zoulas (individual CLA) Add Daniela Petruzalek (individual CLA) Add Danny Rosseau (individual CLA) Add Davor Kapsa (individual CLA) Add Edan Bedrik (individual CLA) Add Elbert Fliek (individual CLA) Add Elena Grahovac (individual CLA) Add Emerson Lin (individual CLA) Add Eric Rescorla (individual CLA) Add Evan Jones (individual CLA) Add Frank Somers (individual CLA) Add Frederic Guillot (individual CLA) Add Garret Kelly (corporate CLA for Google Inc.) Add Grant Griffiths (individual CLA) Add Guilherme Garnier (individual CLA) Add Guilherme Rezende (individual CLA) Add Hanjun Kim (individual CLA) Add Henry Adi Sumarto (individual CLA) Add Henry Bubert (individual CLA) Add Herbie Ong (corporate CLA for Google Inc.) Add Hilko Bengen (individual CLA) Add Hiroaki Nakamura (individual CLA) Add Ian Kent (individual CLA) Add Inanc Gumus (individual CLA) Add Iskander Sharipov (corporate CLA for Intel Corporation) Add Ivan Bertona (individual CLA) Add James Lawrence (individual CLA) Add James Treanor (individual CLA) Add Jamie Liu (corporate CLA for Google Inc.) Add Jared Culp (individual CLA) Add Jason Wangsadinata (individual CLA) Add Javier Segura (individual CLA) Add Jean-Francois Cantin (individual CLA) Add Jeet Parekh (individual CLA) Add Jelte Fennema (individual CLA) Add Jimmy Frasche (individual CLA) Add Joshua Rubin (individual CLA) Add Juan Carlos (individual CLA) Add Jude Pereira (individual CLA) Add Karel Pazdera (individual CLA) Add Karsten Köhler (individual CLA) Add Kenji Yano (individual CLA) Add Kevin Ruffin (individual CLA) Add Kieran Colford (individual CLA) Add Kirk Han (individual CLA) Add Kunpei Sakai (individual CLA) Add Kyle Shannon (individual CLA) Add Kyohei Kadota (individual CLA) Add Lakshay Garg (individual CLA) Add Lann Martin (corporate CLA for Google Inc.) Add Laurent Voisin (individual CLA) Add Leigh McCulloch (individual CLA) Add Lorenz Bauer (corporate CLA for CloudFlare, Inc.) Add Luca Bruno (corporate CLA for CoreOS, Inc) Add Luke Granger-Brown (individual CLA) Add Lyle Franklin (individual CLA) Add Maicon Costa (individual CLA) Add Manish Goregaokar (individual CLA) Add Mansour Rahimi (individual CLA) Add Mark Percival (individual CLA) Add Mark Pulford (individual CLA) Add Mark Wolfe (individual CLA) Add Martins Sipenko (individual CLA) Add Mat Byczkowski (individual CLA) Add Matej Baćo (individual CLA) Add Mateus Amin (individual CLA) Add Matt Dee (individual CLA) Add Matthew Broberg (individual CLA) Add Max Schmitt (individual CLA) Add Mayank Kumar (individual CLA) Add Michael Brandenburg (individual CLA) Add Michael McLoughlin (individual CLA) Add Michael Schurter (individual CLA) Add Michael Steinert (individual CLA) Add Michal Pristas (individual CLA) Add Mihail Minaev (individual CLA) Add Muhammad Falak R Wani (individual CLA) Add Naoki Kanatani (individual CLA) Add Nicolas BRULEZ (individual CLA) Add Nils Larsgård (individual CLA) Add Noble Johnson (individual CLA) Add Paul Boyd (individual CLA) Add Paul Ruest (individual CLA) Add Peter Wu (corporate CLA for CloudFlare, Inc.) Add Petrica Voicu (individual CLA) Add Pontus Leitzler (individual CLA) Add Radek Sohlich (individual CLA) Add Rajath Agasthya (individual CLA) Add Rajender Reddy Kompally (individual CLA) Add Ramazan AYYILDIZ (individual CLA) Add RaviTeja Pothana (individual CLA) Add Reilly Watson (individual CLA) Add Roman Budnikov (individual CLA) Add Ross Chater (individual CLA) Add Rudi Kramer (individual CLA) Add Ryoichi KATO (individual CLA) Add Ryuji Iwata (individual CLA) Add Scott Crunkleton (individual CLA) Add Seiji Takahashi (individual CLA) Add Sergey Frolov (corporate CLA for Google Inc.) Add Sergey Semin (individual CLA) Add Sergiusz Bazanski (individual CLA) Add Stanislav Afanasev (individual CLA) Add Sukrit Handa (individual CLA) Add Sylvain Zimmer (individual CLA) Add Tao Wang (individual CLA) Add Terin Stock (individual CLA) Add Thiago Avelino (individual CLA) Add Thomas Wanielista (individual CLA) Add Tim Cooper (individual CLA) Add Tim Wright (individual CLA) Add Tobias Assarsson (individual CLA) Add Tom Lanyon (corporate CLA for Google Inc.) Add Tom Levy (individual CLA) Add Troels Thomsen (individual CLA) Add Tugdual Saunier (individual CLA) Add Tyler Bui-Palsulich (corporate CLA for Google Inc.) Add Wembley G. Leach, Jr (individual CLA) Add Will Faught (individual CLA) Add Wèi Cōngruì (individual CLA) Add Xi Ruoyao (individual CLA) Add Yann Salaün (individual CLA) Add Yosuke Akatsuka (individual CLA) Add Zach Gershman (individual CLA) Add Zhengyu He (corporate CLA for Google Inc.) Add Zhongtao Chen (individual CLA) Add Роман Хавроненко (individual CLA) Add Тарас Буник (individual CLA) Updates #12042 Change-Id: If8fd708d32434b8ba21a0b3ef433b0d176626ce8 Reviewed-on: https://go-review.googlesource.com/83858Reviewed-by:
Andrew Bonventre <andybons@golang.org>
-
Tobias Klauser authored
Also remove a superfluous </p> Change-Id: Idca51cdfbd8abc6669f00c80ca3fb7f225ee445c Reviewed-on: https://go-review.googlesource.com/84015Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Tests exist that call m.Run in a loop‽ Now we have one too. Fixes #23129. Change-Id: I8cbecb724f239ae14ad45d75e67d12c80e41c994 Reviewed-on: https://go-review.googlesource.com/83956 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Wèi Cōngruì authored
os.NewFile doesn't put the fd into non-blocking mode. In most cases, an *os.File returned by os.NewFile is in blocking mode. Updates #7970 Updates #21856 Updates #23111 Change-Id: Iab08432e41f7ac1b5e25aaa8855d478adb7f98ed Reviewed-on: https://go-review.googlesource.com/83995Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
The export prologue goes into the _cgo_export.h file, where it may be be #include'd by a .swig file. As SWIG defines its own type "intgo", the definition of "intgo" in the export prologue could conflict. Since we don't need to define "intgo" in the _cgo_export.h file, don't. Defining "intgo" in _cgo_export.h was new for this release, so this should not break any existing code. No test case as I can't quite bring myself to write a test that combines SWIG and cgo. Change-Id: I8073e8300a1860cecd5994b9ad07dd35a4298c89 Reviewed-on: https://go-review.googlesource.com/83936 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Fixes #22989. Change-Id: I9776a7b0d0598c2cb118c323d1f8f933665da254 Reviewed-on: https://go-review.googlesource.com/83881 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Russ Cox authored
t.Run(f) does not wait for f after f calls t.Parallel. Otherwise it would be impossible to create new parallel sibling subtests for f. Fixes #22993. Change-Id: I27e1555ab1ff608eb8155db261d5e7ee8f486aef Reviewed-on: https://go-review.googlesource.com/83880 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
If package strings has a particular set of gcflags, then the strings_test pseudo-package built as part of the test binary started inheriting the same flags in CL 81496, to fix #22831. Now the package main and final test binary link built as part of the strings test binary also inherit the same flags, to fix #22994. I am slightly uneasy about reusing package strings's flags for package main, but the alternative would be to introduce some kind of special case, which I'd be even more uneasy about. This interpretation preserves the Go 1.9 behavior of existing commands like: go test -c -ldflags=-X=mypkg.debugString=foo mypkg Fixes #22994. Change-Id: I9ab83bf1a9a6adae530a7715b907e709fd6c1b5d Reviewed-on: https://go-review.googlesource.com/83879 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Ian Lance Taylor authored
Updates #7970 Updates #21856 Updates #23111 Change-Id: I0cd0151fcca740c40c3c976f941b04e98e67b0bf Reviewed-on: https://go-review.googlesource.com/83715Reviewed-by:
Russ Cox <rsc@golang.org>
-
Robert Griesemer authored
Change-Id: I4e357a250b2f9cfbf780b05c5f54805682b19a62 Reviewed-on: https://go-review.googlesource.com/83935Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
JBD authored
Updates #22027. Change-Id: I468348d2b000f146f88ef8b7cf450eea8d1c12a7 Reviewed-on: https://go-review.googlesource.com/83917Reviewed-by:
Andrew Bonventre <andybons@golang.org>
-
- 13 Dec, 2017 8 commits
-
-
Russ Cox authored
This allows errchk to be used with "go vet" output (as opposed to "go tool vet"). Change-Id: I0009a53c9cb74accd5bd3923c137d6dbf9e46326 Reviewed-on: https://go-review.googlesource.com/83836 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
Found by upcoming cmd/vet change. Change-Id: I7a8264a304b2a4f26f3bd418c1b28cc849889c9b Reviewed-on: https://go-review.googlesource.com/83835 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Nathaniel Caza authored
The current implementation ignores certs wherein the Subject does not match the Issuer. An example of where this causes issue is an enterprise environment with intermediate CAs. In this case, the issuer is separate (and may be loaded) but the intermediate is ignored. A TLS handshake that does not include the intermediate cert would then fail with an untrusted error in Go. On other platforms (darwin-nocgo included), all trusted certs are loaded and accepted reguardless of Subject/Issuer names. This change removes the Subject/Issuer name-matching restriction of certificates when trustAsRoot is set, allowing all trusted certs to be loaded on darwin (cgo). Refs #16532 Change-Id: I451e929588f8911892be6bdc2143d0799363c5f8 Reviewed-on: https://go-review.googlesource.com/36942 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Hana Kim authored
Use Brendan Gregg's FlameGraphs page link. Mention the flame graph is available from the upstream pprof. Change-Id: Ife1d5a5f4f93f20cd5952a09083f798b77d25a60 Reviewed-on: https://go-review.googlesource.com/83798Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Russ Cox authored
By the time Go 1.11 is released, OS X 10.9 Mavericks will have gone two years with no security updates. For #23011. Change-Id: I6482852a14477985769b72c45c92416aae8be100 Reviewed-on: https://go-review.googlesource.com/83795 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
Hanjun Kim authored
As mentioned in #22802, only day component of layout string has space padding(represented by one underscore before its placeholder). This commit expands the rule for month, hour, minute and second. Updates #22802 (maybe fixes it) Change-Id: I886998380489862ab9a324a6774f2e4cf7124122 Reviewed-on: https://go-review.googlesource.com/78735 Run-TryBot: Rob Pike <r@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Rob Pike <r@golang.org>
-
Ian Lance Taylor authored
An exec command is normally used on platforms were the test is run in some unusual way, making it less likely that the testlog will be useful. Updates #22593 Change-Id: I0768f6da89cb559d8d675fdf6d685db9ecedab9e Reviewed-on: https://go-review.googlesource.com/83578 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Brad Fitzpatrick authored
Fixes #23085 Change-Id: I7fef281079e9e08c49ae05371506b0b881a467db Reviewed-on: https://go-review.googlesource.com/83577Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 12 Dec, 2017 5 commits
-
-
Matthew Dempsky authored
We can't currently inline functions that contain closures anyway, so just delete this budgeting code for now. Re-enable once we can (if ever) inline functions with nested closures. Updates #15561. Fixes #23093. Change-Id: Idc5f8e042ccfcc8921022e58d3843719d4ab821e Reviewed-on: https://go-review.googlesource.com/83538 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Robert Griesemer <gri@golang.org>
-
Ian Lance Taylor authored
When using -importcfg, the import paths recorded by the compiler in the object file are simply the import paths. When not using -importcfg, the import paths have a trailing ".a". Assume that if we are using -importcfg with the compiler, we are using it with the linker, and so if the linker sees an -importcfg option it should not strip ".a" from the import path read from the object files. This was mostly working because the linker only strips a trailing ".x" for a literal dot and any single character 'x'. Since few import paths end with ".x", most programs worked fine. Fixes #22986 Change-Id: I6c10a160b97dd63fff3931f27a1514c856e8cd52 Reviewed-on: https://go-review.googlesource.com/81878 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
The file cmd/go/testdata/src/testcache/script.sh was accidentally committed with CL 83256. Sorry about that. Updates #22593 Change-Id: Id8f07587ea97015ed75439db220560a5446e53e6 Reviewed-on: https://go-review.googlesource.com/83395Reviewed-by:
Russ Cox <rsc@golang.org>
-
Ian Lance Taylor authored
Otherwise, on systems for which syscall does not implement Getwd, a lot of unnecessary files and directories get added to the testlog, right up the root directory. This was causing tests on such systems to fail to cache in practice. Updates #22593 Change-Id: Ic8cb3450ea62aa0ca8eeb15754349f151cd76f85 Reviewed-on: https://go-review.googlesource.com/83455 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by:
Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-
David Crawshaw authored
All plugins issues I would call bugs now closed, so (with some amount of optimism) update the plugin documentation. Change-Id: Ia421c18a166d7cdf599ac86f2336541c1ef42a0d Reviewed-on: https://go-review.googlesource.com/65670Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
- 11 Dec, 2017 11 commits
-
-
Ian Lance Taylor authored
Updates #22593 Change-Id: I76e52dc8b874da13ae9e2d80e5c0d6d8424b67db Reviewed-on: https://go-review.googlesource.com/83257 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Ian Lance Taylor authored
It causes every test to fail as the log file is on the local file system, not the NaCl file system. Updates #22593 Change-Id: Iee3d8307317bd792c9c701baa962ebbbfa34c147 Reviewed-on: https://go-review.googlesource.com/83256 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Bonventre authored
Instead of requiring that cmd/api/run.go be edited upon each release to include the next Go version number, look in $GOROOT/api for files with the prefix go1* and use those instead to perform API checks. Change-Id: I5d9407f2bd368ff5e62f487cccdd245641ca9c9b Reviewed-on: https://go-review.googlesource.com/83355Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Stanislav Afanasev authored
Change-Id: I6d94a14a781a2fbeb90db35ae3490ce2ac5f8ed1 Reviewed-on: https://go-review.googlesource.com/83315Reviewed-by:
Brad Fitzpatrick <bradfitz@golang.org>
-
Andrew Bonventre authored
Change-Id: Ie7f2890eab9ad82da93babc92380b13c611af3d0 Reviewed-on: https://go-review.googlesource.com/83375Reviewed-by:
Andrew Bonventre <andybons@golang.org>
-
Andrew Bonventre authored
Use “substantial”, which is believed to be the correct word. Additionally, this change strips trailing whitespace from the file. Change-Id: I5b6b718fc09e4b8b911b95e8be0733abd58e165d Reviewed-on: https://go-review.googlesource.com/83356Reviewed-by:
Andrew Gerrand <adg@golang.org>
-
Brad Fitzpatrick authored
The Builder's ReadFrom method allows the underlying unsafe slice to escape, and for callers to subsequently modify memory that had been unsafely converted into an immutable string. In the original proposal for Builder (#18990), I'd noted there should be no Read methods: > There would be no Reset or Bytes or Truncate or Read methods. > Nothing that could mutate the []byte once it was unsafely converted > to a string. And in my prototype (https://golang.org/cl/37767), I handled ReadFrom properly, but when https://golang.org/cl/74931 arrived, I missed that it had a ReadFrom method and approved it. Because we're so close to the Go 1.10 release, just remove the ReadFrom method rather than think about possible fixes. It has marginal utility in a Builder anyway. Also, fix a separate bug that also allowed mutation of a slice's backing array after it had been converted into a slice by disallowing copies of the Builder by value. Updates #18990 Fixes #23083 Fixes #23084 Change-Id: Id1f860f8a4f5f88b32213cf85108ebc609acb95f Reviewed-on: https://go-review.googlesource.com/83255Reviewed-by:
Keith Randall <khr@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Russ Cox authored
When we write a cached test result, we now also write a log of the environment variables and files inspected by the test run, along with a hash of their content. Before reusing a cached test result, we recompute the hash of the content specified by the log, and only use the result if that content has not changed. This makes test caching behave correctly for tests that consult environment variables or stat or read files or directories. Fixes #22593. Change-Id: I8608798e73c90e0c1911a38bf7e03e1232d784dc Reviewed-on: https://go-review.googlesource.com/81895 Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Wèi Cōngruì authored
Change-Id: I0c387b6286bc18fd00c6ac4e42bdf175cf89ccb1 Reviewed-on: https://go-review.googlesource.com/83155Reviewed-by:
Ian Lance Taylor <iant@golang.org>
-
Austin Clements authored
Currently, wbBufFlush does nothing if the goroutine is dying on the assumption that the system is crashing anyway and running the write barrier may crash it even more. However, it fails to reset the buffer's "next" pointer. As a result, if there are later write barriers on the same P, the write barrier will overflow the write barrier buffer and start corrupting other fields in the P or other heap objects. Often, this corrupts fields in the next allocated P since they tend to be together in the heap. Fix this by always resetting the buffer's "next" pointer, even if we're not doing anything with the pointers in the buffer. Updates #22987 and #22988. (May fix; it's hard to say.) Change-Id: I82c11ea2d399e1658531c3e8065445a66b7282b2 Reviewed-on: https://go-review.googlesource.com/83016 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:
Rick Hudson <rlh@golang.org> Reviewed-by:
Matthew Dempsky <mdempsky@google.com>
-
Austin Clements authored
heapBits.bits is used during bulkBarrierPreWrite via heapBits.isPointer, which means it must not be preempted. If it is preempted, several bad things can happen: 1. This could allow a GC phase change, and the resulting shear between the barriers and the memory writes could result in a lost pointer. 2. Since bulkBarrierPreWrite uses the P's local write barrier buffer, if it also migrates to a different P, it could try to append to the write barrier buffer concurrently with another write barrier. This can result in the buffer's next pointer skipping over its end pointer, which results in a buffer overflow that can corrupt arbitrary other fields in the Ps (or anything in the heap, really, but it'll probably crash from the corrupted P quickly). Fix this by marking heapBits.bits go:nosplit. This would be the perfect use for a recursive no-preempt annotation (#21314). This doesn't actually affect any binaries because this function was always inlined anyway. (I discovered it when I was modifying heapBits and make h.bits() no longer inline, which led to rampant crashes from problem 2 above.) Updates #22987 and #22988 (but doesn't fix because it doesn't actually change the generated code). Change-Id: I60ebb928b1233b0613361ac3d0558d7b1cb65610 Reviewed-on: https://go-review.googlesource.com/83015 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by:
Matthew Dempsky <mdempsky@google.com> Reviewed-by:
Rick Hudson <rlh@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
-