Software: Apache. PHP/5.4.45 

uname -a: Linux webm056.cluster010.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue
Sep 17 08:14:20 UTC 2024 x86_64
 

uid=243112(mycochar) gid=100(users) groups=100(users)  

Safe-mode: OFF (not secure)

/home/mycochar/www/image/photo/gcc-12.3.0/gcc/testsuite/gcc.dg/analyzer/torture/   drwxr-xr-x
Free 0 B of 0 B (0%)
Your ip: 216.73.216.77 - Server ip: 213.186.33.19
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    

[Enumerate]    [Encoder]    [Tools]    [Proc.]    [FTP Brute]    [Sec.]    [SQL]    [PHP-Code]    [Backdoor Host]    [Back-Connection]    [milw0rm it!]    [PHP-Proxy]    [Self remove]
    


Viewing file:     boxed-int-1.c (3.73 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */

#include "../analyzer-decls.h"

typedef struct boxed_int { int value; } boxed_int;

extern boxed_int boxed_int_add (boxed_int a, boxed_int b);
extern boxed_int boxed_int_mul (boxed_int a, boxed_int b);

boxed_int  __attribute__((noinline))
noinline_boxed_int_add (boxed_int a, boxed_int b)
{
  boxed_int result;
  result.value = a.value + b.value;
  return result;
}

static inline boxed_int
inline_boxed_int_add (boxed_int a, boxed_int b)
{
  boxed_int result;
  result.value = a.value + b.value;
  return result;
}

boxed_int
test_1 (boxed_int a, boxed_int b)
{
  boxed_int result = boxed_int_add (boxed_int_mul (a, a),
                    boxed_int_mul (b, b));
  return result;
}

void
test_2a (void)
{
  boxed_int arr[4];
  arr[0].value = 1;
  arr[1].value = 2;
  arr[2].value = 3;
  arr[3].value = 4;
  boxed_int sum;
  sum.value = arr[0].value + arr[1].value + arr[2].value + arr[3].value;
  __analyzer_eval (sum.value == 10); /* { dg-warning "TRUE" } */
}

void
test_2b (void)
{
  boxed_int a, b, c, d;
  a.value = 1;
  b.value = 2;
  c.value = 3;
  d.value = 4;
  boxed_int sum;
  sum.value = a.value + b.value + c.value + d.value;
  __analyzer_eval (sum.value == 10); /* { dg-warning "TRUE" } */
}

void
test_2c (void)
{
  boxed_int a, b, c, d;
  a.value = 1;
  b.value = 2;
  c.value = 3;
  d.value = 4;
  boxed_int sum = inline_boxed_int_add (inline_boxed_int_add (a, b),
                    inline_boxed_int_add (c, d));
  __analyzer_eval (sum.value == 10); /* { dg-warning "TRUE" } */
}

void
test_2d (void)
{
  boxed_int a, b, c, d;
  a.value = 1;
  b.value = 2;
  c.value = 3;
  d.value = 4;
  boxed_int sum = noinline_boxed_int_add (noinline_boxed_int_add (a, b),
                      noinline_boxed_int_add (c, d));
  __analyzer_eval (sum.value == 10); /* { dg-warning "TRUE" } */
}

/* Pointer to a local.  */

void test_4 (void)
{
  boxed_int i;
  int *p = &i.value;
  i.value = 1;
  *p = 2;
  __analyzer_eval (i.value == 2); /* { dg-warning "TRUE" } */
}

/* Local array.  */

void test_5 (void)
{
  boxed_int a[10];
  a[3].value = 5; /* ARRAY_REF.  */
  __analyzer_eval (a[3].value == 5); /* { dg-warning "TRUE" } */
}

/* Local array, but using an unknown index.  */

void test_5a (int idx)
{
  boxed_int a[10];
  a[idx].value = 5; /* ARRAY_REF.  */
  __analyzer_eval (a[idx].value == 5); /* { dg-warning "TRUE" } */
}

/* Array passed in as a param.  */

void test_6 (boxed_int a[10])
{
  /* POINTER_PLUS_EXPR then a MEM_REF.  */
  __analyzer_eval (a[3].value == 42); /* { dg-warning "UNKNOWN" } */
  a[3].value = 42;
  __analyzer_eval (a[3].value == 42); /* { dg-warning "TRUE" } */
}

/* Array passed in as a param ptr.  */

void test_7 (boxed_int *a)
{
  __analyzer_eval (a[3].value == 42); /* { dg-warning "UNKNOWN" } */
  a[3].value = 42;
  __analyzer_eval (a[3].value == 42); /* { dg-warning "TRUE" } */
}

/* Globals.  */

boxed_int glob_a;

void test_10 (void)
{
  __analyzer_eval (glob_a.value == 42); /* { dg-warning "UNKNOWN" } */
  glob_a.value = 42;
  __analyzer_eval (glob_a.value == 42); /* { dg-warning "TRUE" } */
}

/* Use of uninit value.  */
int test_12a (void)
{
  boxed_int i; /* { dg-message "region created on stack here" } */
  return i.value; /* { dg-warning "use of uninitialized value 'i.value'" } */
}

/* Use of uninit value.  */
boxed_int test_12b (void)
{
  boxed_int i; /* { dg-message "region created on stack here" } */
  return i; /* { dg-warning "use of uninitialized value '\[^\n\r\]*'" } */
}

void test_loop (void)
{
  boxed_int i;

  __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */

  for (i.value=0; i.value<256; i.value++) {
      __analyzer_dump_exploded_nodes (0); /* { dg-warning "2 processed enodes" } */
  }

  __analyzer_dump_exploded_nodes (0); /* { dg-warning "1 processed enode" } */
}

Enter:
 
Select:
 

Useful Commands
 
Warning. Kernel may be alerted using higher levels
Kernel Info:

Php Safe-Mode Bypass (Read Files)

File:

eg: /etc/passwd

Php Safe-Mode Bypass (List Directories):

Dir:

eg: /etc/

Search
  - regexp 

Upload
 
[ ok ]

Make Dir
 
[ ok ]
Make File
 
[ ok ]

Go Dir
 
Go File
 

--[ x2300 Locus7Shell v. 1.0a beta Modded by #!physx^ | www.LOCUS7S.com | Generation time: 0.0064 ]--