diff --git a/mythril/analysis/modules/suicide.py b/mythril/analysis/modules/suicide.py index 75f1de3b..e973946a 100644 --- a/mythril/analysis/modules/suicide.py +++ b/mythril/analysis/modules/suicide.py @@ -62,12 +62,6 @@ class SuicideModule(DetectionModule): return [] try: - model = solver.get_model(constraints) - logging.debug( - "[SUICIDE] SUICIDE instruction is callable by anyone " - + node.function_name - ) - try: transaction_sequence = solver.get_transaction_sequence( state, constraints + [to == ARBITRARY_SENDER_ADDRESS] @@ -99,7 +93,7 @@ class SuicideModule(DetectionModule): ) issues.append(issue) except UnsatError: - logging.debug("[UNCHECKED_SUICIDE] no model found") + logging.debug("[SUICIDE] no model found") return issues diff --git a/tests/testdata/outputs_expected/suicide.sol.o.json b/tests/testdata/outputs_expected/suicide.sol.o.json index c311ae14..70549e18 100644 --- a/tests/testdata/outputs_expected/suicide.sol.o.json +++ b/tests/testdata/outputs_expected/suicide.sol.o.json @@ -1,18 +1 @@ -{ - "error": null, - "issues": [ - { - "address": 146, - "contract": "Unknown", - "debug": "", - "description": "A reachable SUICIDE instruction was detected. The remaining Ether is sent to an address provided as a function argument.\n", - "function": "kill(address)", - "swc-id": "106", - "min_gas_used": 168, - "max_gas_used": 263, - "title": "Unchecked SUICIDE", - "type": "Warning" - } - ], - "success": true -} +{"error": null, "issues": [{"address": 146, "contract": "Unknown", "debug": "", "description": "The contract can be killed by anyone and the attacker can withdraw its balance.", "function": "kill(address)", "max_gas_used": 263, "min_gas_used": 168, "swc-id": "106", "title": "Unchecked SUICIDE", "type": "Warning"}], "success": true} \ No newline at end of file diff --git a/tests/testdata/outputs_expected/suicide.sol.o.markdown b/tests/testdata/outputs_expected/suicide.sol.o.markdown index 78daf264..fc18dab2 100644 --- a/tests/testdata/outputs_expected/suicide.sol.o.markdown +++ b/tests/testdata/outputs_expected/suicide.sol.o.markdown @@ -10,4 +10,4 @@ ### Description -A reachable SUICIDE instruction was detected. The remaining Ether is sent to an address provided as a function argument. +The contract can be killed by anyone and the attacker can withdraw its balance. diff --git a/tests/testdata/outputs_expected/suicide.sol.o.text b/tests/testdata/outputs_expected/suicide.sol.o.text index f61419c5..02008c92 100644 --- a/tests/testdata/outputs_expected/suicide.sol.o.text +++ b/tests/testdata/outputs_expected/suicide.sol.o.text @@ -5,7 +5,6 @@ Contract: Unknown Function name: kill(address) PC address: 146 Estimated Gas Usage: 168 - 263 -A reachable SUICIDE instruction was detected. The remaining Ether is sent to an address provided as a function argument. - +The contract can be killed by anyone and the attacker can withdraw its balance. --------------------