PKU-ASAL / SeeWasm

A native symbolic execution engine for WebAssembly
40 stars 4 forks source link

link_dummy_blocks() error? #89

Closed xxwlyl closed 1 year ago

xxwlyl commented 1 year ago

Describe the bug when I try to execute my wasm module with SeeWasm, there is something wrong in the function link_dummy_blcoks() in graph.py. the report says " STDERR: Traceback (most recent call last): File "launcher.py", line 133, in main() File "launcher.py", line 111, in main Graph.initialize() File "/Users/xuxiaowei/Desktop/intern/SeeWasm/seewasm/arch/wasm/graph.py", line 385, in initialize link_dummy_blocks() File "/Users/xuxiaowei/Desktop/intern/SeeWasm/seewasm/arch/wasm/graph.py", line 350, in link_dummy_blocks bbnames, = list(zip(*need_update_bb_info)) ValueError: not enough values to unpack (expected 2, got 0) "

To Reproduce Steps to reproduce the behavior:

  1. compile my own file
  2. move the file to the folder 'test'
  3. run SeeWasm

Expected behavior expect the program to run fine

C code int main(){ return 0; }

HNYuuu commented 1 year ago

Issue fixed in 3e253eb

The issue appears when there are no call or call_indirect instructions at all, like the code you write, an empty function. Thus, I add a verification on the existence of call and call_indirect.

p.s. Please follow the compiling process introduced in https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md#compiling-to-wasi.