[Pkg-golang-commits] [golang] 01/01: Imported Upstream version 1.3.3

Tianon Gravi admwiggin at gmail.com
Wed Nov 26 06:46:41 UTC 2014


This is an automated email from the git hooks/post-receive script.

tianon-guest pushed a commit to branch upstream-sid
in repository golang.

commit 8d8329ed5dfb9622c82a9fbec6fd99a580f9c9f6
Author: Tianon Gravi <admwiggin at gmail.com>
Date:   Tue Nov 25 23:46:26 2014 -0700

    Imported Upstream version 1.3.3
---
 VERSION                         |  2 +-
 doc/devel/release.html          |  5 +++++
 src/cmd/5l/asm.c                |  4 ++--
 src/cmd/6l/asm.c                |  8 ++++----
 src/cmd/8l/asm.c                |  8 ++++----
 src/nacltest.bash               |  1 +
 src/pkg/net/net_windows_test.go |  2 ++
 src/pkg/runtime/asm_amd64.s     |  3 ++-
 src/pkg/runtime/runtime.c       | 12 ++++++++++--
 src/pkg/time/format_test.go     | 36 +++++++++++++++++++++---------------
 10 files changed, 52 insertions(+), 29 deletions(-)

diff --git a/VERSION b/VERSION
index db938eb..61592c3 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-go1.3.2
\ No newline at end of file
+go1.3.3
\ No newline at end of file
diff --git a/doc/devel/release.html b/doc/devel/release.html
index f8ffaf7..1a84391 100644
--- a/doc/devel/release.html
+++ b/doc/devel/release.html
@@ -32,6 +32,11 @@ go1.3.2 (released 2014/09/25) includes bug fixes to cgo and the crypto/tls packa
 See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.3&r=go1.3.2">change history</a> for details.
 </p>
 
+<p>
+go1.3.3 (released 2014/09/30) includes further bug fixes to cgo, the runtime package, and the nacl port. 
+See the <a href="//code.google.com/p/go/source/list?name=release-branch.go1.3&r=go1.3.3">change history</a> for details.
+</p>
+
 <h2 id="go1.2">go1.2 (released 2013/12/01)</h2>
 
 <p>
diff --git a/src/cmd/5l/asm.c b/src/cmd/5l/asm.c
index 5e9267b..e879212 100644
--- a/src/cmd/5l/asm.c
+++ b/src/cmd/5l/asm.c
@@ -599,10 +599,10 @@ asmb(void)
 			if(iself)
 				goto ElfSym;
 		case Hplan9:
-			symo = HEADR+segtext.len+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			break;
 		ElfSym:
-			symo = rnd(HEADR+segtext.filelen, INITRND)+rnd(HEADR+segrodata.filelen, INITRND)+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			symo = rnd(symo, INITRND);
 			break;
 		}
diff --git a/src/cmd/6l/asm.c b/src/cmd/6l/asm.c
index e251e32..7828e28 100644
--- a/src/cmd/6l/asm.c
+++ b/src/cmd/6l/asm.c
@@ -689,10 +689,10 @@ asmb(void)
 		case Hplan9:
 		case Helf:
 			debug['s'] = 1;
-			symo = HEADR+segtext.len+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			break;
 		case Hdarwin:
-			symo = rnd(HEADR+segtext.len, INITRND)+rnd(segdata.filelen, INITRND)+machlink;
+			symo = segdata.fileoff+rnd(segdata.filelen, INITRND)+machlink;
 			break;
 		case Hlinux:
 		case Hfreebsd:
@@ -701,11 +701,11 @@ asmb(void)
 		case Hdragonfly:
 		case Hsolaris:
 		case Hnacl:
-			symo = rnd(HEADR+segtext.len, INITRND)+rnd(segrodata.len, INITRND)+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			symo = rnd(symo, INITRND);
 			break;
 		case Hwindows:
-			symo = rnd(HEADR+segtext.filelen, PEFILEALIGN)+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			symo = rnd(symo, PEFILEALIGN);
 			break;
 		}
diff --git a/src/cmd/8l/asm.c b/src/cmd/8l/asm.c
index 114a3eb..c135dce 100644
--- a/src/cmd/8l/asm.c
+++ b/src/cmd/8l/asm.c
@@ -619,17 +619,17 @@ asmb(void)
 			if(iself)
 				goto Elfsym;
 		case Hplan9:
-			symo = HEADR+segtext.filelen+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			break;
 		case Hdarwin:
-			symo = rnd(HEADR+segtext.filelen, INITRND)+rnd(segdata.filelen, INITRND)+machlink;
+			symo = segdata.fileoff+rnd(segdata.filelen, INITRND)+machlink;
 			break;
 		Elfsym:
-			symo = rnd(HEADR+segtext.filelen, INITRND)+rnd(HEADR+segrodata.filelen, INITRND)+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			symo = rnd(symo, INITRND);
 			break;
 		case Hwindows:
-			symo = rnd(HEADR+segtext.filelen, PEFILEALIGN)+segdata.filelen;
+			symo = segdata.fileoff+segdata.filelen;
 			symo = rnd(symo, PEFILEALIGN);
 			break;
 		}
diff --git a/src/nacltest.bash b/src/nacltest.bash
index 33fc8c1..e5bbb4b 100755
--- a/src/nacltest.bash
+++ b/src/nacltest.bash
@@ -45,6 +45,7 @@ if [ ! -f make.bash ]; then
 	exit 1
 fi
 GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH ./make.bash
+unset GOROOT
 
 # Build zip file embedded in package syscall.
 gobin=${GOBIN:-$(pwd)/../bin}
