mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-17 19:23:25 +00:00
runtime: make fatal failures unrecoverable
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.
This commit is contained in:
@@ -15,5 +15,5 @@ func sleepTicks(d timeUnit) {
|
||||
// Without the cooperative scheduler running poll_oneoff on FDs, wasip1 has
|
||||
// nothing to wake on, so this is a hard deadlock.
|
||||
func waitForEvents() {
|
||||
runtimePanic("deadlocked: no event source")
|
||||
runtimeFatal("deadlocked: no event source")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user