]> Cypherpunks repositories - gostls13.git/commit
runtime: make the wasm crash function abort
authorCherry Mui <cherryyz@google.com>
Fri, 9 Aug 2024 16:50:24 +0000 (12:50 -0400)
committerCherry Mui <cherryyz@google.com>
Mon, 12 Aug 2024 16:17:59 +0000 (16:17 +0000)
commit2f3fee058f3bb1c98b8ecc5aeb2329aaadf4dc0b
tree34fa9b60f456173fa5262c31956742bedeb6553a
parent2ebe15c67e1989ccf962d587df1d4d18eb188da2
runtime: make the wasm crash function abort

Currently the crash function on Wasm is implemented as a nil
pointer dereference, which turns into a sigpanic, which turns into
"panic during runtime execution" as we're already in runtime when
crash is called. Instead, just abort, which crashes hard and
terminates the Wasm module execution, and the execution engine
often dumps a stack trace.

Change-Id: I3c57f8ff7a0c0015e4abcd7bf262bf9001624b85
Reviewed-on: https://go-review.googlesource.com/c/go/+/604515
Reviewed-by: Achille Roussel <achille.roussel@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/os_wasm.go