diff options
author | Tianon Gravi <admwiggin@gmail.com> | 2014-11-25 23:48:25 -0700 |
---|---|---|
committer | Tianon Gravi <admwiggin@gmail.com> | 2014-11-25 23:48:25 -0700 |
commit | 15734415e04527f5aa10ee8db0dc60ac6c7e7591 (patch) | |
tree | 7a6082bc614d7f3ad7fa8b25ee122bde07d0bfff /src/pkg | |
parent | 25c37b19a2604aff4dfe019f76ddbcc3ee68a74e (diff) | |
parent | 8d8329ed5dfb9622c82a9fbec6fd99a580f9c9f6 (diff) | |
download | golang-15734415e04527f5aa10ee8db0dc60ac6c7e7591.tar.gz |
Merge tag 'upstream/1.3.3' into debian-sid
* tag 'upstream/1.3.3':
Imported Upstream version 1.3.3
Diffstat (limited to 'src/pkg')
-rw-r--r-- | src/pkg/net/net_windows_test.go | 2 | ||||
-rw-r--r-- | src/pkg/runtime/asm_amd64.s | 3 | ||||
-rw-r--r-- | src/pkg/runtime/runtime.c | 12 | ||||
-rw-r--r-- | src/pkg/time/format_test.go | 36 |
4 files changed, 35 insertions, 18 deletions
diff --git a/src/pkg/net/net_windows_test.go b/src/pkg/net/net_windows_test.go index 2f57745e3..750a4304b 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 3c7eaf343..2e2886609 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 3a4f7199e..3b322e0de 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 3bc8f4294..46a598155 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) } } |