Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b9702967
Commit
b9702967
authored
Oct 31, 2015
by
Ian Lance Taylor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libgo: Update from Go 1.5 to Go 1.5.1.
Reviewed-on:
https://go-review.googlesource.com/16527
From-SVN: r229624
parent
67376cd2
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
91 additions
and
18 deletions
+91
-18
gcc/go/gofrontend/MERGE
+1
-1
libgo/MERGE
+1
-1
libgo/VERSION
+2
-2
libgo/go/cmd/go/alldocs.go
+0
-1
libgo/go/cmd/go/build.go
+0
-1
libgo/go/cmd/go/pkg.go
+2
-1
libgo/go/fmt/scan.go
+9
-4
libgo/go/fmt/scan_test.go
+7
-4
libgo/go/internal/syscall/windows/registry/value.go
+0
-1
libgo/go/net/cgo_solaris.go
+1
-1
libgo/go/net/http/httputil/reverseproxy.go
+4
-1
libgo/go/net/http/httputil/reverseproxy_test.go
+39
-0
libgo/go/net/lookup.go
+3
-0
libgo/go/net/port_test.go
+2
-0
libgo/go/runtime/extern.go
+3
-0
libgo/go/runtime/gc_test.go
+17
-0
No files found.
gcc/go/gofrontend/MERGE
View file @
b9702967
4b6b496579225cdd897130f6d6fd18ecb100bf99
17cc10f7fb07e3f37448feaeb416b52618ae8bbb
The first line of this file holds the git revision number of the last
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.
merge done from the gofrontend repository.
libgo/MERGE
View file @
b9702967
bb03defe933c89fee44be675d7aa0fbd893ced30
f2e4c8b5fb3660d793b2c545ef207153db0a34b1
The first line of this file holds the git revision number of the
The first line of this file holds the git revision number of the
last merge done from the master library sources.
last merge done from the master library sources.
libgo/VERSION
View file @
b9702967
go1.5
go1.5.1
\ No newline at end of file
\ No newline at end of file
libgo/go/cmd/go/alldocs.go
View file @
b9702967
...
@@ -81,7 +81,6 @@ and test commands:
...
@@ -81,7 +81,6 @@ and test commands:
-a
-a
force rebuilding of packages that are already up-to-date.
force rebuilding of packages that are already up-to-date.
In Go releases, does not apply to the standard library.
-n
-n
print the commands but do not run them.
print the commands but do not run them.
-p n
-p n
...
...
libgo/go/cmd/go/build.go
View file @
b9702967
...
@@ -60,7 +60,6 @@ and test commands:
...
@@ -60,7 +60,6 @@ and test commands:
-a
-a
force rebuilding of packages that are already up-to-date.
force rebuilding of packages that are already up-to-date.
In Go releases, does not apply to the standard library.
-n
-n
print the commands but do not run them.
print the commands but do not run them.
-p n
-p n
...
...
libgo/go/cmd/go/pkg.go
View file @
b9702967
...
@@ -372,7 +372,8 @@ func loadImport(path, srcDir string, parent *Package, stk *importStack, importPo
...
@@ -372,7 +372,8 @@ func loadImport(path, srcDir string, parent *Package, stk *importStack, importPo
if
gobin
!=
""
{
if
gobin
!=
""
{
bp
.
BinDir
=
gobin
bp
.
BinDir
=
gobin
}
}
if
err
==
nil
&&
!
isLocal
&&
bp
.
ImportComment
!=
""
&&
bp
.
ImportComment
!=
path
&&
(
!
go15VendorExperiment
||
!
strings
.
Contains
(
path
,
"/vendor/"
))
{
if
err
==
nil
&&
!
isLocal
&&
bp
.
ImportComment
!=
""
&&
bp
.
ImportComment
!=
path
&&
(
!
go15VendorExperiment
||
(
!
strings
.
Contains
(
path
,
"/vendor/"
)
&&
!
strings
.
HasPrefix
(
path
,
"vendor/"
)))
{
err
=
fmt
.
Errorf
(
"code in directory %s expects import %q"
,
bp
.
Dir
,
bp
.
ImportComment
)
err
=
fmt
.
Errorf
(
"code in directory %s expects import %q"
,
bp
.
Dir
,
bp
.
ImportComment
)
}
}
p
.
load
(
stk
,
bp
,
err
)
p
.
load
(
stk
,
bp
,
err
)
...
...
libgo/go/fmt/scan.go
View file @
b9702967
...
@@ -83,6 +83,8 @@ func Scanln(a ...interface{}) (n int, err error) {
...
@@ -83,6 +83,8 @@ func Scanln(a ...interface{}) (n int, err error) {
// the format. It returns the number of items successfully scanned.
// the format. It returns the number of items successfully scanned.
// If that is less than the number of arguments, err will report why.
// If that is less than the number of arguments, err will report why.
// Newlines in the input must match newlines in the format.
// Newlines in the input must match newlines in the format.
// The one exception: the verb %c always scans the next rune in the
// input, even if it is a space (or tab etc.) or newline.
func
Scanf
(
format
string
,
a
...
interface
{})
(
n
int
,
err
error
)
{
func
Scanf
(
format
string
,
a
...
interface
{})
(
n
int
,
err
error
)
{
return
Fscanf
(
os
.
Stdin
,
format
,
a
...
)
return
Fscanf
(
os
.
Stdin
,
format
,
a
...
)
}
}
...
@@ -1164,15 +1166,18 @@ func (s *ss) doScanf(format string, a []interface{}) (numProcessed int, err erro
...
@@ -1164,15 +1166,18 @@ func (s *ss) doScanf(format string, a []interface{}) (numProcessed int, err erro
if
!
widPresent
{
if
!
widPresent
{
s
.
maxWid
=
hugeWid
s
.
maxWid
=
hugeWid
}
}
s
.
SkipSpace
()
c
,
w
:=
utf8
.
DecodeRuneInString
(
format
[
i
:
])
i
+=
w
if
c
!=
'c'
{
s
.
SkipSpace
()
}
s
.
argLimit
=
s
.
limit
s
.
argLimit
=
s
.
limit
if
f
:=
s
.
count
+
s
.
maxWid
;
f
<
s
.
argLimit
{
if
f
:=
s
.
count
+
s
.
maxWid
;
f
<
s
.
argLimit
{
s
.
argLimit
=
f
s
.
argLimit
=
f
}
}
c
,
w
:=
utf8
.
DecodeRuneInString
(
format
[
i
:
])
i
+=
w
if
numProcessed
>=
len
(
a
)
{
// out of operands
if
numProcessed
>=
len
(
a
)
{
// out of operands
s
.
errorString
(
"too few operands for format %"
+
format
[
i
-
w
:
])
s
.
errorString
(
"too few operands for format %"
+
format
[
i
-
w
:
])
break
break
...
...
libgo/go/fmt/scan_test.go
View file @
b9702967
...
@@ -300,10 +300,13 @@ var scanfTests = []ScanfTest{
...
@@ -300,10 +300,13 @@ var scanfTests = []ScanfTest{
{
"%2s"
,
"sssss"
,
&
xVal
,
Xs
(
"ss"
)},
{
"%2s"
,
"sssss"
,
&
xVal
,
Xs
(
"ss"
)},
// Fixed bugs
// Fixed bugs
{
"%d
\n
"
,
"27
\n
"
,
&
intVal
,
27
},
// ok
{
"%d
\n
"
,
"27
\n
"
,
&
intVal
,
27
},
// ok
{
"%d
\n
"
,
"28
\n
"
,
&
intVal
,
28
},
// was: "unexpected newline"
{
"%d
\n
"
,
"28
\n
"
,
&
intVal
,
28
},
// was: "unexpected newline"
{
"%v"
,
"0"
,
&
intVal
,
0
},
// was: "EOF"; 0 was taken as base prefix and not counted.
{
"%v"
,
"0"
,
&
intVal
,
0
},
// was: "EOF"; 0 was taken as base prefix and not counted.
{
"%v"
,
"0"
,
&
uintVal
,
uint
(
0
)},
// was: "EOF"; 0 was taken as base prefix and not counted.
{
"%v"
,
"0"
,
&
uintVal
,
uint
(
0
)},
// was: "EOF"; 0 was taken as base prefix and not counted.
{
"%c"
,
" "
,
&
uintVal
,
uint
(
' '
)},
// %c must accept a blank.
{
"%c"
,
"
\t
"
,
&
uintVal
,
uint
(
'\t'
)},
// %c must accept any space.
{
"%c"
,
"
\n
"
,
&
uintVal
,
uint
(
'\n'
)},
// %c must accept any space.
}
}
var
overflowTests
=
[]
ScanTest
{
var
overflowTests
=
[]
ScanTest
{
...
...
libgo/go/internal/syscall/windows/registry/value.go
View file @
b9702967
...
@@ -310,7 +310,6 @@ loopItems:
...
@@ -310,7 +310,6 @@ loopItems:
break
break
}
}
if
err
==
syscall
.
ERROR_MORE_DATA
{
if
err
==
syscall
.
ERROR_MORE_DATA
{
println
(
len
(
buf
),
l
)
// Double buffer size and try again.
// Double buffer size and try again.
l
=
uint32
(
2
*
len
(
buf
))
l
=
uint32
(
2
*
len
(
buf
))
buf
=
make
([]
uint16
,
l
)
buf
=
make
([]
uint16
,
l
)
...
...
libgo/go/net/cgo_solaris.go
View file @
b9702967
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
package
net
package
net
/*
/*
#cgo LDFLAGS: -lsocket -lnsl
#cgo LDFLAGS: -lsocket -lnsl
-lsendfile
#include <netdb.h>
#include <netdb.h>
*/
*/
...
...
libgo/go/net/http/httputil/reverseproxy.go
View file @
b9702967
...
@@ -105,7 +105,7 @@ type requestCanceler interface {
...
@@ -105,7 +105,7 @@ type requestCanceler interface {
}
}
type
runOnFirstRead
struct
{
type
runOnFirstRead
struct
{
io
.
Reader
io
.
Reader
// optional; nil means empty body
fn
func
()
// Run before first Read, then set to nil
fn
func
()
// Run before first Read, then set to nil
}
}
...
@@ -115,6 +115,9 @@ func (c *runOnFirstRead) Read(bs []byte) (int, error) {
...
@@ -115,6 +115,9 @@ func (c *runOnFirstRead) Read(bs []byte) (int, error) {
c
.
fn
()
c
.
fn
()
c
.
fn
=
nil
c
.
fn
=
nil
}
}
if
c
.
Reader
==
nil
{
return
0
,
io
.
EOF
}
return
c
.
Reader
.
Read
(
bs
)
return
c
.
Reader
.
Read
(
bs
)
}
}
...
...
libgo/go/net/http/httputil/reverseproxy_test.go
View file @
b9702967
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
package
httputil
package
httputil
import
(
import
(
"bufio"
"io/ioutil"
"io/ioutil"
"log"
"log"
"net/http"
"net/http"
...
@@ -281,3 +282,41 @@ func TestReverseProxyCancellation(t *testing.T) {
...
@@ -281,3 +282,41 @@ func TestReverseProxyCancellation(t *testing.T) {
t
.
Fatal
(
"DefaultClient.Do() returned nil error"
)
t
.
Fatal
(
"DefaultClient.Do() returned nil error"
)
}
}
}
}
func
req
(
t
*
testing
.
T
,
v
string
)
*
http
.
Request
{
req
,
err
:=
http
.
ReadRequest
(
bufio
.
NewReader
(
strings
.
NewReader
(
v
)))
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
return
req
}
// Issue 12344
func
TestNilBody
(
t
*
testing
.
T
)
{
backend
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
r
*
http
.
Request
)
{
w
.
Write
([]
byte
(
"hi"
))
}))
defer
backend
.
Close
()
frontend
:=
httptest
.
NewServer
(
http
.
HandlerFunc
(
func
(
w
http
.
ResponseWriter
,
_
*
http
.
Request
)
{
backURL
,
_
:=
url
.
Parse
(
backend
.
URL
)
rp
:=
NewSingleHostReverseProxy
(
backURL
)
r
:=
req
(
t
,
"GET / HTTP/1.0
\r\n\r\n
"
)
r
.
Body
=
nil
// this accidentally worked in Go 1.4 and below, so keep it working
rp
.
ServeHTTP
(
w
,
r
)
}))
defer
frontend
.
Close
()
res
,
err
:=
http
.
Get
(
frontend
.
URL
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
defer
res
.
Body
.
Close
()
slurp
,
err
:=
ioutil
.
ReadAll
(
res
.
Body
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
string
(
slurp
)
!=
"hi"
{
t
.
Errorf
(
"Got %q; want %q"
,
slurp
,
"hi"
)
}
}
libgo/go/net/lookup.go
View file @
b9702967
...
@@ -123,6 +123,9 @@ func lookupIPDeadline(host string, deadline time.Time) (addrs []IPAddr, err erro
...
@@ -123,6 +123,9 @@ func lookupIPDeadline(host string, deadline time.Time) (addrs []IPAddr, err erro
// LookupPort looks up the port for the given network and service.
// LookupPort looks up the port for the given network and service.
func
LookupPort
(
network
,
service
string
)
(
port
int
,
err
error
)
{
func
LookupPort
(
network
,
service
string
)
(
port
int
,
err
error
)
{
if
n
,
i
,
ok
:=
dtoi
(
service
,
0
);
ok
&&
i
==
len
(
service
)
{
return
n
,
nil
}
return
lookupPort
(
network
,
service
)
return
lookupPort
(
network
,
service
)
}
}
...
...
libgo/go/net/port_test.go
View file @
b9702967
...
@@ -27,6 +27,7 @@ var portTests = []struct {
...
@@ -27,6 +27,7 @@ var portTests = []struct {
{
"tcp"
,
"time"
,
37
,
true
},
{
"tcp"
,
"time"
,
37
,
true
},
{
"tcp"
,
"domain"
,
53
,
true
},
{
"tcp"
,
"domain"
,
53
,
true
},
{
"tcp"
,
"finger"
,
79
,
true
},
{
"tcp"
,
"finger"
,
79
,
true
},
{
"tcp"
,
"42"
,
42
,
true
},
{
"udp"
,
"echo"
,
7
,
true
},
{
"udp"
,
"echo"
,
7
,
true
},
{
"udp"
,
"tftp"
,
69
,
true
},
{
"udp"
,
"tftp"
,
69
,
true
},
...
@@ -36,6 +37,7 @@ var portTests = []struct {
...
@@ -36,6 +37,7 @@ var portTests = []struct {
{
"udp"
,
"ntp"
,
123
,
true
},
{
"udp"
,
"ntp"
,
123
,
true
},
{
"udp"
,
"snmp"
,
161
,
true
},
{
"udp"
,
"snmp"
,
161
,
true
},
{
"udp"
,
"syslog"
,
514
,
true
},
{
"udp"
,
"syslog"
,
514
,
true
},
{
"udp"
,
"42"
,
42
,
true
},
{
"--badnet--"
,
"zzz"
,
0
,
false
},
{
"--badnet--"
,
"zzz"
,
0
,
false
},
{
"tcp"
,
"--badport--"
,
0
,
false
},
{
"tcp"
,
"--badport--"
,
0
,
false
},
...
...
libgo/go/runtime/extern.go
View file @
b9702967
...
@@ -47,6 +47,9 @@ It is a comma-separated list of name=val pairs setting these named variables:
...
@@ -47,6 +47,9 @@ It is a comma-separated list of name=val pairs setting these named variables:
that allow the garbage collector to avoid repeating a stack scan during the
that allow the garbage collector to avoid repeating a stack scan during the
mark termination phase.
mark termination phase.
gcstackbarrierall: setting gcstackbarrierall=1 installs stack barriers
in every stack frame, rather than in exponentially-spaced frames.
gcstoptheworld: setting gcstoptheworld=1 disables concurrent garbage collection,
gcstoptheworld: setting gcstoptheworld=1 disables concurrent garbage collection,
making every garbage collection a stop-the-world event. Setting gcstoptheworld=2
making every garbage collection a stop-the-world event. Setting gcstoptheworld=2
also disables concurrent sweeping after the garbage collection finishes.
also disables concurrent sweeping after the garbage collection finishes.
...
...
libgo/go/runtime/gc_test.go
View file @
b9702967
...
@@ -471,4 +471,21 @@ func testAssertVar(x interface{}) error {
...
@@ -471,4 +471,21 @@ func testAssertVar(x interface{}) error {
return nil
return nil
}
}
func TestAssertE2T2Liveness(t *testing.T) {
*runtime.TestingAssertE2T2GC = true
defer func() {
*runtime.TestingAssertE2T2GC = false
}()
poisonStack()
testIfaceEqual(io.EOF)
}
func testIfaceEqual(x interface{}) {
if x == "abc" {
// Prevent inlining
panic("")
}
}
*/
*/
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment