Merge pull request #710 from visualfc/sigsegv

[wip] runtime: signal SIGSEGV
This commit is contained in:
xushiwei
2024-08-14 15:09:10 +08:00
committed by GitHub
4 changed files with 71 additions and 0 deletions

24
cl/_testgo/sigsegv/in.go Normal file
View File

@@ -0,0 +1,24 @@
package main
type T struct {
s int
}
func f() *T {
return nil
}
func init() {
println("init")
defer func() {
r := recover()
if e, ok := r.(error); ok {
println("recover", e.Error())
}
}()
println(f().s)
}
func main() {
println("main")
}

View File

@@ -0,0 +1 @@
;