github.com/cnboonhan/delve@v0.0.0-20230908061759-363f2388c2fb/_fixtures/issue594.go (about) 1 package main 2 3 import ( 4 "fmt" 5 "runtime" 6 ) 7 8 func dontsegfault() { 9 var p *int 10 func() int { 11 defer func() { 12 recover() 13 }() 14 return *p 15 }() 16 } 17 18 func main() { 19 dontsegfault() 20 runtime.Breakpoint() 21 fmt.Println("should stop here") 22 }