Incorrect window resizing led to checksum error and invalid result.
To demonstrate the problem bigData must be a bit bigger, 3x is enough.
This change fixes window resizing, increases bigData size and
decouples TestLargeXXHash from bigData because it uses hardcoded hash
value.
ir.ConstExpr was deleted in CL 526395, so no need to check for it.
Fixes the build error.
Change-Id: I642dab70d17369bc7c9ae880666ef42ff099b770
Reviewed-on: https://go-review.googlesource.com/c/go/+/526196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This reverts commit http://go.dev/cl/c/go/+/526915
Reason for revert: darwin builders unhappy with '-Wunaligned-access' C compiler flag
Change-Id: I5e6ca7c9a0ca08b7e758b7f603da70a2fca79b58
Reviewed-on: https://go-review.googlesource.com/c/go/+/526978
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The new inliner tries to de-prioritize inlining of call sites on panic
paths, e.g. for a call such as the one to "foo" below, the inliner
will use a much lower size threshold when deciding whether to inline,
since the path is very likely to be "cold".
if mumble() {
foo() <<-- here
panic("bad")
}
This patch reworks one of the traceback tests is relying on the old
inliner's "inline F everywhere if F inlinable" strategy by tweaking
the code slightly (no change in test functionality).
Change-Id: I83a686b0cc4d94a6cfc63d1e84e45455c1afd5b9
Reviewed-on: https://go-review.googlesource.com/c/go/+/519196
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Austin Clements <austin@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Assign scores to callsites based on previously computed function
properties and callsite properties. This currently works by taking the
size score for the function (as computed by CanInline) and then making
a series of adjustments, positive or negative based on various
function and callsite properties.
NB: much work also remaining on deciding what are the best score
adjustment values for specific heuristics. I've picked a bunch of
arbitrary constants, but they will almost certainly need tuning and
tweaking to arrive at something that has good performance.
Updates #61502.
Change-Id: I887403f95e76d7aa2708494b8686c6026861a6ed
Reviewed-on: https://go-review.googlesource.com/c/go/+/511566
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Add code to detect call sites that are nested in loops, call sites
that are on an unconditional path to panic/exit, and call sites within
"init" functions. The panic-path processing reuses some of the
logic+state already present for the function flag version of "calls
panic/exit".
Updates #61502.
Change-Id: I1d728e0763282d3616a9cbc0a07c5cda115660f3
Reviewed-on: https://go-review.googlesource.com/c/go/+/511565
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Build up a table of (potentially) inlinable call sites during inline
heuristic analysis, and introduce a framework for analyzing each call
site to collect applicable flags (for example, is call nested in
loop). This patch doesn't include any of the flag analysis, just the
machinery to collect the callsites and a regression test harness.
Updates #61502.
Change-Id: Ieaf4a008ac9868e9762c63f5b59bd264dc71ab30
Reviewed-on: https://go-review.googlesource.com/c/go/+/511564
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Extend the code that computes various properties and parameter flags
to incorporate information from export data in addition to things we
can get from the current package. Specifically:
- when deciding whether the current function always calls panic/exit,
check to see whether it has an unconditional call to some other
function that has that flag.
- when computing "parameter feeds" properties, look not just for
cases where a parameter feeds an interesting construct (if/switch,
indirect/interface call, etc) but where it feeds a call whose
corresponding param has that flag.
- when computing return properties, if a given return is always the
results of a call to X, then set the return properties to those
of X.
Updates #61502.
Change-Id: I6472fe98759cccad05b8eed58e4fc568201d88ad
Reviewed-on: https://go-review.googlesource.com/c/go/+/511563
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Augment the ir.Inline container to include an entry for function
properties (currently serialized as a string), and if
GOEXPERIMENT=newinliner is set, compute and store function
properties for all inline candidates processed by the inliner.
The idea here is that if the function properties are going to drive
inlining decisions, we'd like to have the same info from non-local /
imported functions as for local / in-package functions, hence we need
to include the properties in the export data.
Hand testing on the compiler itself and with k8s kubelet shows that
this increases the size of export data overall by about 2-3 percent,
so a pretty modest increase.
Updates #61502.
Change-Id: I9d1c311aa8418d02ffea3629c3dd9d8076886d15
Reviewed-on: https://go-review.googlesource.com/c/go/+/511562
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Add code to analyze properties of function params, specifically
heuristics to look for cases where unmodified params feed into "if"
and "switch" statements in ways that might enable constant folding
and/or dead code elimination if the call were inlined at a callsite
that passes a constant to the correct param. We also look for cases
where a function parameter feeds unmodified into an interface method
call or indirect call.
Updates #61502.
Change-Id: Iaf7297e19637daeabd0ec72be88d654b545546ae
Reviewed-on: https://go-review.googlesource.com/c/go/+/511561
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Clang 14+ introduced a warning when using mixed packed and unpacked structs.
This can cause problems when taking an address of the unpacked struct, which
may end up having a different alignment than expected.
This is not a problem in cgo, which does not take pointers from the packed
struct.
Fixes#62480
Change-Id: If5879eea5e1b77bc6dc7430f68f8c916bff9b090
Reviewed-on: https://go-review.googlesource.com/c/go/+/526915
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
withTCPConnPair is supposed to return only when both peer functions
have completed. However, due to the use of "defer" it was closing the
peers' connections after the synchronization point instead of before.
Fixes#62542.
Change-Id: I3e06c78984664172ff2d28b0fc582b8182f710f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/526977
Auto-Submit: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Commit-Queue: Bryan Mills <bcmills@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This is an implementation of proposal #61758.
It adds a function to slogtest that runs each test case in a subtest,
instead of running them all at once.
That allows the caller to control which cases are run.
Fixes#61706.
Fixes#61758.
Change-Id: I95108b7b753675203ca7f0f00ccbc242bd9c2a9f
Reviewed-on: https://go-review.googlesource.com/c/go/+/516076
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
CL 177090043 accidentally dropped RDX when converting from C.
Change-Id: I6bf9dc1b1d0c2850967005c048245d1185dcede4
Reviewed-on: https://go-review.googlesource.com/c/go/+/526976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
The stack bounds from pthread are not always accurate, and could
cause seg fault if we run out of the actual stack space before
reaching the bounds. Here we use an artificially small stack bounds
to check overflow without actually running out of the system stack.
Change-Id: I8067c5e1297307103b315d9d0c60120293b57aab
Reviewed-on: https://go-review.googlesource.com/c/go/+/523695
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I0858568d225daba1c318842dc0c9b5e652dff612
Reviewed-on: https://go-review.googlesource.com/c/go/+/526519
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
This indirection is no longer necessary.
Change-Id: Ibb5eb1753febdc17a93ea9c35130e3d2b26c360e
Reviewed-on: https://go-review.googlesource.com/c/go/+/526518
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Across all encoding packages, linkify declarations if possible.
In some cases, we convert a code block into a bulleted list,
which then further allows for more linkification.
Change-Id: I68fedf362615b34228bab5d4859b7d87d831c570
Reviewed-on: https://go-review.googlesource.com/c/go/+/524977
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
No need to indirect through Frontend for this.
Change-Id: I5812eb4dadfda79267cabc9d13aeab126c1479e3
Reviewed-on: https://go-review.googlesource.com/c/go/+/526517
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
This method is only used to find the path of the function being
compiled for hash debugging, but it was instead returning the path of
the package being compiled. These are typically the same, but can be
different for certain functions compiled across package boundaries
(e.g., method value wrappers and generic functions).
It's redundant either with f.fe.Func().Sym().Pkg.Path (package path of
the function being compiled) or f.Config.ctxt.Pkgpath (package path of
the compilation unit), so just remove it instead.
Change-Id: I1daae09055043d0ecb1fcc874a0b0006a6f8bddf
Reviewed-on: https://go-review.googlesource.com/c/go/+/526516
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
Add Config and Cache as params rather than documenting that the caller
has to set them manually.
Change-Id: I8d530be695a0c94bcc4211b496d6e57ec2fff029
Reviewed-on: https://go-review.googlesource.com/c/go/+/526515
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Mostly automated refactoring with gofmt:
gofmt -r 'ir.Orig(n) -> n'
gofmt -r 'ir.SepCopy(n) -> ir.Copy(n)'
Followed by some manual cleanups.
Change-Id: Ib35abeba9e60b70ba463e161fb39358fb058a83e
Reviewed-on: https://go-review.googlesource.com/c/go/+/526398
Reviewed-by: Keith Randall <khr@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The OrigNode functionality used to be relevant to the typecheck
frontend, because we wanted to report errors using the same syntax as
the user originally wrote. However, now that types2 handles all
spec-required error diagnostics, there's no need to preserve original
nodes anymore.
Change-Id: I64a0540b8952513913021e7b84d165beb1f9f801
Reviewed-on: https://go-review.googlesource.com/c/go/+/526397
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Composite literals always have a type now, so the extra fallback code
isn't necessary. But also, to prepare for the upcoming removal of
OrigNode, we need to print OSLICELIT with Implicit set as
"... argument" to satisfy existing regress tests.
Change-Id: I365e879066903eebf1b78e10c1b505565cea3ce3
Reviewed-on: https://go-review.googlesource.com/c/go/+/526396
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
OrigNode will be going away soon, which is the only reason for
ConstExpr to exist. Otherwise, it's identical to BasicLit.
To keep existing code working, change NewConstExpr to construct and
return a BasicLit instead.
Change-Id: I68b43ec1fcaa57e6723f289ce9f953996aeefb14
Reviewed-on: https://go-review.googlesource.com/c/go/+/526395
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
One of the more tedious quirks of the original frontend (i.e.,
typecheck) to preserve was that it preserved the original
representation of constants into the backend. To fit into the unified
IR model, I ended up implementing a fairly heavyweight workaround:
simply record the original constant's string expression in the export
data, so that diagnostics could still report it back, and match the
old test expectations.
But now that there's just a single frontend to support, it's easy
enough to just update the test expectations and drop this support for
"raw" constant expressions.
Change-Id: I1d859c5109d679879d937a2b213e777fbddf4f2f
Reviewed-on: https://go-review.googlesource.com/c/go/+/526376
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Currently, for non-cgo programs, the g0 stack size is 8 KiB on
most platforms. With PGO which could cause aggressive inlining in
the runtime, the runtime stack frames are larger and could
overflow the 8 KiB g0 stack. Increase it to 16 KiB. This is only
one per OS thread, so it shouldn't increase memory use much.
Fixes#62120.
Fixes#62489.
Change-Id: I565b154517021f1fd849424dafc3f0f26a755cac
Reviewed-on: https://go-review.googlesource.com/c/go/+/526995
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The UnspillReg code should always be preemptible because all the arg registers will be saved by runtime.asyncpreempt.
Change-Id: Ie36b5d0cdd1275efcb95661354d83be2e1b00a86
Reviewed-on: https://go-review.googlesource.com/c/go/+/526235
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
CL 513779 added crude skips for tests that couldn't work when run under
'unshare --net --map-root-user' as used by the current iteration of the
no-network check in LUCI. Bryan suggested a more targeted way to detect
when the environment is insufficient, which makes it possible to remove
the builder-specific skip and its slightly incorrect explaining comment.
Updates #30612.
Change-Id: I0de79f44ab94d7f1018384c2e959ca7df3a1b0ae
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest,gotip-linux-amd64-longtest-race
Reviewed-on: https://go-review.googlesource.com/c/go/+/526835
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
This CL adds support for debugger function calls on linux ppc64le
platform. The protocol is basically the same as in CL 395754, except for
the following differences:
1, The abi differences which affect parameter passing and frame layout.
2, The closure register is R11.
3, Minimum framesize on pp64le is 32 bytes
4, Added functions to return parent context structure for general purpose
registers in order to work with the way these structures are defined in
ppc64le
Change-Id: I58e01fedad66a818ab322e2b2d8f5104cfa64f39
Reviewed-on: https://go-review.googlesource.com/c/go/+/512575
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Archana Ravindar <aravinda@redhat.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
https://go.dev/cl/524940 swapped a call to Slice with Bytes,
but the comment below still referenced Slice.
Change-Id: Iedc772e1c49c4108bcd06f4cea0e637f011d053c
Reviewed-on: https://go-review.googlesource.com/c/go/+/526356
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: t hepudds <thepudds1460@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Add R_MIPS_PC32 which is a 32 bit PC relative relocation.
These are produced by LLVM on mips64.
Fixes#61974
Change-Id: I7b6c6848e40249e6d5ea474ea53c9d7e3ab23f88
Reviewed-on: https://go-review.googlesource.com/c/go/+/469395
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Junxian Zhu <zhujunxian@oss.cipunited.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Replace a "fixme" with a more appropriate error. Also invert the condition
so that the error returns early, which is more Go idiomatic.
Change-Id: I03006572c4010fb47037bed3ee1fd7f92bfc20d3
Reviewed-on: https://go-review.googlesource.com/c/go/+/523457
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: M Zhuo <mzh@golangcn.org>
Change-Id: I68be4110216145ad1fb2e5095e1f2b143f9e69ac
Reviewed-on: https://go-review.googlesource.com/c/go/+/523456
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
Reviewed-by: M Zhuo <mzh@golangcn.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Rather than handling shift based scaling in two locations, rework logic
so there is a single exit path.
Change-Id: I832b4932d53183736050059a11019ced08281b3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/523455
Reviewed-by: M Zhuo <mzh@golangcn.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Mark Ryan <markdryan@rivosinc.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Just send the go list stderr to our stderr.
Change-Id: Iacda573bbe7accbcecb6a957e5d42b55afd10c58
Reviewed-on: https://go-review.googlesource.com/c/go/+/526775
Reviewed-by: Bryan Mills <bcmills@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Having to pass a dummy pointer to the libcall.args field is a bit
annoying. This change allows nil to be passed instead.
windows/arm and windows/arm64 already support nil libcall.args.
Change-Id: I07a2bdb7d1f76b13d125397ff5177337c43536a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/526016
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
ptracePtr was introduced in CL 470299 for darwin but it's not used on
this platform. Also, the argument types for addr and data were swapped
in the generated ptrace1Ptr (probably because the change was not
generated but done manually).
For #58387
Change-Id: I429ab0c741e19020d98729c34efabce1d9003f56
Reviewed-on: https://go-review.googlesource.com/c/go/+/526475
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Since #47066 was accepted and implemented,
reflect.Value.Bytes can be called directly on addressable arrays,
so there is no longer a need to go through a slice first.
Change-Id: I04d50ddb1b38e7a37fee3dc8be1bd03b22a06a1c
Reviewed-on: https://go-review.googlesource.com/c/go/+/526357
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Unlike RLWNM, the ISA only supports an immediate rotate operand.
Update optab and opirrr to avoid quietly assembling this insn.
Change-Id: I1472a431cb8a870d55d5fff79ab905c4c459f630
Reviewed-on: https://go-review.googlesource.com/c/go/+/449835
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
The SysProcAttr is OS-specific anyway, so it makes little sense to say
that some fields are Linux-specific (they all are anyway).
While at it, make sure to use complete sentences (add missing periods).
Change-Id: Ic0afe3920c2561fd9a657f4edab21939a8f56d57
Reviewed-on: https://go-review.googlesource.com/c/go/+/525395
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Includes cleanup and deduplication.
fixes: #33970
Change-Id: I7e84b3e5c8fb9c560cf0a1f8b7cbb7a6977666aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/511935
Reviewed-by: Rob Pike <r@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Add PidFD support, so that if the PidFD pointer in SysProcAttr is not
nil, ForkExec (and thus all its users) obtains a pidfd from the kernel
during clone(), and writes the result (or -1, if the functionality
is not supported by the kernel) into *PidFD.
The functionality to get pidfd is implemented for both clone3 and clone.
For the latter, an extra argument to rawVforkSyscall is needed, thus the
change in asm files.
Add a trivial test case checking the obtained pidfd can be used to send
a signal to a process, using pidfd_send_signal. To test clone3 code path,
add a flag available to tests only.
Updates #51246.
Change-Id: I2212b69e1a657163c31b4a6245b076bc495777a3
Reviewed-on: https://go-review.googlesource.com/c/go/+/520266
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Kirill Kolyshkin <kolyshkin@gmail.com>
Change-Id: I89c607ee40358d6d650ba0ea1f05ce7d1df698bd
GitHub-Last-Rev: e78a371180
GitHub-Pull-Request: golang/go#62319
Reviewed-on: https://go-review.googlesource.com/c/go/+/523376
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Rob Pike <r@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Change-Id: I89a4d7f4af8dfb67a35647283be6c1d2965595f5
GitHub-Last-Rev: f7c11c156c
GitHub-Pull-Request: golang/go#62389
Reviewed-on: https://go-review.googlesource.com/c/go/+/524735
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Rob Pike <r@golang.org>
Change-Id: I76b2dd45179f65e9ed4f1d0f597ca59e49b59a85
GitHub-Last-Rev: b4171e6b83
GitHub-Pull-Request: golang/go#62374
Reviewed-on: https://go-review.googlesource.com/c/go/+/524356
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Rob Pike <r@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Currently we include these symbols in bootstrap code.
Change-Id: I19b504237b0344f0e87cda0fbe651811c72daba1
GitHub-Last-Rev: 5134baec38
GitHub-Pull-Request: golang/go#62368
Reviewed-on: https://go-review.googlesource.com/c/go/+/524258
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This reapplies CL 191759, which was reverted in CL 192622.
Wine fixed the compatibility issue more than 3 years
ago, in version 5.10 (see [1]). We no longer have to keep the compatibility hack on our side.
Updates #34021
[1]: 1ae1088964
Change-Id: I3b77701d01fdf58fbf350321fc0a957c0f247d32
Reviewed-on: https://go-review.googlesource.com/c/go/+/526358
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Quim Muntal <quimmuntal@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
When I added this test in CL 514135, I missed the timeRE,
we should use it to make this test more precise.
Change-Id: I486f8e8bbbc3a17166107ef361d242ddf4ea2928
Reviewed-on: https://go-review.googlesource.com/c/go/+/525556
Run-TryBot: Andy Pan <panjf2000@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>