Open zhendongsu opened 7 years ago
Neither example should be considered as a bug:
volatile
is to indicate that reading from a variable is an input. In order to run in tis-interpreter programs that receive inputs this way, some adjustment is necessary in order to let them receive their input in a different way. tis-interpreter tries to point out the closest program point it can to where a volatile variable is read.return
statement of the main
function. This is fine because reading from a volatile
variable is not a bug.If you are using volatile
only as a way to trigger compiler bugs and not to indicate extra inputs to the program, please use --cc -Dvolatile=
in order to make tis-interpreter ignore it:
$ tis-interpreter.sh --cc -Dvolatile= test1.c
[value] Analyzing a complete application starting at main
[value] Computing initial state
[value] Initial state computed
[value] done for function main
Thank you for the explanation, Pascal. I'll turn on --cc -Dvolatile=
.
Defining away volatile is what I usually do when using tis-interpreter to detect UB.