Test is in os/signal package because the problem is signal related.
Fixes#22838.
Change-Id: I223eeebb5fbc972910737eddef8ab9784cb984a6
Reviewed-on: https://go-review.googlesource.com/79215
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This updates the name of the IDE and the capability it has.
Fixes#22784
Change-Id: Ief261324c86bc77a03071629f496f4d4d9df1b44
Reviewed-on: https://go-review.googlesource.com/79255
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
CL 76551 modified inline_callers.go to build everything, including the
runtime, with -l=4. While that works in most places (and ideally
should work everywhere), it blows out the nosplit stack on
solaris/amd64.
Fix this by only building the test itself with -l=4.
This undoes some of the changes to this test from CL 73212, which
originally changed the go tool to rebuild all packages with the given
flags. This change modified the expected output of this test, so now
that we can go back to building only the test itself with inlining, we
revert these changes to the expected output. (That CL also changed
log.Fatalf to log.Printf, but didn't add "\n" to the end of the lines,
so this CL fixes that, too.)
Fixes#22797.
Change-Id: I6a91963a59ebe98edbe0921d8717af6b2c2191b0
Reviewed-on: https://go-review.googlesource.com/79197
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
CL 78538 was updated after running TryBots to depend on
syscall.NanoSleep which isn't available on all non-Linux platforms.
Change-Id: I1fa615232b3920453431861310c108b208628441
Reviewed-on: https://go-review.googlesource.com/79175
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Tzinfo was replaced with TZData during the review of CL 68890, but this
instance was forgotten. Update it for consistency.
Follows CL 68890.
Updates #20629.
Change-Id: Id6d3c4f5f7572b01065f2db556db605452d1b570
Reviewed-on: https://go-review.googlesource.com/79176
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Fixes VBLENDVP{D/S}, VPBLENDVB encoding for /is4 imm8[7:4]
encoded register operand.
Explanation:
`reg[r]+regrex[r]+1` will yield correct values for 8..15 reg indexes,
but for 0..7 it gives `index+1` results.
There was no test that used lower 8 register with /is4 encoding,
so the bug passed the tests.
The proper solution is to get 4th bit from regrex with a proper shift:
`reg[r]|(regrex[r]<<1)`.
Instead of inlining `reg[r]|(regrex[r]<<1)` expr,
using new `regIndex(r)` function.
Test that reproduces this issue is added to
amd64enc_extra.s test suite.
Bug came from https://golang.org/cl/70650.
Change-Id: I846a25e88d5e6df88df9d9c3f5fe94ec55416a33
Reviewed-on: https://go-review.googlesource.com/78815
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
The section about custom pprof paths referenced the wrong path.
This also fixes a couple minor grammatical issues elsewhere in the doc.
Fixes#22832
Change-Id: I890cceb53a13c1958d9cf958c658ccfcbb6863d5
Reviewed-on: https://go-review.googlesource.com/79035
Reviewed-by: Alberto Donizetti <alb.donizetti@gmail.com>
Some type renames were missing in the android file from CL 79017
Change-Id: I419215575ca7975241afb8d2069560c8b1d142c6
Reviewed-on: https://go-review.googlesource.com/79136
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The return values of the LoadLocation are inherently dependent
on the runtime environment. Add LoadLocationFromTZData, whose
results depend only on the timezone data provided as arguments.
Fixes#20629
Change-Id: I43b181f4c05c219be3ec57327540263b7cb3b2aa
Reviewed-on: https://go-review.googlesource.com/68890
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Relax the 'phi after non-phi' SSA sanity check to allow
RegKill ops interspersed with phi ops in a block. This fixes
a sanity check failure when -dwarflocationlists is enabled.
Updates #22694.
Change-Id: Iaae604ab6f1a8b150664dd120003727a6fb2f698
Reviewed-on: https://go-review.googlesource.com/77610
Run-TryBot: Than McIntosh <thanm@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
-N does not disable escape analysis. Remove the outdated comment.
Change-Id: I96978b3afd51324b7b4f8035cf4417fb2eac4ebc
Reviewed-on: https://go-review.googlesource.com/79015
Reviewed-by: David Chase <drchase@google.com>
This allows LoadTimezoneFromTZData to have a parameter named data.
Change-Id: I11c115745c7f697244f806bcd654f697dab73de1
Reviewed-on: https://go-review.googlesource.com/79017
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This changes the assembly language output to use the
innermost (instead of outermost) position for line
number and file.
The file is printed separately, only when it changes,
to remove redundant and space-consuming noise from the
output.
Unknown positions have line number "?"
The output format was changed slightly to make it
easier to read.
One source of gratuitous variation in debugging output was
removed.
Change-Id: I1fd9c8b0ddd82766488582fb684dce4b04f35723
Reviewed-on: https://go-review.googlesource.com/78895
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Go's DWARF usually has absolute paths, in which case DW_AT_comp_dir
doesn't matter. But the -trimpath flag produces relative paths, and
then the spec says that they are relative to _comp_dir.
There's no way to know what the "right" value of _comp_dir is without
more user input, but we can at least leave the paths alone rather than
making them absolute.
After this change, Delve can find sources to a program built with
-gcflags=-trimpath=$(pwd) as long as it's run in the right directory.
Change-Id: I8bc7bed098e352d2c06800bfbbe14e8392e1bbed
Reviewed-on: https://go-review.googlesource.com/78415
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Russ Cox <rsc@golang.org>
The arguments <pstatefield> is a struct that includes two elements,
element reg is special register, elememt enc is pstate field values.
The current code compares two different type values and get a incorrect
result.
The fix follows pstate field to create a systemreg struct,
each system register has a vaule to use in instruction.
Uncomment the msr/mrs cases.
Fixes#21464
Change-Id: I1bb1587ec8548f3e4bd8d5be4d7127bd10d53186
Reviewed-on: https://go-review.googlesource.com/56030
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Improve the error message for wrong
case-field names in composite literals,
by mentioning the correct field name.
Given the program:
package main
type it struct {
ID string
}
func main() {
i1 := &it{id: "Bar"}
}
just like we do for usage of fields, we now
report wrongly cased fields as hints to give:
ts.go:8:14: unknown field 'id' in struct literal of type it (but does have ID)
instead of before:
ts.go:8:14: unknown field 'id' in struct literal of type it
Fixes#22794
Change-Id: I18cd70e75817025cb1df083503cae306e8d659fd
Reviewed-on: https://go-review.googlesource.com/78545
Run-TryBot: Emmanuel Odeke <emm.odeke@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
When instruction has only one argument, Go parser saves the
argument value into prog.From without any special handling.
But assembler gets the argument value from prog.To.
The fix adds special handling for CLREX and puts other instructions
arguments value into prog.From.
Uncomment hlt/hvc/smc/brk/dcps1/dcps2/dcps3/clrex test cases.
Fixes#20765
Change-Id: I1fc0d2faafb19b537cab5a665bd4af56c3a2c925
Reviewed-on: https://go-review.googlesource.com/78275
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
That can occur if we have -u set and there is an upper- and lower-case
name of the same spelling in a single declaration.
A rare corner case but easy to fix.
Fix by remembering what we've printed.
Fixes#21797.
Change-Id: Ie0b681ae8c277fa16e9635ba594c1dff272b8aeb
Reviewed-on: https://go-review.googlesource.com/78715
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
In golang.org/cl/59413, the two-argument behavior of cmd/doc was changed
to use findPackage instead of build.Import, meaning that the tool was
more consistent and useful.
However, it introduced a regression:
$ go doc bytes Foo
doc: no such package: bytes
This is because the directory list search would not find Foo in bytes,
and reach the end of the directory list - thus resulting in a "no such
package" error, since no directory matched our first argument.
Move the "no such package" error out of parseArgs, so that the "loop
until something is printed" loop can have control over it. In
particular, it is useful to know when we have reached the end of the
list without any exact match, yet we did find one package matching
"bytes":
$ go doc bytes Foo
doc: no symbol Foo in package bytes
While at it, make the "no such package" error not be fatal so that we
may test for it. It is important to have the test, as parseArgs may now
return a nil package instead of exiting the entire program, potentially
meaning a nil pointer dereference panic.
Fixes#22810.
Change-Id: I90cc6fd755e2d1675bea6d49a1c13cc18ac9bfb9
Reviewed-on: https://go-review.googlesource.com/78677
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rob Pike <r@golang.org>
As per the comments in golang.org/cl/78617. Also leaving a comment here,
to make sure noone else thinks to re-introduce the iota like I did.
Change-Id: I2a2275998b81896eaa0e9d5ee0197661ebe84acf
Reviewed-on: https://go-review.googlesource.com/78676
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Also, this commit adds a test for ensuring that TestMain(t *testing.T) is a normal test.
Fixes#22388
Change-Id: Iffcb1db5cdcf34b9c822fcdb58f8926535415177
Reviewed-on: https://go-review.googlesource.com/72591
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This is a regression introduced in golang.org/cl/28817. That change got
rid of the iota, which meant that the type was no longer applied to all
the constant names.
Re-add the iota starting at -1, simplifying the code and adding the
types once more.
Change-Id: I38bd0e04f8d298196bccd33651e29f5011401a8d
Reviewed-on: https://go-review.googlesource.com/78617
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
They were added in CL 78175 but doesn't run on Android (yet). Skip
them for now.
For the Android builders.
Change-Id: I3b4bfe1f0d820ab98cf50aaab1ee2fad1a44a851
Reviewed-on: https://go-review.googlesource.com/78615
Run-TryBot: Elias Naur <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Copying ensures that we respect the NTFS permissions of the parent folder.
I don't know if there is a way to tell when it is safe to simply rename.
Fixes#22343
Change-Id: I424bfe655b53b0e0fe425ce92bbc15450d52d851
Reviewed-on: https://go-review.googlesource.com/72910
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Alex Brainman <alex.brainman@gmail.com>
Check for the expected number of arguments in a SQL statement
after arguments are eliminated in the argument converter.
This situation was already tested for in TestNamedValueChecker.
However the test used Exec which didn't have any check for
NumInput on it at all, thus this issue was never caught.
In addition to moving the NumInput check on the Query
methods after the converter, add the NumInput check
to the Exec methods as well.
Fixes#22630
Change-Id: If45920c6e1cf70dca63822a0cedec2cdc5cc611c
Reviewed-on: https://go-review.googlesource.com/76732
Run-TryBot: Daniel Theophanes <kardianos@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
In a previous change to cmd/dist/test.go to fix some pie
testcases, a few other tests were incorrectly dropped.
This returns the testcases that shouldn't have been removed.
Fixes#22708
Change-Id: I2f735f4fd3a378f0f45d12a99768638aeb4787c7
Reviewed-on: https://go-review.googlesource.com/77650
Run-TryBot: Russ Cox <rsc@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Some C types are declared as pointers, but C code
stores non-pointers in them. When the Go garbage
collector sees such a pointer, it gets unhappy.
Instead, for these types represent them on the Go
side with uintptr.
We need this change to handle Apple's CoreFoundation
CF*Ref types. Users of these types might need to
update their code like we do in root_cgo_darwin.go.
The only change that is required under normal
circumstances is converting some nils to 0.
A go fix module is provided to help.
Fixes#21897
RELNOTE=yes
Change-Id: I9716cfb255dc918792625f42952aa171cd31ec1b
Reviewed-on: https://go-review.googlesource.com/66332
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
I noticed some files prefixed with ssa_fg_tmp in the /tmp folder of
the s390x builder. runGenTest (a helper for TestGenFlowGraph) wasn't
deleting its temporary files. The distinct prefix made this easy to
figure out.
Change-Id: If0d608aaad04a414e74e29f027ec9443c626e4eb
Reviewed-on: https://go-review.googlesource.com/78475
Reviewed-by: David Chase <drchase@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
Enables AVX2 gather instructions and VSIB support,
which makes vm32{x,y} vm64{x,y} operands encodable.
AXXX constants placed with respect to sorting order.
New VEX optabs inserted near non-VEX entries to simplify
potential transition to auto-generated VSIB optabs.
Tests go into new AMD64 encoder test file (amd64enc_extra.s)
to avoid unnecessary interactions with auto-generated "amd64enc.s".
Side note: x86avxgen did not produced these instructions
because x86.v0.2.csv misses them.
This also explains why x86 test suite have no AVX2 gather
instructions tests.
List of new instructions:
VGATHERPDP
VGATHERDPS
VGATHERQPD
VGATHERQPS
VPGATHERDD
VPGATHERDQ
VPGATHERQD
VPGATHERQQ
Change-Id: Iac852f3c5016523670bd99de6bec6a48f66fb4f6
Reviewed-on: https://go-review.googlesource.com/77970
Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ilya Tocar <ilya.tocar@intel.com>
The RFC is a little ambiguous here: “the subject field contains an empty
sequence” could mean that it's a non-empty sequence where one of the
sets contains an empty sequence. But, in context, I think it means “the
subject field is an empty sequence”.
Fixes#22249
Change-Id: Idfe1592411573f6e871b5fb997e7d545597a0937
Reviewed-on: https://go-review.googlesource.com/70852
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
CL 71030 enforced EKU nesting at verification time, to go along with the
change in name constraints behaviour. From scanning the Certificate
Transparency logs, it's clear that some CAs are not getting EKU nesting
correct.
This change relaxes the EKU rules in a few ways:
∙ EKUs in roots are no longer checked.
∙ Any CA certificate may issue OCSP responder certificates.
∙ The ServerAuth and SGC EKUs are treated as a single EKU when
checking nesting.
∙ ServerAuth in a CA can now authorise ClientAuth.
∙ The generic CodeSigning EKU can now authorise two, Microsoft-specific
code-signing EKUs.
Change-Id: I7b7ac787709af0dcd177fe419ec2e485b8d85540
Reviewed-on: https://go-review.googlesource.com/77330
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The GeneralSubtree structure can have additional elements after the name
(minimum and maximum, which are unused). Previously these fields, if
present, would cause a parse error. This change allows trailing data in
the GeneralSubtrees structure.
Change-Id: I6bfb11ec355fa6812810a090c092a5ee0fdeddc3
Reviewed-on: https://go-review.googlesource.com/77333
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This reverts commit 6a3d4be3b8.
Reason for revert: breaks various builds. See comments on CL 77670
Change-Id: Iaf3260319b560f49ace06af705a2114630f32063
Reviewed-on: https://go-review.googlesource.com/78515
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
The locations chosen for racewalking inserted code can
be wrong and thus cause unwanted next/step behavior in
debuggers. Forcing the positions to be unset results in
better behavior.
Test added, and test harness corrected to deal with
changes to gdb's output caused by -racewalk.
Incidental changes in Delve (not part of the usual testing,
but provided because we care about Delve) also reflected
in this CL.
Fixes#22600.
Change-Id: Idd0218afed52ab8c68efd9eabbdff3c92ea2b996
Reviewed-on: https://go-review.googlesource.com/78336
Run-TryBot: David Chase <drchase@google.com>
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Adding s390x to the list of architectures that support c-shared and c-archive.
Required adding load-time initialization (via _rt0_s390x_linux_lib) and adding s390x
to the c-shared and c-archive tests.
Change-Id: I75883b2891c310fe8ce7f08c27b06895c074e123
Reviewed-on: https://go-review.googlesource.com/74910
Reviewed-by: Michael Munday <mike.munday@ibm.com>
I experimented with changing the write barrier to take the value in SI
rather than AX to improve register allocation. It had no effect on
performance and only made the "hello world" text 0.07% smaller, so
let's just remove the comment.
Change-Id: I6a261d14139b7a02a8467b31e74951dfb927ffb4
Reviewed-on: https://go-review.googlesource.com/78033
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Rick Hudson <rlh@golang.org>
While driver.Connector was previously added to allow non-string
connection arguments and access to the context, most users of
the sql package will continue to rely on a string DSN.
Allow drivers to implement a string DSN to Connector interface
that both allows a single parsing of the string DSN and uses
the Connector interface which passes available context to
the driver dialer.
Fixes#22713
Change-Id: Ia0b862262f4c4670effe2538d0d6d43733fea18d
Reviewed-on: https://go-review.googlesource.com/77550
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
I realized this simplification was possible when writing the vet loop
(just above the code being modified here) but never circled back
to make the compiler loop match.
Change-Id: Ic2277d2a4b6d94ea4897cc3615fc1a29f2fb243c
Reviewed-on: https://go-review.googlesource.com/78395
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>