mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.typeparams] all: merge master (fdab5be) into dev.typeparams
Two non-conflict changes included because they're needed for all.bash: 1. Bump internal/goversion.Version to 18. This will happen eventually anyway (dev.typeparams will not be merged back to Go 1.17), and is needed for cmd/api to allow new API additions. 2. Add fixedbugs/issue46725.go (new test added on master) to the list of known failures for -G=3. This test exercises a bug that was fixed in typecheck, but -G=3 mode has duplicated that code and will need to be fixed as well. That's outside of the scope of a merge. Conflicts: - src/runtime/traceback.go Nearby lines were removed on both master and dev.typeparams. Merge List: + 2021-06-14fdab5be159doc/go1.17: further revise OpenBSD release notes + 2021-06-14326ea438bbcmd/compile: rewrite a, b = f() to use temporaries when type not identical + 2021-06-143249b645c9cmd/compile: factor out rewrite multi-valued f() + 2021-06-1314305bf0b9misc/cgo: generate Windows import libraries for clang + 2021-06-1324cff0f044cmd/go, misc/cgo: skip test if no .edata + 2021-06-1367b1b6a2e3cmd/compile: allow ir.OSLICE2ARRPTR in mayCall + 2021-06-121ed0d129e9runtime: testprogcgo: don't call exported Go functions directly from Go + 2021-06-129d46ee5ac4reflect: handle stack-to-register translation in callMethod + 2021-06-11e552a6d312cmd/go: remove hint when no module is suggested + 2021-06-1116b5d766d8syscall: do not load native libraries on non-native powershell on arm + 2021-06-1177aa209b38runtime: loop on EINTR in macOS sigNoteSleep + 2021-06-11e2dc6dd5c9doc/go1.17: clean up formatting of gofmt section + 2021-06-112f1128461dcmd/go: match Windows paths in TestScript/mod_invalid_version + 2021-06-112721da2608doc/go1.17: fix formatting near httptest + 2021-06-10770f1de8c5net/http: remove test-only private key from production binaries + 2021-06-108d11b1d117cmd/go: report the imports of CompiledGoFiles in ImportMap + 2021-06-10dc00dc6c6bcrypto/tls: let HTTP/1.1 clients connect to servers with NextProtos "h2" + 2021-06-0927f83723e9api: promote next to go1.17 + 2021-06-09182157c81adoc/go1.17: remove lingering TODO + 2021-06-09a5bc060b42doc/go1.17: document strconv changes for Go 1.17 + 2021-06-091402b27d46strconv: document parsing of leading +/- + 2021-06-09df35ade067doc/go1.17: document //go:build lines + 2021-06-09e4e7807d24net/http: add AllowQuerySemicolons + 2021-06-09ec3026d032doc/go1.17: remove TODO for ports section + 2021-06-09e6dda19888net/url: reject query values with semicolons + 2021-06-09139e935d3cmath/big: comment division + 2021-06-09aa5540cd82cmd/compile: make map.zero symbol content-addressable + 2021-06-0907ca28d529cmd/link: fix bug in -strictdups checking of BSS symbols + 2021-06-08bcecae2af6doc/go1.17: mention new possibility of type conversion panicking + 2021-06-0863dcab2e91doc/go1.17: mention new vet checks sigchanyzer and stdmethods. + 2021-06-086551763a60doc/go1.17: mention block profile bias fix + 2021-06-08cb80937bf6Revert "doc/go1.17: mention block profile bias fix" + 2021-06-08d3e3d03666net: reject leading zeros in IP address parsers + 2021-06-08da4a640141doc/go1.17: revise OpenBSD release notes + 2021-06-08689f4c7415doc/go1.17: mention block profile bias fix + 2021-06-089afe071c60doc/go1.17: remove TODO for Tools section + 2021-06-08f753d7223edoc/go1.17: resolve TODO for cmd/cover + 2021-06-089498b0155dcmd/go: in Go 1.17+ modules, add indirect go.mod dependencies separately from direct ones + 2021-06-08949f00cebedoc/go1.17: add release notes for crypto packages + 2021-06-080fb3e2c184doc/go1.17: add a release note for the '-compat' flag to 'go mod tidy' + 2021-06-082169deb352cmd/compile: use t.AllMethods when sorting typesByString + 2021-06-08c20bcb6488runtime: remove out-of-date comments about frame skipping + 2021-06-0739c39ae52fdoc: document Go 1.17 language changes + 2021-06-07dc8b558951cmd/dist: pass -Wno-lto-type-mismatch in swig_callback_lto + 2021-06-07909dd5e010strconv: ParseFloat: always return ErrSyntax for bad syntax Change-Id: Iffdf379d0275bbd12d50149ce38634773ced481d
This commit is contained in:
commit
ea438bda85
79 changed files with 2582 additions and 575 deletions
|
|
@ -470,10 +470,30 @@ TEXT ·f(SB), NOSPLIT|DUPOK, $0-0
|
|||
JMP 0(PC)
|
||||
`
|
||||
|
||||
const testStrictDupAsmSrc3 = `
|
||||
#include "textflag.h"
|
||||
GLOBL ·rcon(SB), RODATA|DUPOK, $64
|
||||
`
|
||||
|
||||
const testStrictDupAsmSrc4 = `
|
||||
#include "textflag.h"
|
||||
GLOBL ·rcon(SB), RODATA|DUPOK, $32
|
||||
`
|
||||
|
||||
func TestStrictDup(t *testing.T) {
|
||||
// Check that -strictdups flag works.
|
||||
testenv.MustHaveGoBuild(t)
|
||||
|
||||
asmfiles := []struct {
|
||||
fname string
|
||||
payload string
|
||||
}{
|
||||
{"a", testStrictDupAsmSrc1},
|
||||
{"b", testStrictDupAsmSrc2},
|
||||
{"c", testStrictDupAsmSrc3},
|
||||
{"d", testStrictDupAsmSrc4},
|
||||
}
|
||||
|
||||
t.Parallel()
|
||||
|
||||
tmpdir := t.TempDir()
|
||||
|
|
@ -483,15 +503,12 @@ func TestStrictDup(t *testing.T) {
|
|||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
src = filepath.Join(tmpdir, "a.s")
|
||||
err = ioutil.WriteFile(src, []byte(testStrictDupAsmSrc1), 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
src = filepath.Join(tmpdir, "b.s")
|
||||
err = ioutil.WriteFile(src, []byte(testStrictDupAsmSrc2), 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
for _, af := range asmfiles {
|
||||
src = filepath.Join(tmpdir, af.fname+".s")
|
||||
err = ioutil.WriteFile(src, []byte(af.payload), 0666)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
src = filepath.Join(tmpdir, "go.mod")
|
||||
err = ioutil.WriteFile(src, []byte("module teststrictdup\n"), 0666)
|
||||
|
|
@ -503,7 +520,7 @@ func TestStrictDup(t *testing.T) {
|
|||
cmd.Dir = tmpdir
|
||||
out, err := cmd.CombinedOutput()
|
||||
if err != nil {
|
||||
t.Errorf("linking with -strictdups=1 failed: %v", err)
|
||||
t.Errorf("linking with -strictdups=1 failed: %v\n%s", err, string(out))
|
||||
}
|
||||
if !bytes.Contains(out, []byte("mismatched payload")) {
|
||||
t.Errorf("unexpected output:\n%s", out)
|
||||
|
|
@ -515,7 +532,11 @@ func TestStrictDup(t *testing.T) {
|
|||
if err == nil {
|
||||
t.Errorf("linking with -strictdups=2 did not fail")
|
||||
}
|
||||
if !bytes.Contains(out, []byte("mismatched payload")) {
|
||||
// NB: on amd64 we get the 'new length' error, on arm64 the 'different
|
||||
// contents' error.
|
||||
if !(bytes.Contains(out, []byte("mismatched payload: new length")) ||
|
||||
bytes.Contains(out, []byte("mismatched payload: same length but different contents"))) ||
|
||||
!bytes.Contains(out, []byte("mismatched payload: different sizes")) {
|
||||
t.Errorf("unexpected output:\n%s", out)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue