PKU-ASAL / SeeWasm

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

Fail to analyze a counting arguments program in Rust #82

Closed harveyghq closed 2 years ago

harveyghq commented 2 years ago

Describe the bug

When collecting and counting arguments in Rust (like argc in C), the program exits in advance without any warnings / errors.

To Reproduce

Expected behavior

Program exits normally, printing the number of given arguments.

$ wasmtime count_args.wasm 123 456
args len: 3

Additional context

// count_args.rs
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    println!("args len: {}", args.len());
}
HNYuuu commented 2 years ago

Fix the early termination error in b3a92db, but encounter the same issue mentioned in #81.

HNYuuu commented 2 years ago

This sample is passed, and the memory issue is fixed in a2f0c31.

Test command:

python eunomia_entry.py -f /home/ningyu/Wasm-SE/Wasm-samples/rust_samples/count_args.wasm -s --sym_args 2 2 -v info