Skip to content

Instantly share code, notes, and snippets.

@wolverian
Created March 30, 2013 19:03
Show Gist options
  • Save wolverian/5277943 to your computer and use it in GitHub Desktop.
Save wolverian/5277943 to your computer and use it in GitHub Desktop.
go-gl GenBuffer sigsegv
package main
import (
"github.com/go-gl/gl"
)
func main() {
buf := gl.GenBuffer()
println(buf)
}
@wolverian
Copy link
Author

Running this program on OS X, I get:

$ go run genbuffers.go
SIGSEGV: segmentation violation
PC=0x0
signal arrived during cgo execution

github.com/go-gl/gl._Cfunc_glGenBuffers(0x1, 0xc200000000)
    github.com/go-gl/gl/_obj/_cgo_defun.c:1283 +0x2f
github.com/go-gl/gl.GenBuffer(0x4004a8b)
    github.com/go-gl/gl/_obj/attriblocation.cgo1.go:115 +0x3f
main.main()
    /Users/ivacklin/go/src/life/genbuffers.go:8 +0x1c

goroutine 2 [syscall]:
rax     0x0
rbx     0x4560f60
rcx     0x1
rdx     0x4560ef8
rdi     0x1
rsi     0xc200000000
rbp     0x40be2e0
rsp     0x7fff5fbff8d8
r8      0x2
r9      0x404a2a0
r10     0x405fbb8
r11     0x405cb20
r12     0x405f580
r13     0xb12b02ffda0
r14     0x12f04839867dfe00
r15     0x0
rip     0x0
rflags  0x10202
cs      0x2b
fs      0x0
gs      0x0
exit status 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment