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
~/go/src/github.com/dgryski/bug/rp $ cat main.go
package main
//go:noinline
func read(a []byte) byte {
return a[2]
}
func main() {
defer func() {
if r := recover(); r != nil {
println("caught a panic")
}
}()
a := []byte{1}
read(a)
}
~/go/src/github.com/dgryski/bug/rp $ go run main.go
caught a panic
~/go/src/github.com/dgryski/bug/rp $ tinygo run main.go
panic: runtime error: index out of range
error: failed to run compiled binary /var/folders/5b/_hr1d1fd3qn4t9vtfx5p61wm0000gp/T/tinygo4189450643/main: signal: abort trap
This is because runtimePanic() doesn't call _panic() but leads directly to abort().
This is because
runtimePanic()
doesn't call_panic()
but leads directly toabort()
.https://github.com/tinygo-org/tinygo/blob/release/src/runtime/panic.go#L56
The text was updated successfully, but these errors were encountered: