I'm exploring Frama-C and tried this example, which according to the manual (on page 83) should be Handled (CWE-457), and the RTE manual 2.7 (do ints have a trap representation? http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2091.htm) should be covered?
/*@ assigns \nothing; @*/
int f() {
int a;
return a;
}
/*@ assigns \nothing; @*/
int main() {
if (f() < 0) {
return 0;
} else {
return 1;
}
}
#include<stdio.h>
/*@ assigns \nothing; @*/
char f() {
char a;
return a;
}
/*@ assigns \nothing; @*/
int main() {
char s[2];
s[0] = f();
s[1] = '\0';
puts(s);
return 0;
}
However when I run these examples frama-c -wp -wp-rte
they seem to pass. Is this intended behaviour?