playground
playground copied to clipboard
Exceptions raised from Rust with `error::raise` crash the playground with an unreachable error
Exceptions raised in Rust code crash the playground.
Example
Regexp.compile(Object.new)
Integer('0x')
Stacktrace
159ff24693cdf2cbaabe.bundle.js:2 artichoke 0.1.0-pre.0 (2021-02-24 revision 4156) [wasm32-unknown-emscripten]
159ff24693cdf2cbaabe.bundle.js:2 [rustc 1.50.0 (cb75ad5db 2021-02-10) on x86_64-unknown-linux-gnu]
159ff24693cdf2cbaabe.bundle.js:2 Uncaught RuntimeError: unreachable
at https://artichoke.run/playground.wasm:wasm-function[187]:0x22952
at dynCall_viii (https://artichoke.run/playground.wasm:wasm-function[3052]:0x1fa79a)
at https://artichoke.run/159ff24693cdf2cbaabe.bundle.js:2:2437295
at invoke_viii (https://artichoke.run/159ff24693cdf2cbaabe.bundle.js:2:2502225)
at https://artichoke.run/playground.wasm:wasm-function[1695]:0x120ede
at https://artichoke.run/playground.wasm:wasm-function[1696]:0x121526
at https://artichoke.run/playground.wasm:wasm-function[1353]:0xdd4e9
at https://artichoke.run/playground.wasm:wasm-function[188]:0x229ee
at dynCall_viii (https://artichoke.run/playground.wasm:wasm-function[3052]:0x1fa79a)
at https://artichoke.run/159ff24693cdf2cbaabe.bundle.js:2:2437295
discovered while working on https://github.com/artichoke/artichoke/pull/1107.
I think these upstream mruby PRs might be related since the crashes occur when raising errors in native code:
- https://github.com/mruby/mruby/pull/5415
- https://github.com/mruby/mruby/commit/1a82bab1b04a4e55cd802af2b54d84a1ac4c5a79