This sets up for delaying the decision of which seed to use,
but this CL still keeps the original global Seed(1) semantics.
Preparation for #54880.
Change-Id: Ibfa9d50ec9023aa755a83852e55168fa7d24b115
Reviewed-on: https://go-review.googlesource.com/c/go/+/443057
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
The immediate reason is that we want to use godebug from math/rand,
and math/rand importing godebug importing os causes an import cycle
in package testing.
More generally, the new approach to backward compatibility outlined
in discussion #55090 will require using this package from other similarly
sensitive places, perhaps even package os itself. Best to remove all
dependencies.
Preparation for #54880.
Change-Id: Ia01657a2d90e707a8121a336c9db3b7247c0198f
Reviewed-on: https://go-review.googlesource.com/c/go/+/439418
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
UnsafePointer.Store, UnsafePointer.CompareAndSwap were missing,
although .StoreNoWB and .CompareAndSwapNoWB existed.
Same for Pointer[T}.
Do the linkname tricks necessary to add those methods.
Change-Id: I925ee27673288accb15ebe93898f9eb01ab46a98
Reviewed-on: https://go-review.googlesource.com/c/go/+/443379
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Change-Id: I77c61211a488c66f1d445c0bf01e35aaf4f83565
GitHub-Last-Rev: c411a56a3b
GitHub-Pull-Request: golang/go#56279
Reviewed-on: https://go-review.googlesource.com/c/go/+/443316
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Damien Neil <dneil@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Previously we used Go 1.17, but we realized thanks to tickling
a pre-Go1.17.3 bug that if we are going to change the bootstrap
toolchain that we should default to the latest available point release
at the time we make the switch, not the initial major release, so as
to avoid bugs that were fixed in the point releases.
This CL updates the default search locations and the release notes.
Users who run make.bash and depend on finding $HOME/sdk/go1.17
may need to run
go install golang.org/dl/go1.17.13@latest
go1.17.13 download
to provide a Go 1.17.13 toolchain to their builds.
Change-Id: I3a2511f088cf852470a7216a5a41ae775fb561b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/439419
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
The only purpose of using the SHA256 in the file name is
collision avoidance. Using just the first 64 bits (16 hex digits)
will be more than enough, unless people start storing billions
of test cases in their corpora.
The shorter names are nicer for just about everything:
command lines, repository listings, and so on.
Change-Id: I67c760023bed85ba3ffd4f8058f86ef778322ba7
Reviewed-on: https://go-review.googlesource.com/c/go/+/443335
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
Add more skips if short mode testing, since some of these tests
still seem to be timing out on smaller and more underpowered
builders.
Updates #56197.
Change-Id: I469d9fd3a6be5602243234562fa3fe6263968b56
Reviewed-on: https://go-review.googlesource.com/c/go/+/443376
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
The src.NoXPos in fake receivers was leaking, through a series of
mishaps, all the way to logopt. If done just so, this can lead to
a compiler crash. This makes logopt crash-proof and eliminates the
root cause as well.
I'm reluctant to write a test for this because it's kinda slow
and involved; my working test is "compile something that mentions
the flag package with -json=0,$TMPDIR flag, then be sure that
$TMPDIR/flag/__unnamed__.json was not created".
Change-Id: I384b717c0e7522953d22d61f7e06319e11192d7d
Reviewed-on: https://go-review.googlesource.com/c/go/+/443156
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Pratt <mpratt@google.com>
Currently, the entry-point to this test is a Bash script that smoke
tests the FORTRAN compiler and then runs a FORTRAN-containing Go test.
This CL rearranges things so a pure Go Go test smoke tests the FORTRAN
compiler and then runs a non-test FORTRAN-containing Go binary.
While we're here, we fix a discrepancy when the host is GOARCH=amd64,
but the target is GOARCH=386. Previously, we would pick the wrong
libgfortran path because we didn't account for the cross-compilation,
causing the link to fail. Except for some reason this was ignored and
the test nevertheless "passed". In the new test we're a little more
strict, so this build failure will cause the test to fail, so we add a
little logic to account for cross-compilation with the host toolchain.
For #37486.
Change-Id: Ie6f70066885d6fbb4e1b5a2b1e13b85dee5b359b
Reviewed-on: https://go-review.googlesource.com/c/go/+/443069
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
This test was originally Linux-only, but there doesn't seem to be
anything Linux-specific in it.
Change-Id: I0f8519eff5dbed97f5e21e1c8e5ab0d747d51df3
Reviewed-on: https://go-review.googlesource.com/c/go/+/443073
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Currently, TestCgoSigfwd will pass incorrectly if the SIGSEGV that
originates in Go mistakenly goes to the C SIGSEGV handler. Fix this by
adding a signal-atomic variable that tracks what the expected behavior
is.
Change-Id: Id2a9fa3b209299dccf90bb60720b89ad96838a9c
Reviewed-on: https://go-review.googlesource.com/c/go/+/443072
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This migrates testsigfwd, which uses some one-off build
infrastructure, to be part of the runtime's testprogcgo.
The test is largely unchanged. Because it's part of a larger binary,
this CL renames a few things and gates the constructor-time signal
handler registration on an environment variable. This CL also replaces
an errant fmt.Errorf with fmt.Fprintf.
For #37486, since it eliminates a non-go-test from dist.
Change-Id: I0efd146ea0a0a3f0b361431349a419af0f0ecc61
Reviewed-on: https://go-review.googlesource.com/c/go/+/443068
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This code was introduced in CL 17903 but has never executed. It's also
fundamentally non-deterministic. Delete it.
Simplification for #37486.
Change-Id: I049564123fb4fba401154e2ea0fc429e552d4749
Reviewed-on: https://go-review.googlesource.com/c/go/+/431258
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This can reduce a bunch of rules.
Change-Id: Id7d644307c295a0ed16eb837b3755d1117a4fbf7
Reviewed-on: https://go-review.googlesource.com/c/go/+/440036
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
On newer amd64 cpus 3 operand LEA instructions are slow, CL 114655 split
them to 2 LEA instructions in genssa.
This CL make late lower pass run after addressing modes, and split 3
operand LEA in late lower pass so that we can do common-subexpression
elimination for splited LEAs.
Updates #21735
Change-Id: Ied49139c7abab655e1a14a6fd793bdf9f987d1f1
Reviewed-on: https://go-review.googlesource.com/c/go/+/440035
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Joedian Reid <joedian@golang.org>
Assuming the two values are valid and non-comparable, Equal should panic.
x := reflect.ValueOf([]int{1, 2, 3})
x.Equal(x) // can not report false, should panic
Assuming one of them is non-comparable and the other is invalid, it should
always report false.
x := reflect.ValueOf([]int{1, 2, 3})
y := reflect.ValueOf(nil)
x.Equal(y) // should report false
For #46746.
Change-Id: Ifecd77ca0b3de3019fae2be39048f9277831676c
Reviewed-on: https://go-review.googlesource.com/c/go/+/440037
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Remove a vestigial " // BUG" comment as there is no bug in the relevant code section and comment predated other changes. Also removed a needless allocation and conformed to the "v, ok := a[x]" standard convention. Tests are passing.
Change-Id: Id28ad1baf77447052b54b341f018e573bac0c11a
GitHub-Last-Rev: 26084698bf
GitHub-Pull-Request: golang/go#56210
Reviewed-on: https://go-review.googlesource.com/c/go/+/442815
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Change-Id: I171905d5cd7a121de549827ef4d5968510aa3efc
Reviewed-on: https://go-review.googlesource.com/c/go/+/436705
Reviewed-by: Than McIntosh <thanm@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: hopehook <hopehook@golangcn.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Run-TryBot: xie cui <523516579@qq.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@golang.org>
This appears to have been left over from a C cast during the rewrite of
malloc into Go in https://golang.org/cl/108840046.
Change-Id: I88f212089c2bcf79d5881b3e8bf3f94f343331d8
Reviewed-on: https://go-review.googlesource.com/c/go/+/443235
Run-TryBot: Dan Kortschak <dan@kortschak.io>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The Grow method is like the proposed slices.Grow function
in that it ensures that the slice has enough capacity to append
n elements without allocating.
The implementation of Grow is a thin wrapper over runtime.growslice.
This also changes Append and AppendSlice to use growslice under the hood.
Fixes#48000
Change-Id: I992a58584a2ff1448c1c2bc0877fe76073609111
Reviewed-on: https://go-review.googlesource.com/c/go/+/389635
Run-TryBot: Joseph Tsai <joetsai@digital-static.net>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
The testasan test was added back in 2013 (CL 10126044), many years
before Go added ASAN support in 2021 (CL 298611). So, in fact,
testasan does not test Go ASAN support at all, as you might expect
(misc/cgo/testsanitizers does that). It's intended to test whether the
Go memory allocator works in a mixed C/Go binary where the C code is
compiled with ASAN. The test doesn't actually use ASAN in any way; it
just simulates where ASAN of 2013 put its shadow mappings. This made
sense to test at the time because Go was picky about where its heap
landed and ASAN happened to put its mappings exactly where Go wanted
to put its heap. These days, Go is totally flexible about its heap
placement, and I wouldn't be surprised if ASAN also works differently.
Given all of this, this test adds almost no value today. Drop it.
For #37486, since it eliminates a non-go-test from dist.
Change-Id: I0292f8efbdc0e1e39650715604535c445fbaa87f
Reviewed-on: https://go-review.googlesource.com/c/go/+/443067
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
We haven't used this in a while and it's going to complicate later
changes to dist, so drop support. This was primarily for supporting
slow QEMU-based builders, but an alternative and simpler way to do
that if we need to in the future is to supply a go_exec wrapper to run
tests in QEMU, like we do for other emulated platforms.
Simplification for #37486.
Change-Id: Idc0383f59c61d8546ea3b4d2eede4acdaf30d9b6
Reviewed-on: https://go-review.googlesource.com/c/go/+/431256
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Austin Clements <austin@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Austin Clements <austin@google.com>
If no external linker was passed with -extld, link currently assumes
that it is "gcc" which is not correct for platforms that use clang
toolchain. Return "clang" for platforms that use it, this fixes dir
tests on freebsd/riscv64.
For #53466
Change-Id: Ie3bce1b9581839d0b3b2129908355cd30ae9a713
Reviewed-on: https://go-review.googlesource.com/c/go/+/432756
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Joel Sing <joel@sing.id.au>
Reviewed-by: Mikaël Urankar <mikael.urankar@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
LLVM recently introduced ZSTD compression for ELF sections. The error
message when failing to read the compressed section calls this
COMPRESS_ZLIB+2 while it should report it as COMPRESS_ZLIB+1.
Change-Id: I869aa69baf0c8c86665475b47343c790587cb39b
Reviewed-on: https://go-review.googlesource.com/c/go/+/443035
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
We started running this test under HTTP/2 in a recent refactoring.
It seems to be flaky for HTTP/2; skip it for now.
Change-Id: I8b270afe7f0d3db307b5a951e16f576116333003
Reviewed-on: https://go-review.googlesource.com/c/go/+/443075
Run-TryBot: Damien Neil <dneil@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Auto-Submit: Damien Neil <dneil@google.com>
The existing version of this test contains several races it tries to
control with sleeps. Unfortunately, it is still flaky on darwin because
writing `fg` in bash too early can apparently result in failure to
actually continue the stopped child.
Rather than continuing to get perfect timing with bash, rewrite this to
eliminate bash and instead perform the same PTY operations that bash
would do.
This test is still quite complex because psuedo-terminals are
interminably complicated, but I believe it is no longer racy.
Technically there are still two races (waiting for child to enter read()
and waiting for the darwin kernel to wake the read after TIOCSPGRP), but
loss of either of these races should only mean we fail to test the
desired darwin EINTR case, not failure.
This test is skipped on DragonflyBSD, as it tickles a Wait hang bug
(#56132).
Updates #56132.
Fixes#37329.
Change-Id: I0ceaf5aa89f6be0f1bf68b2140f47db673cedb33
Reviewed-on: https://go-review.googlesource.com/c/go/+/440220
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Now that we plumb the start line to the runtime, we can include in pprof
files. Since runtime.Frame.startLine is not (currently) exported, we
need a runtime helper to get the value.
For #55022.
Updates #56135.
Change-Id: Ifc5b68a7b7170fd7895e4099deb24df7977b22ea
Reviewed-on: https://go-review.googlesource.com/c/go/+/438255
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
This adds the function "start line number" to runtime._func and
runtime.inlinedCall objects. The "start line number" is the line number
of the func keyword or TEXT directive for assembly.
Subtracting the start line number from PC line number provides the
relative line offset of a PC from the the start of the function. This
helps with source stability by allowing code above the function to move
without invalidating samples within the function.
Encoding start line rather than relative lines directly is convenient
because the pprof format already contains a start line field.
This CL uses a straightforward encoding of explictly including a start
line field in every _func and inlinedCall. It is possible that we could
compress this further in the future. e.g., functions with a prologue
usually have <line of PC 0> == <start line>. In runtime.test, 95% of
functions have <line of PC 0> == <start line>.
According to bent, this is geomean +0.83% binary size vs master and
-0.31% binary size vs 1.19.
Note that //line directives can change the file and line numbers
arbitrarily. The encoded start line is as adjusted by //line directives.
Since this can change in the middle of a function, `line - start line`
offset calculations may not be meaningful if //line directives are in
use.
For #55022.
Change-Id: Iaabbc6dd4f85ffdda294266ef982ae838cc692f6
Reviewed-on: https://go-review.googlesource.com/c/go/+/429638
Run-TryBot: Michael Pratt <mpratt@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Adjust os/arch checks to enable msan tests on freebsd/amd64.
R=go1.20
For #53298
Change-Id: I3d0f5259db73d526d006a12de5ba6284528cf819
Reviewed-on: https://go-review.googlesource.com/c/go/+/411276
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Enable -msan flag on freebsd/amd64 and amend PIE comment in
internal/work/init.go to indicate that MSAN requires PIE on all platforms
except linux/amd64.
R=go1.20
For #53298
Change-Id: I93d94efa95d7f292c23c433fb1d3f4301d820bde
Reviewed-on: https://go-review.googlesource.com/c/go/+/411275
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Adjust build constraints and change the runtime to call the C mmap function
when using cgo.
R=go1.20
For #53298
Change-Id: If9c3306dc16a8645d1bb9be0343e0472d6c4783f
Reviewed-on: https://go-review.googlesource.com/c/go/+/411274
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
There are getting to be enough special cases in this wrapper that
the increase in clarity from having a single file is starting to be
outweighed by the complexity from chained conditionals.
Updates #50138.
Updates #13987.
Change-Id: If4f1be19c0344e249aa6092507c28363ca6c8438
Reviewed-on: https://go-review.googlesource.com/c/go/+/442575
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Write .note signature section when targeting FreeBSD, similar to NetBSD
and OpenBSD. This allows binaries to declare the ABI version they were
compiled for and opt out of ASLR when compiled with -race.
Fixes#48164
Change-Id: Ie54dd5c70697a3f42a75fd640540350fd8a4dc71
Reviewed-on: https://go-review.googlesource.com/c/go/+/412494
Reviewed-by: Meng Zhuo <mzh@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Yuval Pavel Zholkover <paulzhol@gmail.com>
Workspaces with a single module would enter mod=vendor mode even when
in workspace mode. Fix that by explicitly checking that we're not in
workspace mode when deciding whether to enter vendor mode.
Fixes#54130
Change-Id: I03fcd9db4160c9872aa2b7957a80f24d49f787d0
Reviewed-on: https://go-review.googlesource.com/c/go/+/439415
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Michael Matloob <matloob@golang.org>
If we use the "pipetest" helper command instead of "sleep",
we can use its stdout pipe to determine when the process
is ready to handle a SIGSTOP, and we can additionally check
that sending a SIGCONT actually causes the process to continue.
This also allows us to remove the "sleep" helper command,
making the test file somewhat more concise.
Noticed while looking into #50138.
Change-Id: If4fdee4b1ddf28c6ed07ec3268c81b73c2600238
Reviewed-on: https://go-review.googlesource.com/c/go/+/442576
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
This will dump more goroutines if the test happens to fail.
For #50138.
Change-Id: Ifae30b5ba8bddcdaa9250dd90be8d8ba7d5604d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/442476
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
The linker's -X flag allows setting/changing a string variable's
content at link time. Currently it resets its size then write a
new string header pointing to the new content. This mostly works.
But under ASAN build the string variable can have larger size
than the usual 2 words, due to the red zone. Resetting the size
can cause the variable to "overlap" (in ASAN's view) with other
variables. Don't reset the size.
Fixes#56175.
Change-Id: Ib364208201a7a2fd7f44f9b1797834198736a405
Reviewed-on: https://go-review.googlesource.com/c/go/+/442635
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
And add a link. Resolves a comment left on http://go.dev/cl/436096
after it was submitted.
Change-Id: I2847d29134ffb4fee2b0ea37842cdf57df55ec0c
Reviewed-on: https://go-review.googlesource.com/c/go/+/442816
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Adds a package level doc comment to the debug/dwarf, debug/elf,
debug/macho, debug/pe, and debug/plan9obj noting that these packages
are not designed to be hardened against adversarial inputs.
Change-Id: I678d01bcdc8ad01c23805f09cc59e64cec6c3f76
Reviewed-on: https://go-review.googlesource.com/c/go/+/435417
Reviewed-by: Damien Neil <dneil@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
The package doc included the copying header by mistake.
Change-Id: I37ac2d14b1b8a389e6b603fbb1c6a3a33b1d80d6
Reviewed-on: https://go-review.googlesource.com/c/go/+/440456
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Joedian Reid <joedian@golang.org>
This mode is now always 0. Remove the unnecessary argument to better
align with types2.
Change-Id: Ib59196a9dfc26fd66ae51381eabc760c39ad9ede
Reviewed-on: https://go-review.googlesource.com/c/go/+/442775
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>