mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 06:38:42 +00:00
eed4afda63
Emit fault checkpoints around compiler-generated runtime assertions so runtimePanicAt can unwind through the existing defer/recover machinery instead of aborting. This lets panics from bounds checks, type checks, and other compiler-inserted runtime checks be recovered by deferred functions. Mark functions that call recover as noinline. Inlining such a function into a deferred closure can make recover observe the wrong call context and report success when it should return nil. Addresses tinygo-org/tinygo issues 2759 and 3510.