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:
Ayke van Laethem
2018-10-30 15:54:02 +01:00
parent 0314a487ff
commit a459570d94
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -49,6 +49,7 @@ func align(ptr uintptr) uintptr {
return (ptr + 3) &^ 3
}
// Abort executes the wasm 'unreachable' instruction.
func abort() {
// TODO
trap()
}