Commit a9a21f73 authored by Thibault Martin's avatar Thibault Martin
Browse files

Remove files with make clean

parent 804646b3
Pipeline #33140 failed with stage
in 19 seconds
directory file line function property kind status property
. 2048.c 37 getColor mem_access Unknown \valid_read(foreground)
. 2048.c 51 drawBoard precondition of printf_va_3 Unknown valid_read_string(param0)
. 2048.c 51 printf_va_3 precondition Unknown valid_read_string(param0)
. 2048.c 58 drawBoard precondition of printf_va_7 Unknown valid_read_string(param0)
. 2048.c 58 printf_va_7 precondition Unknown valid_read_string(param0)
. 2048.c 61 drawBoard shift Unknown 0 ≤ (int)(*(board + x))[y] < 32
. 2048.c 62 drawBoard precondition of strlen Unknown valid_string_s: valid_read_string(s)
. 2048.c 63 drawBoard precondition of printf_va_8 Unknown valid_read_string(param2)
. 2048.c 63 printf_va_8 precondition Unknown valid_read_string(param2)
. 2048.c 72 drawBoard precondition of printf_va_12 Unknown valid_read_string(param0)
. 2048.c 72 printf_va_12 precondition Unknown valid_read_string(param0)
. 2048.c 90 findTarget mem_access Unknown \valid_read(array + t)
. 2048.c 123 slideArray shift Unknown 0 ≤ (int)*(array + t) < 32
. 2048.c 249 addRandom initialization Unknown \initialized(&list[r][0])
. 2048.c 250 addRandom initialization Unknown \initialized(&list[r][1])
. 2048.c 287 setBufferedInput initialization Unknown \initialized(&new.c_lflag)
FRAMAC_SHARE/libc string.h 125 strlen precondition Unknown valid_string_s: valid_read_string(s)
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 17 (out of 18)
Semantically reached functions = 16
Coverage estimation = 94.1%
Unreached functions (1) =
<2048.c>: signal_callback_handler;
[metrics] References to non-analyzed functions
------------------------------------
Function main references signal_callback_handler (at 2048.c:383)
[metrics] Statements analyzed by Eva
--------------------------
329 stmts in analyzed functions, 326 stmts analyzed (99.1%)
addRandom: 32 stmts out of 32 (100.0%)
countEmpty: 16 stmts out of 16 (100.0%)
drawBoard: 51 stmts out of 51 (100.0%)
findPairDown: 19 stmts out of 19 (100.0%)
gameEnded: 20 stmts out of 20 (100.0%)
getColor: 20 stmts out of 20 (100.0%)
initBoard: 18 stmts out of 18 (100.0%)
main: 48 stmts out of 48 (100.0%)
moveDown: 6 stmts out of 6 (100.0%)
moveLeft: 6 stmts out of 6 (100.0%)
moveRight: 6 stmts out of 6 (100.0%)
moveUp: 11 stmts out of 11 (100.0%)
rotateBoard: 19 stmts out of 19 (100.0%)
slideArray: 20 stmts out of 20 (100.0%)
setBufferedInput: 12 stmts out of 13 (92.3%)
findTarget: 22 stmts out of 24 (91.7%)
This diff is collapsed.
[metrics] Defined functions (18)
======================
addRandom (3 calls); countEmpty (1 call); drawBoard (5 calls);
findPairDown (2 calls); findTarget (1 call); gameEnded (1 call);
getColor (3 calls); initBoard (2 calls); main (0 call); moveDown (1 call);
moveLeft (1 call); moveRight (1 call); moveUp (4 calls);
rotateBoard (16 calls); setBufferedInput (3 calls);
signal_callback_handler (address taken) (0 call); slideArray (2 calls);
test (0 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (2)
==========================
main; test;
Global metrics
==============
Sloc = 399
Decision point = 61
Global variables = 5
If = 57
Loop = 26
Goto = 8
Assignment = 140
Exit point = 18
Function = 18
Function call = 96
Pointer dereferencing = 40
Cyclomatic complexity = 79
2048.c:46:[variadic] warning: Incorrect type for argument 2. The argument will be cast from uint32_t to int.
directory file line function property kind status property
. cwe119.c 28 my_strcmp mem_access Unknown \valid_read(s1 + i)
. cwe119.c 28 my_strcmp mem_access Unknown \valid_read(s2 + i)
. cwe119.c 65 host_lookup precondition of strcpy Invalid or unreachable room_string: \valid(dest + (0 .. strlen(src)))
FRAMAC_SHARE/libc string.h 352 strcpy precondition Invalid or unreachable room_string: \valid(dest + (0 .. strlen(src)))
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 7 (out of 7)
Semantically reached functions = 7
Coverage estimation = 100.0%
[metrics] Statements analyzed by Eva
--------------------------
54 stmts in analyzed functions, 48 stmts analyzed (88.9%)
my_inet_addr: 10 stmts out of 10 (100.0%)
my_strcmp: 12 stmts out of 12 (100.0%)
nonzero_uint32_t: 9 stmts out of 9 (100.0%)
validate_addr_form: 7 stmts out of 7 (100.0%)
host_lookup: 4 stmts out of 5 (80.0%)
my_gethostbyaddr: 4 stmts out of 5 (80.0%)
main: 2 stmts out of 6 (33.3%)
cwe119.c:65:[nonterm:stmt] warning: non-terminating function call
stack: host_lookup :: cwe119.c:70 <- main
cwe119.c:73:[nonterm:unreachable] warning: unreachable return
/* Generated by Frama-C */
#include "errno.h"
#include "inttypes.h"
#include "netdb.h"
#include "netinet/in.h"
#include "signal.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "strings.h"
#include "sys/socket.h"
#include "sys/uio.h"
uint32_t volatile _rand;
uint32_t nonzero_uint32_t(void)
{
uint32_t __retres;
uint32_t r = _rand;
if (! r) {
__retres = 1U;
goto return_label;
}
else {
__retres = r;
goto return_label;
}
return_label: return __retres;
}
/*@ requires valid_read_string(format);
assigns \result, stream->__fc_FILE_data;
assigns \result
\from (indirect: stream->__fc_FILE_id),
(indirect: stream->__fc_FILE_data),
(indirect: *(format + (0 ..)));
assigns stream->__fc_FILE_data
\from (indirect: stream->__fc_FILE_id), stream->__fc_FILE_data,
(indirect: *(format + (0 ..)));
*/
int fprintf_va_1(FILE * __restrict stream, char const * __restrict format);
static void validate_addr_form(char *v)
{
size_t tmp;
size_t tmp_0;
tmp = strspn((char const *)v,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-0123456789.");
tmp_0 = strlen((char const *)v);
if (tmp < tmp_0) {
fprintf(__fc_stderr,"hostname contains invalid characters"); /* fprintf_va_1 */
exit(1);
}
return;
}
static int my_strcmp(char const *s1, char const *s2)
{
int __retres;
size_t i;
i = (unsigned long)0;
while ((int)*(s1 + i) == (int)*(s2 + i)) {
if ((int)*(s1 + i) == 0) {
__retres = 0;
goto return_label;
}
i += (size_t)1;
}
__retres = (int)*((unsigned char *)s1 + i) - (int)*((unsigned char *)s2 + i);
return_label: return __retres;
}
static in_addr_t my_inet_addr(char const *cp)
{
in_addr_t __retres;
int tmp_0;
tmp_0 = my_strcmp(cp,"127.0.0.1");
if (tmp_0 == 0) {
__retres = (unsigned int)0;
goto return_label;
}
else {
in_addr_t tmp;
tmp = nonzero_uint32_t();
__retres = tmp;
goto return_label;
}
return_label: return __retres;
}
static struct hostent my_gethostbyaddr_res;
static struct hostent *my_gethostbyaddr(void const *addr, socklen_t len,
int type)
{
struct hostent *__retres;
if ((in_addr_t *)addr == (in_addr_t *)0) my_gethostbyaddr_res.h_name = (char *)"www.example.com";
else my_gethostbyaddr_res.h_name = (char *)"hypermegagigaterasupercalifragilisticexpialidocious2.example.com";
__retres = & my_gethostbyaddr_res;
return __retres;
}
void host_lookup(char *user_supplied_addr)
{
struct hostent *hp;
in_addr_t addr;
char hostname[64];
validate_addr_form(user_supplied_addr);
addr = my_inet_addr((char const *)user_supplied_addr);
hp = my_gethostbyaddr((void const *)(& addr),
(unsigned int)sizeof(struct in_addr),2);
strcpy(hostname,(char const *)hp->h_name);
return;
}
int main(void)
{
int __retres;
char *very_large_but_valid_hostname = (char *)"127.0.0.1";
host_lookup(very_large_but_valid_hostname);
char *overly_large_hostname = (char *)"127.0.0.2";
host_lookup(overly_large_hostname);
__retres = 0;
return __retres;
}
[metrics] Defined functions (7)
=====================
host_lookup (2 calls); main (0 call); my_gethostbyaddr (1 call);
my_inet_addr (1 call); my_strcmp (1 call); nonzero_uint32_t (1 call);
validate_addr_form (1 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (1)
==========================
main;
Global metrics
==============
Sloc = 54
Decision point = 6
Global variables = 2
If = 6
Loop = 1
Goto = 5
Assignment = 21
Exit point = 7
Function = 7
Function call = 12
Pointer dereferencing = 6
Cyclomatic complexity = 13
directory file line function property kind status property
. cwe119.c 28 my_strcmp mem_access Unknown \valid_read(s1 + i)
. cwe119.c 28 my_strcmp mem_access Unknown \valid_read(s2 + i)
. cwe119.c 65 host_lookup precondition of strcpy Invalid or unreachable room_string: \valid(dest + (0 .. strlen(src)))
FRAMAC_SHARE/libc string.h 352 strcpy precondition Invalid or unreachable room_string: \valid(dest + (0 .. strlen(src)))
[metrics] Eva coverage statistics
=======================
Syntactically reachable functions = 7 (out of 7)
Semantically reached functions = 7
Coverage estimation = 100.0%
[metrics] Statements analyzed by Eva
--------------------------
54 stmts in analyzed functions, 48 stmts analyzed (88.9%)
my_inet_addr: 10 stmts out of 10 (100.0%)
my_strcmp: 12 stmts out of 12 (100.0%)
nonzero_uint32_t: 9 stmts out of 9 (100.0%)
validate_addr_form: 7 stmts out of 7 (100.0%)
host_lookup: 4 stmts out of 5 (80.0%)
my_gethostbyaddr: 4 stmts out of 5 (80.0%)
main: 2 stmts out of 6 (33.3%)
cwe119.c:65:[nonterm:stmt] warning: non-terminating function call
stack: host_lookup :: cwe119.c:70 <- main
cwe119.c:73:[nonterm:unreachable] warning: unreachable return
/* Generated by Frama-C */
#include "errno.h"
#include "inttypes.h"
#include "netdb.h"
#include "netinet/in.h"
#include "signal.h"
#include "stdarg.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "strings.h"
#include "sys/socket.h"
#include "sys/uio.h"
uint32_t volatile _rand;
uint32_t nonzero_uint32_t(void)
{
uint32_t __retres;
uint32_t r = _rand;
if (! r) {
__retres = 1U;
goto return_label;
}
else {
__retres = r;
goto return_label;
}
return_label: return __retres;
}
/*@ requires valid_read_string(format);
assigns \result, stream->__fc_FILE_data;
assigns \result
\from (indirect: stream->__fc_FILE_id),
(indirect: stream->__fc_FILE_data),
(indirect: *(format + (0 ..)));
assigns stream->__fc_FILE_data
\from (indirect: stream->__fc_FILE_id), stream->__fc_FILE_data,
(indirect: *(format + (0 ..)));
*/
int fprintf_va_1(FILE * __restrict stream, char const * __restrict format);
static void validate_addr_form(char *v)
{
size_t tmp;
size_t tmp_0;
tmp = strspn((char const *)v,
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-0123456789.");
tmp_0 = strlen((char const *)v);
if (tmp < tmp_0) {
fprintf(__fc_stderr,"hostname contains invalid characters"); /* fprintf_va_1 */
exit(1);
}
return;
}
static int my_strcmp(char const *s1, char const *s2)
{
int __retres;
size_t i;
i = (unsigned long)0;
while ((int)*(s1 + i) == (int)*(s2 + i)) {
if ((int)*(s1 + i) == 0) {
__retres = 0;
goto return_label;
}
i += (size_t)1;
}
__retres = (int)*((unsigned char *)s1 + i) - (int)*((unsigned char *)s2 + i);
return_label: return __retres;
}
static in_addr_t my_inet_addr(char const *cp)
{
in_addr_t __retres;
int tmp_0;
tmp_0 = my_strcmp(cp,"127.0.0.1");
if (tmp_0 == 0) {
__retres = (unsigned int)0;
goto return_label;
}
else {
in_addr_t tmp;
tmp = nonzero_uint32_t();
__retres = tmp;
goto return_label;
}
return_label: return __retres;
}
static struct hostent my_gethostbyaddr_res;
static struct hostent *my_gethostbyaddr(void const *addr, socklen_t len,
int type)
{
struct hostent *__retres;
if ((in_addr_t *)addr == (in_addr_t *)0) my_gethostbyaddr_res.h_name = (char *)"www.example.com";
else my_gethostbyaddr_res.h_name = (char *)"hypermegagigaterasupercalifragilisticexpialidocious2.example.com";
__retres = & my_gethostbyaddr_res;
return __retres;
}
void host_lookup(char *user_supplied_addr)
{
struct hostent *hp;
in_addr_t addr;
char hostname[64];
validate_addr_form(user_supplied_addr);
addr = my_inet_addr((char const *)user_supplied_addr);
hp = my_gethostbyaddr((void const *)(& addr),
(unsigned int)sizeof(struct in_addr),2);
strcpy(hostname,(char const *)hp->h_name);
return;
}
int main(void)
{
int __retres;
char *very_large_but_valid_hostname = (char *)"127.0.0.1";
host_lookup(very_large_but_valid_hostname);
char *overly_large_hostname = (char *)"127.0.0.2";
host_lookup(overly_large_hostname);
__retres = 0;
return __retres;
}
[metrics] Defined functions (7)
=====================
host_lookup (2 calls); main (0 call); my_gethostbyaddr (1 call);
my_inet_addr (1 call); my_strcmp (1 call); nonzero_uint32_t (1 call);
validate_addr_form (1 call);
Specified-only functions (0)
============================
Undefined and unspecified functions (0)
=======================================
'Extern' global variables (0)
=============================
Potential entry points (1)
==========================
main;
Global metrics
==============
Sloc = 54
Decision point = 6
Global variables = 2
If = 6
Loop = 1
Goto = 5
Assignment = 21
Exit point = 7
Function = 7
Function call = 12
Pointer dereferencing = 6
Cyclomatic complexity = 13
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment