Test for memory issues on Web
I think this PR is already quite long, so we should migrate to
miriin a separate PR.There is another way which revolves around running tests in Node.js/Deno/some other WASM runtime instead and then run it with Valgrind, but similarly will be a non-trivial amount of work. (For obvious reasons, I don't think running Valgrind on the browser is a great idea.)
Originally posted by @Desdaemon in https://github.com/fzyzcjy/flutter_rust_bridge/pull/589#discussion_r949707642
Related comments: https://github.com/fzyzcjy/flutter_rust_bridge/pull/589#discussion_r928636184
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bump
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
bump
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This might be okay to leave on the back burner for now, for two reasons:
- Traditional memory issues like invalid memory accesses don't forcefully terminate the entire program, but only the running WASM code. This is because WASM acts on a JS-controlled buffer, and JS makes sure that all invalid operations result in a runtime error that we can/are catching as part of error handling.
- Barring great interest from other contributors, it might be hard to bring tools like Valgrind/Miri/ASan to WASM, mainly because they work on standalone binaries. Exceptions like ASAN for emcc exist, but they are not readily consumable by our Rust code yet.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.