rustwasm/twiggy

Twiggy used too much memory and OOM panicked

Opened this issue ยท 0 comments

๐Ÿ› Bug Description

I tried to run twiggy paths on my wasm binary but it kept climbing in memory usage until it was using over 10 gigs of memory and my system ran out of memory.

twiggy version: twiggy-opt 0.6.0

๐ŸŒ Test Case

GitHub doesn't let me upload wasm files directly so this is a zip with the file inside it. It's a 2.32 megabyte binary compiled using wasm-pack from rink-js.

rink_js_bg.zip

๐Ÿ‘Ÿ Steps to Reproduce

  1. Have a Windows 10 PC with 16 gigabytes of memory. Other OSes or amounts of RAM might work too.
  2. Run twiggy paths rink_js_bg.wasm.
  3. Wait like 10 minutes.
  4. OOM panic.

๐Ÿ˜ฒ Actual Behavior

Something like "Failed to allocate 224 bytes" printed to the console and then all the apps on my PC crashed including the terminal Twiggy was running in.

๐Ÿค” Expected Behavior

I want to use Twiggy to figure out why my binary is so big.