diff --git a/src/pkg/net/net_windows_test.go b/src/pkg/net/net_windows_test.go
index 2f57745..750a430 100644
--- a/src/pkg/net/net_windows_test.go
+++ b/src/pkg/net/net_windows_test.go
@@ -16,6 +16,8 @@ import (
 )
 
 func TestAcceptIgnoreSomeErrors(t *testing.T) {
+	t.Skip("skipping temporarily, see issue 8662")
+
 	recv := func(ln Listener) (string, error) {
 		c, err := ln.Accept()
 		if err != nil {
diff --git a/src/pkg/runtime/asm_amd64.s b/src/pkg/runtime/asm_amd64.s
index 3c7eaf3..2e28866 100644
--- a/src/pkg/runtime/asm_amd64.s
+++ b/src/pkg/runtime/asm_amd64.s
@@ -784,7 +784,8 @@ havem:
 	MOVQ	BP, -8(DI)
 	LEAQ	-(8+8)(DI), SP
 	MOVQ	R8, 0(SP)
-	CALL	runtime·cgocallbackg(SB)
+	MOVQ	$runtime·cgocallbackg(SB), AX // hide function call from linker
+	CALL	AX
 	MOVQ	0(SP), R8
 
 	// Restore g->sched (== m->curg->sched) from saved values.
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c
index 3a4f719..3b322e0 100644
--- a/src/pkg/runtime/runtime.c
+++ b/src/pkg/runtime/runtime.c
@@ -138,8 +138,6 @@ runtime·goenvs_unix(void)
 	syscall·envs.array = (byte*)s;
 	syscall·envs.len = n;
 	syscall·envs.cap = n;
-
-	traceback_cache = ~(uint32)0;
 }
 
 int32
@@ -343,6 +341,16 @@ runtime·parsedebugvars(void)
 {
 	byte *p;
 	intgo i, n;
+	bool tmp;
+	
+	// gotraceback caches the GOTRACEBACK setting in traceback_cache.
+	// gotraceback can be called before the environment is available.
+	// traceback_cache must be reset after the environment is made
+	// available, in order for the environment variable to take effect.
+	// The code is fixed differently in Go 1.4.
+	// This is a limited fix for Go 1.3.3.
+	traceback_cache = ~(uint32)0;
+	runtime·gotraceback(&tmp);
 
 	p = runtime·getenv("GODEBUG");
 	if(p == nil)
diff --git a/src/pkg/time/format_test.go b/src/pkg/time/format_test.go
index 3bc8f42..46a5981 100644
--- a/src/pkg/time/format_test.go
+++ b/src/pkg/time/format_test.go
@@ -183,39 +183,45 @@ func TestParse(t *testing.T) {
 	}
 }
 
-func TestParseInSydney(t *testing.T) {
-	loc, err := LoadLocation("Australia/Sydney")
+func TestParseInLocation(t *testing.T) {
+	// Check that Parse (and ParseInLocation) understand that
+	// Feb 01 AST (Arabia Standard Time) and Feb 01 AST (Atlantic Standard Time)
+	// are in different time zones even though both are called AST
+
+	baghdad, err := LoadLocation("Asia/Baghdad")
 	if err != nil {
 		t.Fatal(err)
 	}
 
-	// Check that Parse (and ParseInLocation) understand
-	// that Feb EST and Aug EST are different time zones in Sydney
-	// even though both are called EST.
-	t1, err := ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 EST", loc)
+	t1, err := ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 AST", baghdad)
 	if err != nil {
 		t.Fatal(err)
 	}
-	t2 := Date(2013, February, 1, 00, 00, 00, 0, loc)
+	t2 := Date(2013, February, 1, 00, 00, 00, 0, baghdad)
 	if t1 != t2 {
-		t.Fatalf("ParseInLocation(Feb 01 2013 EST, Sydney) = %v, want %v", t1, t2)
+		t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad) = %v, want %v", t1, t2)
 	}
 	_, offset := t1.Zone()
-	if offset != 11*60*60 {
-		t.Fatalf("ParseInLocation(Feb 01 2013 EST, Sydney).Zone = _, %d, want _, %d", offset, 11*60*60)
+	if offset != 3*60*60 {
+		t.Fatalf("ParseInLocation(Feb 01 2013 AST, Baghdad).Zone = _, %d, want _, %d", offset, 3*60*60)
+	}
+
+	blancSablon, err := LoadLocation("America/Blanc-Sablon")
+	if err != nil {
+		t.Fatal(err)
 	}
 
-	t1, err = ParseInLocation("Jan 02 2006 MST", "Aug 01 2013 EST", loc)
+	t1, err = ParseInLocation("Jan 02 2006 MST", "Feb 01 2013 AST", blancSablon)
 	if err != nil {
 		t.Fatal(err)
 	}
-	t2 = Date(2013, August, 1, 00, 00, 00, 0, loc)
+	t2 = Date(2013, February, 1, 00, 00, 00, 0, blancSablon)
 	if t1 != t2 {
-		t.Fatalf("ParseInLocation(Aug 01 2013 EST, Sydney) = %v, want %v", t1, t2)
+		t.Fatalf("ParseInLocation(Feb 01 2013 AST, Blanc-Sablon) = %v, want %v", t1, t2)
 	}
 	_, offset = t1.Zone()
-	if offset != 10*60*60 {
-		t.Fatalf("ParseInLocation(Aug 01 2013 EST, Sydney).Zone = _, %d, want _, %d", offset, 10*60*60)
+	if offset != -4*60*60 {
+		t.Fatalf("ParseInLocation(Feb 01 2013 AST, Blanc-Sablon).Zone = _, %d, want _, %d", offset, -4*60*60)
 	}
 }
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-golang/golang.git



More information about the pkg-golang-commits mailing list