Closed
Description
What steps will reproduce the problem? package main import ( "fmt" "time" ) const ( array_size = 1<<27 ) var a, b, c [array_size]int64 func main() { for i:=0; i<array_size; i+=1 { a[i&array_size]=2; b[i&array_size]=3; c[i&array_size]=1; } t1 :=time.Now() for i:=0; i<array_size; i+=1 { c[i&array_size]=a[i&array_size]+b[i&array_size]*3; } t2 := time.Since(t1) fmt.Printf("%v Triad Speed: %12.1f MB/s\n",t2, array_size*8.0*3/1024.0/1024.0/t2.Seconds()) } What is the expected output? What do you see instead? odessa(~/src) % go run aa.go unexpected fault address 0xffffffff801603e0 fatal error: fault [signal 0xb code=0x1 addr=0xffffffff801603e0 pc=0x20a7] goroutine 16 [running]: runtime.throw(0x1400f3) /Users/dfc/go/src/pkg/runtime/panic.c:520 +0x69 fp=0x2c819be80 runtime.sigpanic() /Users/dfc/go/src/pkg/runtime/os_darwin.c:456 +0x13f fp=0x2c819be98 main.main() /Users/dfc/src/aa.go:18 +0xa7 fp=0x2c819bf50 runtime.main() /Users/dfc/go/src/pkg/runtime/proc.c:247 +0x11a fp=0x2c819bfa8 runtime.goexit() /Users/dfc/go/src/pkg/runtime/proc.c:1445 fp=0x2c819bfb0 created by _rt0_go /Users/dfc/go/src/pkg/runtime/asm_amd64.s:97 +0x120 goroutine 17 [runnable]: runtime.MHeap_Scavenger() /Users/dfc/go/src/pkg/runtime/mheap.c:507 runtime.goexit() /Users/dfc/go/src/pkg/runtime/proc.c:1445 goroutine 18 [runnable]: bgsweep() /Users/dfc/go/src/pkg/runtime/mgc0.c:1962 runtime.goexit() /Users/dfc/go/src/pkg/runtime/proc.c:1445 goroutine 19 [runnable]: runfinq() /Users/dfc/go/src/pkg/runtime/mgc0.c:2588 runtime.goexit() /Users/dfc/go/src/pkg/runtime/proc.c:1445 exit status 2 Please use labels and text to provide additional information. Reducing array_size to 1<<26 stops crashing. odessa(~/src) % go version go version devel +0f7c69d6c367 Mon May 12 17:19:02 2014 -0400 + darwin/amd64 odessa(~/src) % uname -a Darwin odessa.fritz.box 13.1.0 Darwin Kernel Version 13.1.0: Wed Apr 2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
rsc commentedon May 13, 2014
Comment 1:
Status changed to Accepted.
davecheney commentedon May 13, 2014
Comment 2:
josharian commentedon May 13, 2014
Comment 3:
josharian commentedon May 14, 2014
Comment 4:
minux commentedon May 14, 2014
Comment 5:
gopherbot commentedon May 15, 2014
Comment 6:
bradfitz commentedon May 19, 2014
Comment 7:
Owner changed to @minux.
Status changed to Started.
minux commentedon May 20, 2014
Comment 8:
This issue was updated by revision 6612983.
rsc commentedon May 20, 2014
Comment 9:
Labels changed: added release-none, removed release-go1.3.
Owner changed to ---.
Status changed to Accepted.
mdempsky commentedon Jul 15, 2014
Comment 10:
rsc commentedon Jun 8, 2015
I think we basically decided this was okay.
[-]cmd/6l: do not reject addresses >= 2**31[/-][+]cmd/link: do not reject addresses >= 2³¹[/+]