You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go version:
What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. go get github.com/kisielk/vigo
2. cd $GOPATH/github.com/kisielk/vigo
3. go build
4. ./vigo 2> trace
The stack trace is here:
unexpected fault address 0xc1c46c1668
fatal error: fault
[signal 0xb code=0x1 addr=0xc1c46c1668 pc=0x40c590]
goroutine 4 [running]:
[fp=0xc200059ed0] runtime.throw(0x596d97)
/home/kamil/go/src/pkg/runtime/panic.c:473 +0x67
[fp=0xc200059ee8] runtime.sigpanic()
/home/kamil/go/src/pkg/runtime/os_linux.c:239 +0xe7
[fp=0xc20005a288] scanblock(0x7f27611d9000, 0x7f27611d9048, 0x2, 0x1)
/home/kamil/go/src/pkg/runtime/mgc0.c:800 +0xa00
[fp=0xc20005a3b8] gc(0x7f27612e7e04)
/home/kamil/go/src/pkg/runtime/mgc0.c:2001 +0x2c5
----- stack segment boundary -----
[fp=0x7f27612e7e18] runtime.gc(0xc200000000)
/home/kamil/go/src/pkg/runtime/mgc0.c:1927 +0x11b
[fp=0x7f27612e7e70] runtime.mallocgc(0x80, 0x100000001, 0x1)
/home/kamil/go/src/pkg/runtime/zmalloc_linux_amd64.c:101 +0x1e4
[fp=0x7f27612e7ea8] makeslice1(0x4afc40, 0x80, 0x80, 0x7f27612e7ef0)
/home/kamil/go/src/pkg/runtime/slice.c:61 +0x89
[fp=0x7f27612e7ed8] runtime.makeslice(0x4afc40, 0x80, 0x80, 0x0, 0x80, ...)
/home/kamil/go/src/pkg/runtime/slice.c:34 +0x9a
[fp=0x7f27612e7fb8] github.com/nsf/termbox-go.func·001()
/home/kamil/src/github.com/nsf/termbox-go/api.go:84 +0x3e
[fp=0x7f27612e7fc0] runtime.goexit()
/home/kamil/go/src/pkg/runtime/proc.c:1223
created by github.com/nsf/termbox-go.Init
/home/kamil/src/github.com/nsf/termbox-go/api.go:101 +0x66f
goroutine 1 [chan receive]:
github.com/kisielk/vigo/editor.(*editor).Loop(0xc20009f000, 0xc2000472d0, 0x0)
/home/kamil/src/github.com/kisielk/vigo/editor/editor.go:435 +0x61
main.main()
/home/kamil/src/github.com/kisielk/vigo/main.go:26 +0x18c
goroutine 3 [syscall]:
os/signal.loop()
/home/kamil/go/src/pkg/os/signal/signal_unix.go:21 +0x1c
created by os/signal.init·1
/home/kamil/go/src/pkg/os/signal/signal_unix.go:27 +0x2f
goroutine 5 [runnable]:
main.func·001()
/home/kamil/src/github.com/kisielk/vigo/main.go:21
created by main.main
/home/kamil/src/github.com/kisielk/vigo/main.go:25 +0x179
The relevant part of termbox-go/api.go:
83 go func() {
84 buf := make([]byte, 128)
85 for {
86 select {
87 case <-sigio:
88 for {
89 n, err := syscall.Read(in, buf)
90 if err == syscall.EAGAIN || err == syscall.EWOULDBLOCK {
91 break
92 }
93 input_comm <- input_event{buf[:n], err}
94 ie := <-input_comm
95 buf = ie.data[:128]
96 }
97 case <-quit:
98 return
99 }
100 }
101 }()
The program depends on termbox-go, for which the code is at github.com/nsf/termbox-go
Note that it uses unsafe in a few places to make some syscalls to determine terminal
size.
There is no crash with GOGC=off. Also if I check out theprevious revision of the vigo
project, before I moved things from package main to a subpackage, there is no crash
either. The code runs fine when compiled with go1.0.2 on the same machine.
Sorry I couldn't provide a smaller test case at this point, but let me know if I can do
anything to narrow it down.
Which compiler are you using (5g, 6g, 8g, gccgo)?
8g
Which operating system are you using?
Ubuntu 12.10 64-bit, Mac OS X 10.8
Which version are you using? (run 'go version')
go version devel +0c16e97c7587 Thu Apr 25 13:23:24 2013 +0900 linux/amd64
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: