FreeBSD/386 and NetBSD/386 diverged between Go 1.4 and Go 1.5 when
Russ sent https://golang.org/cl/135830043 (git rev 25f6b02ab0db8e)
to change the calling convention of the C compilers to match Go.
But netbsd wasn't updated.
Tested on a NetBSD/386 VM, since the builders aren't back up yet (due
to this bug)
David Chase [Mon, 27 Nov 2017 23:06:17 +0000 (18:06 -0500)]
cmd/compile: adjust lineno during import to get Pos right
Binary import sometimes constructs nodes using functions
that use the global lineno for the Position. This causes
spurious numbers to appear in the assembly and the
debugging output.
Fix (targeted, because late in the cycle): save and restore
lineno around bimport calls known to use lineno-sensitive
functions.
Updates #22600.
(Comment: "This is a weird line to step through")
Change-Id: I9c4094670380609fe4b6696443fb02579521c596
Reviewed-on: https://go-review.googlesource.com/80115
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Change-Id: I9129130aafbfc7d0d7e9b674b6fc6cb31b7381be
Reviewed-on: https://go-review.googlesource.com/64910 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Brad Fitzpatrick [Mon, 27 Nov 2017 21:45:58 +0000 (21:45 +0000)]
net/http: document streaming nature of Response.Body
Fixes #22873
Change-Id: Ib2b7ee42a23b84db21cdfa693b62d5e6fbfdb54e
Reviewed-on: https://go-review.googlesource.com/80075 Reviewed-by: Tom Bergan <tombergan@google.com>
Brad Fitzpatrick [Mon, 27 Nov 2017 22:48:11 +0000 (22:48 +0000)]
net/http: panic on invalid WriteHeader status code
Panic if an http Handler does:
rw.WriteHeader(0)
... or other invalid values. (for a forgiving range of valid)
I previously made it kinda work in https://golang.org/cl/19130 but
there's no good way to fake it in HTTP/2, and we want HTTP/1 and
HTTP/2 behavior to be the same, regardless of what programs do.
Currently HTTP/2 omitted the :status header altogether, which was a
protocol violation. In fixing that, I found CL 19130 added a test
about bogus WriteHeader values with the comment:
// This might change at some point, but not yet in Go 1.6.
This now changes. Time to be strict.
Updates golang/go#228800
Change-Id: I20eb6c0e514a31f4bba305ac4c24266f39b95fd5
Reviewed-on: https://go-review.googlesource.com/80077 Reviewed-by: Tom Bergan <tombergan@google.com>
Tom Bergan [Mon, 27 Nov 2017 19:25:14 +0000 (11:25 -0800)]
net/textproto: reject all headers with a leading space
Previously, golang.org/cl/75350 updated ReadMIMEHeader to ignore the
first header line when it begins with a leading space, as in the
following example:
GET / HTTP/1.1
Host: foo.com
Accept-Encoding: gzip
However, golang.org/cl/75350 changed ReadMIMEHeader's behavior for the
following example: before the CL it returned an error, but after the
CL it ignored the first line.
GET / HTTP/1.1
Host foo.com
Accept-Encoding: gzip
This change updates ReadMIMEHeader to always fail when the first header
line starts with a space. During the discussion for golang.org/cl/75350,
we realized we had three competing needs:
1. HTTP clients should accept malformed response headers when possible
(ignoring the malformed lines).
2. HTTP servers should reject all malformed request headers.
3. The net/textproto package is used by multiple protocols (most notably,
HTTP and SMTP) which have slightly different parsing semantics. This
complicates changes to net/textproto.
We weren't sure how to best fix net/textproto without an API change, but
it is too late for API changes in Go 1.10. We decided to ignore initial
lines that begin with spaces, thinking that would have the least impact on
existing users -- malformed headers would continue to parse, but the
initial lines would be ignored. Instead, golang.org/cl/75350 actually
changed ReadMIMEHeader to succeed in cases where it previously failed
(as in the above example).
Reconsidering the above two examples, there does not seem to be a good
argument to silently ignore ` Host: foo.com` but fail on ` Host foo.com`.
Hence, this change fails for *all* headers where the initial line begins
with a space.
Updates #22464
Change-Id: I68d3d190489c350b0bc1549735bf6593fe11a94c
Reviewed-on: https://go-review.googlesource.com/80055
Run-TryBot: Tom Bergan <tombergan@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Robert Griesemer [Tue, 21 Nov 2017 05:54:41 +0000 (21:54 -0800)]
go/types: add debugging code to detect use of incomplete interfaces
The comment for phase 2 of checker.interfaceType (typexpr.go:517)
requires that embedded interfaces be complete for correctness of
the algorithm.
Yet, the very next comment (typexpr.go:530) states that underlying
embedded interfaces may in fact be incomplete.
This is in fact the case and the underlying bug in issue #18395.
This change makes sure that new interface types are marked complete
when finished (per the implicit definition in Interface.Complete,
type.go:302). It also adds a check, enabled in debug mode only, to
detect the use of incomplete embedded interfaces during construction
of a new interface. In debug mode, this check fails for the testcase
in the issue (and several others).
This change has no noticeable impact with debug mode disabled.
For #18395.
Change-Id: Ibb81e47257651282fb3755a80a36ab5d392e636d
Reviewed-on: https://go-review.googlesource.com/78955 Reviewed-by: Alan Donovan <adonovan@google.com>
Brian Kessler [Fri, 23 Jun 2017 08:50:14 +0000 (01:50 -0700)]
math/cmplx: use signed zero to correct branch cuts
Branch cuts for the elementary complex functions along real or imaginary axes
should be resolved in floating point calculations by one-sided continuity with
signed zero as described in:
"Branch Cuts for Complex Elementary Functions or Much Ado About Nothing's Sign Bit"
W. Kahan
Available at: https://people.freebsd.org/~das/kahan86branch.pdf
And as described in the C99 standard which is claimed as the original cephes source.
Sqrt did not return the correct branch when imag(x) == 0. The branch is now
determined by sign(imag(x)). This incorrect branch choice was affecting the behavior
of the Trigonometric/Hyperbolic functions that use Sqrt in intermediate calculations.
Asin, Asinh and Atan had spurious domain checks, whereas the functions should be valid
over the whole complex plane with appropriate branch cuts.
Austin Clements [Fri, 24 Nov 2017 15:12:44 +0000 (10:12 -0500)]
runtime: fix final stack split in exitsyscall
exitsyscall should be recursively nosplit, but we don't have a way to
annotate that right now (see #21314). There's exactly one remaining
place where this is violated right now: exitsyscall -> casgstatus ->
print. The other prints in casgstatus are wrapped in systemstack
calls. This fixes the remaining print.
Updates #21431 (in theory could fix it, but that would just indicate
that we have a different G status-related crash and we've *never* seen
that failure on the dashboard.)
Emmanuel Odeke [Thu, 23 Nov 2017 22:31:28 +0000 (15:31 -0700)]
runtime: tweak doc for Goexit
Use singular form of panic and remove the unnecessary
'however', when comparing Goexit's behavior to 'a panic'
as well as what happens for deferred recovers with Goexit.
Change-Id: I3116df3336fa135198f6a39cf93dbb88a0e2f46e
Reviewed-on: https://go-review.googlesource.com/79755 Reviewed-by: Rob Pike <r@golang.org>
Tobias Klauser [Thu, 23 Nov 2017 10:21:06 +0000 (11:21 +0100)]
syscall: remove dragonfly/386 from mkall.sh
dragonfly/386 isn't a valid GOOS/GOARCH pair and there are no generated
files for this pair in syscall.
Change-Id: Ibea2103c2f5e139139d850df3aac9b5a9c4ac9ab
Reviewed-on: https://go-review.googlesource.com/79675 Reviewed-by: Ian Lance Taylor <iant@golang.org>
David du Colombier [Thu, 23 Nov 2017 11:46:18 +0000 (12:46 +0100)]
net: skip TestLookupLongTXT on Plan 9
CL 79555 added TestLookupLongTXT. However, this test is
failing on Plan 9, because the DNS resolver (ndb/dns)
only returns a single TXT record.
Updates #22857.
Change-Id: I33cdc63a3d3de4d1c7f2684934316c44992fb9e2
Reviewed-on: https://go-review.googlesource.com/79695
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Austin Clements [Thu, 23 Nov 2017 02:58:57 +0000 (21:58 -0500)]
runtime: document sigtrampgo better
Add an explanation of why sigtrampgo is nosplit.
Updates #21314.
Change-Id: I3f5909d2b2c180f9fa74d53df13e501826fd4316
Reviewed-on: https://go-review.googlesource.com/79615 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Tom Lanyon [Tue, 7 Nov 2017 05:16:24 +0000 (16:16 +1100)]
os/exec: update docs for cmd.Std{out,err} and cmd.Wait to clarify how copying is done
Fixes #22610.
Change-Id: I172fe1d1941a8a2750af7ee75f7af7e81a702c40
Reviewed-on: https://go-review.googlesource.com/76320 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Austin Clements [Wed, 22 Nov 2017 20:29:03 +0000 (15:29 -0500)]
runtime: print runtime frames in throwsplit trace
newstack manually prints the stack trace if we try to grow the stack
when throwsplit is set. However, the default behavior is to omit
runtime frames. Since runtime frames can be critical to understanding
this crash, this change fixes this traceback to include them.
Updates #21431.
Change-Id: I5aa43f43aa2f10a8de7d67bcec743427be3a3b5d
Reviewed-on: https://go-review.googlesource.com/79518
Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Austin Clements [Wed, 22 Nov 2017 20:26:35 +0000 (15:26 -0500)]
runtime: call throw on systemstack in exitsyscall
If exitsyscall tries to grow the stack it will panic, but throw calls
print, which can grow the stack. Move the two bare throws in
exitsyscall to the system stack.
Updates #21431.
Change-Id: I5b29da5d34ade908af648a12075ed327a864476c
Reviewed-on: https://go-review.googlesource.com/79517
Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Daniel Martí [Wed, 22 Nov 2017 18:21:39 +0000 (18:21 +0000)]
cmd/vet: add missing %v to the verb regex
In golang.org/cl/74352, the print rules were overhauled to give better
error messages. This also meant adding a regex to find and extract the
used formatting verbs.
However, %v was missed. Add it to the expression, and add a test too.
Kevin Burke [Mon, 31 Jul 2017 04:14:10 +0000 (21:14 -0700)]
os/user: fix darwin GetGroupIds for n > 256
If a Mac user has more than 256 groups, getGroupList returns -1 but
does not correctly set n. We need to retry the syscall with an
ever-increasing group size until we get all of the user's groups.
The easiest way to test this change is to set n to a value lower than
the current user's number of groups, test on a Mac and observe
a failure, then apply the patch and test that it passes.
Austin Clements [Tue, 21 Nov 2017 22:19:43 +0000 (17:19 -0500)]
runtime/debug: make SetGCPercent(-1) wait for concurrent GC
Currently, SetGCPercent(-1) disables GC, but doesn't wait for any
currently running concurrent GC to finish, so GC can still be running
when it returns. This is a change in behavior from Go 1.8, probably
defies user expectations, and can break various runtime tests that
depend on SetGCPercent(-1) to disable garbage collection in order to
prevent preemption deadlocks.
Fix this by making SetGCPercent(-1) block until any concurrently
running GC cycle finishes.
Fixes #22443.
Change-Id: I904133a34acf97a7942ef4531ace0647b13930ef
Reviewed-on: https://go-review.googlesource.com/79195
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Keith Randall [Tue, 21 Nov 2017 15:14:11 +0000 (07:14 -0800)]
cmd/compile: fix mapassign_fast* routines for pointer keys
The signature of the mapassign_fast* routines need to distinguish
the pointerness of their key argument. If the affected routines
suspend part way through, the object pointed to by the key might
get garbage collected because the key is typed as a uint{32,64}.
This is not a problem for mapaccess or mapdelete because the key
in those situations do not live beyond the call involved. If the
object referenced by the key is garbage collected prematurely, the
code still works fine. Even if that object is subsequently reallocated,
it can't be written to the map in time to affect the lookup/delete.
Fixes #22781
Change-Id: I0bbbc5e9883d5ce702faf4e655348be1191ee439
Reviewed-on: https://go-review.googlesource.com/79018
Run-TryBot: Keith Randall <khr@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Martin Möhrmann <moehrmann@google.com>
Tim Wright [Wed, 22 Nov 2017 03:11:56 +0000 (19:11 -0800)]
syscall: add missing fs locking in Link, Rename on nacl
Per the comments at the head of fs_nacl.go, unexported methods expect
the fs mutex to have been taken by the caller.
This change brings Link and Rename into line with the other exported
functions wrt fs locking.
Brad Fitzpatrick [Wed, 22 Nov 2017 01:38:40 +0000 (01:38 +0000)]
doc: update the URL of the latest go1.4 source snapshot
Updates golang/go#20672
Change-Id: I3c62b1606aec93e188255f1701c0af569d540016
Reviewed-on: https://go-review.googlesource.com/79276 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Austin Clements [Tue, 21 Nov 2017 22:55:18 +0000 (17:55 -0500)]
test: make inline_callers.go test not inline the runtime
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.)
isharipo [Mon, 20 Nov 2017 17:56:05 +0000 (20:56 +0300)]
cmd/internal/obj/x86: fix /is4 encoding for VBLEND
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.
Michael Pratt [Mon, 20 Nov 2017 19:01:00 +0000 (11:01 -0800)]
runtime: skip netpoll check if there are no waiters
If there are no netpoll waiters then calling netpoll will never find any
goroutines. The later blocking netpoll in findrunnable already has this
optimization.
With golang.org/cl/78538 also applied, this change has a small impact on
latency:
Jamie Liu [Wed, 15 Nov 2017 20:47:22 +0000 (12:47 -0800)]
runtime: only sleep before stealing work from a running P
The sleep in question does not make sense if the stolen-from P cannot
run the stolen G. The usleep(3) has been observed delaying execution of
woken G's by ~60us; skipping it reduces the wakeup-to-execution latency
to ~7us in these cases, improving CPU utilization.
Florian Uekermann [Fri, 6 Oct 2017 15:16:43 +0000 (17:16 +0200)]
time: enable Location loading from user provided timezone data
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.
Than McIntosh [Tue, 14 Nov 2017 18:56:18 +0000 (13:56 -0500)]
cmd/compile: ignore RegKill ops for non-phi after phi check
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>
Heschi Kreinick [Thu, 16 Nov 2017 21:19:19 +0000 (16:19 -0500)]
cmd/link: use . as DW_AT_comp_dir
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.
fanzha02 [Tue, 13 Jun 2017 11:07:34 +0000 (11:07 +0000)]
cmd/internal/obj/arm64: fix assemble msr/mrs bug
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.
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.
Daniel Martí [Sun, 19 Nov 2017 17:28:46 +0000 (17:28 +0000)]
cmd/doc: print a symbol error on "bytes Foo"
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>
Kunpei Sakai [Mon, 23 Oct 2017 06:27:04 +0000 (15:27 +0900)]
testing: fix invalid error message about argument of TestMain
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>
Daniel Martí [Sat, 18 Nov 2017 15:53:53 +0000 (15:53 +0000)]
bytes: make all readOp constants actually typed
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.
Ian Lance Taylor [Tue, 24 Oct 2017 14:22:26 +0000 (07:22 -0700)]
cmd/go: always copy files on Windows
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>
Daniel Theophanes [Thu, 9 Nov 2017 22:14:44 +0000 (14:14 -0800)]
database/sql: check for arg counts after eliminating arguments
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>
Lynn Boger [Tue, 14 Nov 2017 20:50:38 +0000 (15:50 -0500)]
cmd/dist: return dropped tests from misc/cgo/test
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>
Keith Randall [Tue, 26 Sep 2017 22:14:50 +0000 (15:14 -0700)]
cmd/cgo: special case C ptr types to use uintptr
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>
Michael Munday [Fri, 17 Nov 2017 10:01:06 +0000 (10:01 +0000)]
cmd/compile: delete temporary files when test finishes
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.
isharipo [Wed, 15 Nov 2017 17:56:10 +0000 (20:56 +0300)]
cmd/internal/obj/x86: add AVX2 gather and VSIB
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
Adam Langley [Fri, 13 Oct 2017 22:36:01 +0000 (15:36 -0700)]
crypto/x509: always emit a critical SAN extension if the Subject is empty.
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”.
Adam Langley [Mon, 13 Nov 2017 18:38:05 +0000 (10:38 -0800)]
crypto/x509: relax EKU checking in some cases.
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.
Adam Langley [Mon, 13 Nov 2017 18:56:54 +0000 (10:56 -0800)]
crypto/x509: don't fail to parse addition elements in GeneralSubtree.
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.