1
0
mirror of https://github.com/golang/go synced 2024-09-30 05:34:35 -06:00

[dev.link] all: merge branch 'master' into dev.link

Clean merge.

Change-Id: Ied3a0a9d098ab8dd28a38fdfb36c1f17b004fef7
This commit is contained in:
Cherry Zhang 2020-07-24 13:18:51 -04:00
commit 4c544ddaea
3 changed files with 83 additions and 10 deletions

View File

@ -94,6 +94,16 @@ Do not send CLs removing the interior tags from such phrases.
preemption.
</p>
<h3 id="386">386</h3>
<p><!-- golang.org/issue/40255 -->
Go 1.15 is the last release to support x87-only floating-point
hardware (<code>GO386=387</code>). Future releases will require at
least SSE2 support on 386, raising Go's
minimum <code>GOARCH=386</code> requirement to the Intel Pentium 4
(released in 2000) or AMD Opteron/Athlon 64 (released in 2003).
</p>
<h2 id="tools">Tools</h2>
<h3 id="go-command">Go command</h3>
@ -376,6 +386,23 @@ Do not send CLs removing the interior tags from such phrases.
documentation</a> for more information.
</p>
<h3 id="commonname">X.509 CommonName deprecation</h3>
<p><!-- CL 231379 -->
The deprecated, legacy behavior of treating the <code>CommonName</code>
field on X.509 certificates as a host name when no Subject Alternative Names
are present is now disabled by default. It can be temporarily re-enabled by
adding the value <code>x509ignoreCN=0</code> to the <code>GODEBUG</code>
environment variable.
</p>
<p>
Note that if the <code>CommonName</code> is an invalid host name, it's always
ignored, regardless of <code>GODEBUG</code> settings. Invalid names include
those with any characters other than letters, digits, hyphens and underscores,
and those with empty labels or trailing dots.
</p>
<h3 id="minor_library_changes">Minor changes to the library</h3>
<p>
@ -513,15 +540,6 @@ Do not send CLs removing the interior tags from such phrases.
certificates with trailing dots.
</p>
<p><!-- CL 231379 -->
The deprecated, legacy behavior of treating the <code>CommonName</code>
field as a hostname when no Subject Alternative Names are present is now
disabled by default. It can be temporarily re-enabled by adding the value
<code>x509ignoreCN=0</code> to the <code>GODEBUG</code> environment
variable. If the <code>CommonName</code> is an invalid hostname, it's
always ignored.
</p>
<p><!-- CL 217298 -->
The new <a href="/pkg/crypto/x509/#CreateRevocationList"><code>CreateRevocationList</code></a>
function and <a href="/pkg/crypto/x509/#RevocationList"><code>RevocationList</code></a> type
@ -703,6 +721,16 @@ Do not send CLs removing the interior tags from such phrases.
</dd>
</dl><!-- math/big -->
<dl id="math/cmplx"><dt><a href="/pkg/math/cmplx/">math/cmplx</a></dt>
<dd>
<p><!-- CL 220689 -->
The functions in this package were updated to conform to the C99 standard
(Annex G IEC 60559-compatible complex arithmetic) with respect to handling
of special arguments such as infinity, NaN and signed zero.
</p>
</dd>
</dl><!-- math/cmplx-->
<dl id="net"><dt><a href="/pkg/net/">net</a></dt>
<dd>
<p><!-- CL 228645 -->

View File

@ -7,7 +7,10 @@
package runtime
import "runtime/internal/atomic"
import (
"runtime/internal/atomic"
"unsafe"
)
//go:noescape
func uname(utsname *new_utsname) int
@ -55,6 +58,36 @@ func osArchInit() {
return
}
if major == 5 && minor == 4 && patch < 2 {
// All 5.4 versions of Ubuntu are patched.
procVersion := []byte("/proc/version\000")
f := open(&procVersion[0], _O_RDONLY, 0)
if f >= 0 {
var buf [512]byte
p := noescape(unsafe.Pointer(&buf[0]))
n := read(f, p, int32(len(buf)))
closefd(f)
needle := []byte("Ubuntu")
contains:
for i, c := range buf[:n] {
if c != needle[0] {
continue
}
if int(n)-i < len(needle) {
break
}
for j, c2 := range needle {
if c2 != buf[i+j] {
continue contains
}
}
// This is an Ubuntu system.
return
}
}
}
if major == 5 && (minor == 2 || minor == 3 && patch < 15 || minor == 4 && patch < 2) {
gsignalInitQuirk = mlockGsignal
if m0.gsignal != nil {

View File

@ -0,0 +1,12 @@
// errorcheck
// Copyright 2020 The Go Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in
// the LICENSE file.
// Test that the compiler does not crash on a []byte conversion of an
// untyped expression.
package p
var v uint
var x = []byte((1 << v) + 1) // ERROR "cannot convert"