Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When I executed the collatz test case in wasm, there was a crash. #2588

Open
abc767234318 opened this issue Sep 22, 2022 · 0 comments
Open
Labels

Comments

@abc767234318
Copy link

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

Any relevant logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant