mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-11 06:23:39 +00:00
wasm: execute an 'unreachable' trap inst on panic
This already happened when directly calling panic() but not with some runtime panics like accessing a slice out of bounds.
This commit is contained in:
@@ -49,6 +49,7 @@ func align(ptr uintptr) uintptr {
|
||||
return (ptr + 3) &^ 3
|
||||
}
|
||||
|
||||
// Abort executes the wasm 'unreachable' instruction.
|
||||
func abort() {
|
||||
// TODO
|
||||
trap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user