WebAssembly / WebAssembly/binaryen
Slow to disassemble some crafted wasm files
未關閉
還沒有人認領這個 Issue。
- 主要語言
- WebAssembly
- 星號
- 8.6k
- 分支
- 885
- 平均合併
- 1 天 19 小時
- 30 天內合併 PR
- 69
描述
wasm-dis may sometimes spend too much time to disassemble certain crafted wasm files.
wasm-dis-slow.zip
It turns out that inside WasmBinaryBuilder::readFunctions(), at https://github.com/WebAssembly/binaryen/blob/master/src/wasm/wasm-binary.cpp#L1073-L1080, the value num may get extremely large (I haven't figured out why yet), and subsequent operations require too much time to finish.
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
研究方向
從提供的 wasm-dis-slow.zip 開始,檢查 src/wasm/wasm-binary.cpp 中大約第 1073–1080 行的 WasmBinaryBuilder::readFunctions(),重點關注值 num 的取得和使用方式。重現緩慢的反組譯,並確定 num 為什麼會變得極大。當製作的檔案不再導致 wasm-dis 花費過多時間時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- cpp, wasm
- 領域
- compilers
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100