manticore
manticore copied to clipboard
When I executed the collatz test case in wasm, there was a crash.
Summary of the problem
I made some changes to the collatz.wasm file, and here is the result of my changes. collatz.wasm.zip
Manticore version
Version: 0.3.7
Python version
Python 3.8.10
OS / Environment
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal
Dependencies
CVC4
Step to reproduce the behavior
python3 collatz.py
Expected behavior
No crash.
Actual behavior
Output following:
============ Example 1 ============
Traceback (most recent call last):
File "collatz.py", line 24, in <module>
m = ManticoreWASM("collatz.wasm")
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/wasm/manticore.py", line 31, in __init__
initial_state = _make_initial_state(path_or_state, env, sup_env, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/wasm/manticore.py", line 209, in _make_initial_state
return _make_wasm_bin(binary_path, env=env, sup_env=sup_env, **kwargs)
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/wasm/manticore.py", line 227, in _make_wasm_bin
platform = wasm.WASMWorld(program, constraints=constraints)
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/platforms/wasm.py", line 56, in __init__
self.register_module(name, filename)
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/platforms/wasm.py", line 123, in register_module
self.modules.append((Module.load(filename_or_alias), ModuleInstance(self.constraints)))
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/wasm/structure.py", line 369, in load
[type_map[p_type] for p_type in ft.param_types],
File "/home/ubuntu/.local/lib/python3.8/site-packages/manticore/wasm/structure.py", line 369, in <listcomp>
[type_map[p_type] for p_type in ft.param_types],
KeyError: -32