oyente icon indicating copy to clipboard operation
oyente copied to clipboard

Bad return value

Open mrx23dot opened this issue 3 years ago • 2 comments

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

mrx23dot avatar Jan 26 '22 22:01 mrx23dot

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.

gsalzer avatar Jul 15 '22 13:07 gsalzer

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

mrx23dot avatar Jul 15 '22 14:07 mrx23dot