libgo2.go (go1.19.src) | : | libgo2.go (go1.19.1.src) | ||
---|---|---|---|---|
skipping to change at line 52 | skipping to change at line 52 | |||
//export RunGoroutines | //export RunGoroutines | |||
func RunGoroutines() { | func RunGoroutines() { | |||
for i := 0; i < 4; i++ { | for i := 0; i < 4; i++ { | |||
go func() { | go func() { | |||
runtime.LockOSThread() | runtime.LockOSThread() | |||
select {} | select {} | |||
}() | }() | |||
} | } | |||
} | } | |||
// Block blocks the current thread while running Go code. | ||||
//export Block | ||||
func Block() { | ||||
select {} | ||||
} | ||||
var P *byte | var P *byte | |||
// TestSEGV makes sure that an invalid address turns into a run-time Go panic. | // TestSEGV makes sure that an invalid address turns into a run-time Go panic. | |||
//export TestSEGV | //export TestSEGV | |||
func TestSEGV() { | func TestSEGV() { | |||
defer func() { | defer func() { | |||
if recover() == nil { | if recover() == nil { | |||
fmt.Fprintln(os.Stderr, "no panic from segv") | fmt.Fprintln(os.Stderr, "no panic from segv") | |||
os.Exit(1) | os.Exit(1) | |||
} | } | |||
End of changes. 1 change blocks. | ||||
0 lines changed or deleted | 6 lines changed or added |