diff --git a/doc/go1.15.html b/doc/go1.15.html index 448a507f6a..42687a4741 100644 --- a/doc/go1.15.html +++ b/doc/go1.15.html @@ -94,6 +94,16 @@ Do not send CLs removing the interior tags from such phrases. preemption.
+
+ Go 1.15 is the last release to support x87-only floating-point
+ hardware (GO386=387
). Future releases will require at
+ least SSE2 support on 386, raising Go's
+ minimum GOARCH=386
requirement to the Intel Pentium 4
+ (released in 2000) or AMD Opteron/Athlon 64 (released in 2003).
+
+ The deprecated, legacy behavior of treating the CommonName
+ 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 x509ignoreCN=0
to the GODEBUG
+ environment variable.
+
+ Note that if the CommonName
is an invalid host name, it's always
+ ignored, regardless of GODEBUG
settings. Invalid names include
+ those with any characters other than letters, digits, hyphens and underscores,
+ and those with empty labels or trailing dots.
+
@@ -513,15 +540,6 @@ Do not send CLs removing the interior tags from such phrases. certificates with trailing dots.
-
- The deprecated, legacy behavior of treating the CommonName
- 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
- x509ignoreCN=0
to the GODEBUG
environment
- variable. If the CommonName
is an invalid hostname, it's
- always ignored.
-
The new CreateRevocationList
function and RevocationList
type
@@ -703,6 +721,16 @@ Do not send CLs removing the interior tags from such phrases.
+
+ 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. +
+diff --git a/src/runtime/os_linux_x86.go b/src/runtime/os_linux_x86.go index d001e6ee59..97f870707d 100644 --- a/src/runtime/os_linux_x86.go +++ b/src/runtime/os_linux_x86.go @@ -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 { diff --git a/test/fixedbugs/issue33308.go b/test/fixedbugs/issue33308.go new file mode 100644 index 0000000000..b0fd6a450c --- /dev/null +++ b/test/fixedbugs/issue33308.go @@ -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"