mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
16fc1ea2bb
Match the Go runtime by terminating for deadlocks, stack overflows, runtime and GC invariants, invalid lock operations, and platform initialization failures instead of routing them through panic/recover. Keep language-level runtime errors and unsupported user operations recoverable. Add crash coverage that verifies fatal errors bypass deferred recover calls.
13 lines
140 B
Go
13 lines
140 B
Go
package main
|
|
|
|
import "sync"
|
|
|
|
func main() {
|
|
defer func() {
|
|
println("recovered:", recover())
|
|
}()
|
|
|
|
var mutex sync.Mutex
|
|
mutex.Unlock()
|
|
}
|