]> Cypherpunks.ru repositories - gostls13.git/commitdiff
[dev.typeparams] all: merge master (8212707) into dev.typeparams
authorMatthew Dempsky <mdempsky@google.com>
Mon, 7 Jun 2021 19:27:24 +0000 (12:27 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Mon, 7 Jun 2021 19:27:36 +0000 (12:27 -0700)
Conflicts:

- src/go/internal/gcimporter/iimport.go

  CL 325429 and CL 319931 made unrelated changes to adjacent lines

Merge List:

+ 2021-06-07 8212707871 crypto/elliptic: update P-521 docs to say it's constant-time
+ 2021-06-07 7406180012 fmt: split package documentation into more sections
+ 2021-06-07 e3176bbc3e crypto/tls: fix typo in Config.NextProtos docs
+ 2021-06-05 e1fa26026d spec: improve wording consistency by eliminating "specifier"
+ 2021-06-05 f490134126 spec: improve wording by choosing an official term "keyword"
+ 2021-06-05 e3cb381704 go/internal/gcimporter: don't waste CPU copying bytes in `io.ReadAll`
+ 2021-06-05 9d669ed47a misc/cgo/errors: use expected column numbers
+ 2021-06-04 95939e8de7 cmd/compile/internal/abi: fix typo in comment
+ 2021-06-04 831f9376d8 net/http: fix ResponseWriter.ReadFrom with short reads
+ 2021-06-04 3a9d906edc os: avoid finalizer race in windows process object
+ 2021-06-04 105c5b50e0 os: terminate windows processes via handle directly
+ 2021-06-04 79cd407f88 syscall: regenerate zsyscall_windows.go
+ 2021-06-04 c6b6211229 doc/go1.17: document testing changes for Go 1.17
+ 2021-06-04 0214440075 syscall: do not pass console handles to PROC_THREAD_ATTRIBUTE_HANDLE_LIST on Windows 7
+ 2021-06-04 962d5c997a cmd/compile,go/types: restrict use of unsafe.{Add,Slice} to go1.17 or newer
+ 2021-06-04 b29b123e07 cmd/compile: remove spurious ir.Dump
+ 2021-06-03 6d98301114 cmd/link: use correct alignment in PE DWARF sections
+ 2021-06-03 e0d029f758 runtime: avoid gp.lockedm race in exitsyscall0
+ 2021-06-02 dd7ba3ba2c net: don't rely on system hosts in TestCVE202133195
+ 2021-06-02 4f572d7076 io/fs: minor corrections to Sub docs
+ 2021-06-02 e11d14225c doc/go1.17: remove runtime section
+ 2021-06-02 6e189afd3e doc/go1.17: mention SYS_WAIT6/WEXITED on NetBSD
+ 2021-06-02 ff9f5fb859 cmd/link: recognize clang linker error in testCGOLTO
+ 2021-06-02 1c6a2ea2ea doc/go1.17: document time changes for Go1.17
+ 2021-06-02 d743e67e06 doc/go1.17: document flag changes for Go 1.17
+ 2021-06-02 dc8f87b749 runtime/internal/sys: generate //go:build lines in gengoos.go
+ 2021-06-02 84c0e5d47f cmd/link: move issue 43830 tests out of TestScript
+ 2021-06-02 cae68700cc runtime: fix formatting
+ 2021-06-01 567ee865f6 cmd/go: add declaration to cgo_lto_issue43830 test
+ 2021-06-01 24e9707cbf cmd/link, cmd/cgo: support -flto in CFLAGS

Change-Id: I9ef88e7de0f8b1841ed9604b613b41672df67e71

1  2 
src/cmd/compile/internal/noder/noder.go
src/cmd/compile/internal/typecheck/func.go
src/cmd/compile/internal/types2/builtins.go
src/go/internal/gcimporter/iimport.go
src/runtime/proc.go

index e003dc9767a387c384bee6968d8c6aec4c0a84e7,76d47d08f1f88a9a11a4761604aba4d753d5fe5f..b300860e94074a0c24a7e5c7fcec4db38fbe6bc5
@@@ -73,8 -62,8 +74,8 @@@ const 
  // and returns the number of bytes consumed and a reference to the package.
  // If the export data version is not recognized or the format is otherwise
  // compromised, an error is returned.
- func iImportData(fset *token.FileSet, imports map[string]*types.Package, data []byte, path string) (_ int, pkg *types.Package, err error) {
+ func iImportData(fset *token.FileSet, imports map[string]*types.Package, dataReader *bufio.Reader, path string) (pkg *types.Package, err error) {
 -      const currentVersion = 1
 +      const currentVersion = iexportVersionCurrent
        version := int64(-1)
        defer func() {
                if e := recover(); e != nil {
        sLen := int64(r.uint64())
        dLen := int64(r.uint64())
  
-       whence, _ := r.Seek(0, io.SeekCurrent)
-       stringData := data[whence : whence+sLen]
-       declData := data[whence+sLen : whence+sLen+dLen]
-       r.Seek(sLen+dLen, io.SeekCurrent)
+       data := make([]byte, sLen+dLen)
+       if _, err := io.ReadFull(r, data); err != nil {
+               errorf("cannot read %d bytes of stringData and declData: %s", len(data), err)
+       }
+       stringData := data[:sLen]
+       declData := data[sLen:]
  
        p := iimporter{
 -              ipath:   path,
 -              version: int(version),
 +              exportVersion: version,
 +              ipath:         path,
 +              version:       int(version),
  
                stringData:  stringData,
                stringCache: make(map[uint64]string),
Simple merge