flutter_rust_bridge icon indicating copy to clipboard operation
flutter_rust_bridge copied to clipboard

Test for memory issues on Web

Open Desdaemon opened this issue 3 years ago • 1 comments

I think this PR is already quite long, so we should migrate to miri in 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

Desdaemon avatar Aug 19 '22 01:08 Desdaemon

Related comments: https://github.com/fzyzcjy/flutter_rust_bridge/pull/589#discussion_r928636184

fzyzcjy avatar Aug 21 '22 06:08 fzyzcjy

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.

stale[bot] avatar Nov 06 '22 09:11 stale[bot]

bump

fzyzcjy avatar Nov 06 '22 11:11 fzyzcjy

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.

stale[bot] avatar Jan 06 '23 02:01 stale[bot]

bump

fzyzcjy avatar Jan 06 '23 02:01 fzyzcjy

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.

stale[bot] avatar Mar 07 '23 03:03 stale[bot]

This might be okay to leave on the back burner for now, for two reasons:

  1. 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.
  2. 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.

Desdaemon avatar Mar 07 '23 14:03 Desdaemon

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.

stale[bot] avatar May 06 '23 15:05 stale[bot]

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.

github-actions[bot] avatar May 29 '23 23:05 github-actions[bot]