mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 05:53:39 +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:
+1
-1
@@ -8,4 +8,4 @@ import _ "unsafe"
|
||||
func vgetrandom(p []byte, flags uint32) (ret int, supported bool) { return 0, false }
|
||||
|
||||
//go:linkname fatal crypto/internal/sysrand.fatal
|
||||
func fatal(msg string) { runtimePanic(msg) }
|
||||
func fatal(msg string) { runtimeFatal(msg) }
|
||||
|
||||
Reference in New Issue
Block a user