danleh / wasabi

A dynamic analysis framework for WebAssembly programs.
http://wasabi.software-lab.org
MIT License
363 stars 47 forks source link

Adding Support for new WebAssembly.Instance #4

Closed ghost closed 5 years ago

ghost commented 5 years ago

Instead of an error message, WebAssembly.Instance now works as expected. It is monkey patched in the very same way WebAssembly.instantiate and WebAssembly.instantiateStreaming work.

danleh commented 5 years ago

Hi Frederik! Thanks a lot for the PR, looks good (sorry it took a while for me to merge).

Out of interest, two questions:

  1. For which application do you want to use the WebAssembly.Instance constructor? Just personal experiments or have you found a website with WebAssembly that uses this instantiation method? If it is used in real-world code, I would be very interested to see how/why not the asynchronous version.
  2. Is the 4KB maximum module size is still present for WebAssembly.Instance() in Chrome? (see https://developers.google.com/web/updates/2018/04/loading-wasm) If so, did you hit any problem with Wasabi? Because instrumentation done by Wasabi might increase the module size, such that it comes over that limit, if it wasn't already before.
ghost commented 5 years ago

Hi Daniel,

thanks for accepting! I am analysing some benchmarks and they happen to use WebAssembly.Instance. They do so to have everything needed in just one file. At least with d8 I did not touch any module size limit yet. The subject module is about 12MB and almost doubles in size with Wasabi (20MB). We use Wasabi only to analyse the benchmark. The Wasabi version of the module is not used for running time evaluation.

All the best, Frederik

On Sat, Apr 6, 2019 at 9:19 PM Daniel Lehmann notifications@github.com wrote:

Hi Frederik! Thanks a lot for the PR, looks good (sorry it took a while for me to merge).

Out of interest, two questions:

  1. For which application do you want to use the WebAssembly.Instance constructor? Just personal experiments or have you found a website with WebAssembly that uses this instantiation method? If it is used in real-world code, I would be very interested to see how/why not the asynchronous version.
  2. Is the 4KB maximum module size is still present for WebAssembly.Instance() in Chrome? (see https://developers.google.com/web/updates/2018/04/loading-wasm) If so, did you hit any problem with Wasabi? Because instrumentation done by Wasabi might increase the module size, such that it comes over that limit, if it wasn't already before.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/danleh/wasabi/pull/4#issuecomment-480530536, or mute the thread https://github.com/notifications/unsubscribe-auth/AvBXjqG5smsc8x7vA9fAjT4fndE9W6teks5vePNIgaJpZM4cela7 .

--

Frederik Gossen

Software Engineering Intern

frgossen@google.com

Google Germany GmbH

Erika-Mann-Straße 33

80636 München

Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls sie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.