manticore
manticore copied to clipboard
Manticore hang on and m.c.worker:NameError
Summary of the problem
Hi maintainers, Manticore failed to analyze the smart contract below and hang on.
pragma solidity ^0.4.18;
contract MultiplicatorX3
{
address public Owner = msg.sender;
function() public payable{}
function withdraw()
payable
public
{
require(msg.sender == Owner);
Owner.transfer(this.balance);
}
function Command(address adr,bytes data)
payable
public
{
require(msg.sender == Owner);
adr.call.value(msg.value)(data);
}
function multiplicate(address adr)
public
payable
{
if(msg.value>=this.balance)
{
adr.transfer(this.balance+msg.value);
}
}
}
Manticore version
0.3.5
Python version
3.6.9
OS / Environment
mac os Big Sur / Ubuntu 18.04
Dependencies
Step to reproduce the behavior
- docker pull trailofbits/manticore
- use the default solc
- manticore test.sol
Actual behavior
It hang on and I got the following error log
Any relevant logs
error log:
021-04-24 08:58:47,314: [686] m.main:INFO: Beginning analysis
2021-04-24 08:58:47,344: [686] m.e.manticore:INFO: Starting symbolic create contract
2021-04-24 08:58:57,395: [686] m.e.manticore:INFO: Starting symbolic transaction: 0
2021-04-24 08:59:14,850: [686] m.u.event:WARNING: Exception raised in callback: name 'AND' is not defined
2021-04-24 08:59:14,902: [686] m.c.worker:ERROR: Exception in state 9: NameError("name 'AND' is not defined",)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/manticore/core/worker.py", line 132, in run
current_state.execute()
File "/usr/local/lib/python3.6/dist-packages/manticore/ethereum/state.py", line 8, in execute
return self._platform.execute()
File "/usr/local/lib/python3.6/dist-packages/manticore/platforms/evm.py", line 3097, in execute
self.current_vm.execute()
File "/usr/local/lib/python3.6/dist-packages/manticore/platforms/evm.py", line 1316, in execute
last_pc, last_gas, instruction, arguments, fee, allocated = self._checkpoint()
File "/usr/local/lib/python3.6/dist-packages/manticore/platforms/evm.py", line 1191, in _checkpoint
"will_evm_execute_instruction", self.instruction, self._top_arguments()
File "/usr/local/lib/python3.6/dist-packages/manticore/utils/event.py", line 148, in _publish
self._publish_impl(_name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/utils/event.py", line 175, in _publish_impl
sink._publish_impl(_name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/utils/event.py", line 175, in _publish_impl
sink._publish_impl(_name, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/utils/event.py", line 173, in _publish_impl
sink._publish_impl(_name, self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/utils/event.py", line 166, in _publish_impl
callback(robj(), *new_args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/core/plugin.py", line 25, in g
return f(self, *args, **kwargs)
File "/usr/local/lib/python3.6/dist-packages/manticore/ethereum/detectors.py", line 171, in will_evm_execute_instruction_callback
constraint=AND(msg_sender == dest_address, sent_value != 0),
NameError: name 'AND' is not defined