enzymefinance / oyente

An Analysis Tool for Smart Contracts
GNU General Public License v3.0
1.32k stars 309 forks source link

Bad return value #433

Open mrx23dot opened 2 years ago

mrx23dot commented 2 years ago

Running python /oyente/oyente/oyente.py --compilation-error -s /home/test.txt -b test.txt

gives return value of 1 not 0, but result is valid:

WARNING:root:You are using evm version 1.8.2. The supported version is 1.7.3
WARNING:root:You are using solc version 0.4.21, The latest supported version is 0.4.19
INFO:symExec:   ============ Results ===========
INFO:symExec:     EVM Code Coverage:                     0.2%
INFO:symExec:     Callstack Depth Attack Vulnerability:  True
INFO:symExec:     Transaction-Ordering Dependence (TOD): False
INFO:symExec:     Timestamp Dependency:                  False
INFO:symExec:     Re-Entrancy Vulnerability:             False
INFO:symExec:   ====== Analysis Completed ======

echo $?

oyente version 0.2.7 - Commonwealth

gsalzer commented 2 years ago

Oyente seems to return exit code 1 if a vulnerability is found, and 0 if none is detected. So the behavior you observe seems to be by design, not by error.

mrx23dot commented 2 years ago

yeah, but if gcc would give non zero exit code on any warning none of the toolchains would work.