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
Compile the following program
package main
func main() {
var y int
var foo = func(){
y = 10
}
foo()
}
which turns into
--- prog list "func·001" ---
0014 (a.go:5) TEXT func·001+0(SB),$0-0
0015 (a.go:5) LOCALS ,$0
0016 (a.go:5) TYPE &y+-1000000000(SP){*int},$8
0017 (a.go:5) MOVQ 8(DX),BX
0018 (a.go:6) MOVQ $10,(BX)
0019 (a.go:5) RET ,
The offset from the type instruction makes it into the debug info, causing a segfault
when doing "info locals" in gdb