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/   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:     Wstringop-overflow-34.c (5.99 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR middle-end/95353 - spurious -Wstringop-overflow writing to a trailing
   array plus offset
   { dg-do compile }
   { dg-options "-O2 -Wall" } */

typedef __SIZE_TYPE__ size_t;

struct S0 { char n, a[0]; };


void s0_nowarn_cstidx (struct S0 *p)
{
  char *q = p->a;
  q[1] = __LINE__;
  q[9] = __LINE__;
}

void s0_nowarn_cstoff_cstidx (struct S0 *p)
{
  char *q = p->a + 1;
  q[1] = __LINE__;
  q[9] = __LINE__;
}

void s0_nowarn_varoff_cstdix (struct S0 *p, int i)
{
  char *q = p->a + i;
  q[1] = __LINE__;            // { dg-bogus "\\\[-Wstringop-overflow" }
  q[9] = __LINE__;            // { dg-bogus "\\\[-Wstringop-overflow" }
}

void s0_nowarn_cstoff_varidx (struct S0 *p, int i)
{
  char *q = p->a + 1;
  q[i] = __LINE__;
}

void s0_nowarn_varoff_varidx (struct S0 *p, int i, int j)
{
  char *q = p->a + i;
  q[j] = __LINE__;            // { dg-bogus "\\\[-Wstringop-overflow" }
}


/* Accesses past the end of a trailing array with one element is
   discouraged but still reluctantly not diagnosed.  This should
   change.  */

struct S1 { char n, a[1]; };


void s1_nowarn_cstidx (struct S1 *p)
{
  char *q = p->a;
  q[1] = __LINE__;
  q[9] = __LINE__;
}

void s1_nowarn_cstoff_cstidx (struct S1 *p)
{
  char *q = p->a + 1;
  q[1] = __LINE__;
  q[9] = __LINE__;
}

void s1_nowarn_varoff_cstdix (struct S1 *p, int i)
{
  char *q = p->a + i;
  q[1] = __LINE__;            // { dg-bogus "\\\[-Wstringop-overflow" }
  q[9] = __LINE__;            // { dg-bogus "\\\[-Wstringop-overflow" }
}

void s1_nowarn_cstoff_varidx (struct S1 *p, int i)
{
  char *q = p->a + 1;
  q[i] = __LINE__;
}

void s1_nowarn_varoff_varidx (struct S1 *p, int i, int j)
{
  char *q = p->a + i;
  q[j] = __LINE__;
}


/* Accesses past the end of a trailing array with more than one
   element should be diagnosed but aren't yet because the MEM_REF
   makes the out-of-bounds accesses indistinguishable from valid
   ones to subsequent elements of the array pointed by P.  */

struct S2 { char n, a[2]; };


void s2_warn_cstidx (struct S2 *p)
{
  char *q = p->a;

  /* The following invalid store is represented as
       MEM[(char *)p_1(D) + 3B] = __LINE__;
     which is indistinguishable from the valid
       q = &p[1].n; q[0] = __LINE__;
  */
  q[2] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* } }
}

void s2_warn_cstoff_cstidx (struct S2 *p)
{
  char *q = p->a + 1;
  q[1] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* }  }
}

void s2_warn_varoff_cstdix (struct S2 *p, int i)
{
  char *q = p->a + i;
  q[2] = __LINE__;            // { dg-warning "\\\[-Warray-bounds|-Wstringop-overflow" }
}

void s2_warn_cstoff_varidx (struct S2 *p, int i)
{
  char *q = p->a + 1;
  q[i] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* }  }
}

void s2_warn_varoff_varidx (struct S2 *p, int i, int j)
{
  char *q = p->a + i;
  q[j] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* }  }
}


/* Verify that none of these triggers a bogus warning (not tested
   elsewhere but triggered during bootstrap).  */

void s2_nowarn_varidx_int (struct S2 *p, int i)
{
  extern struct S2 s2;
  extern struct S2 s2a[];

  s2.a[i - 1] = __LINE__;
  s2.a[i] = __LINE__;
  s2.a[i + 1] = __LINE__;

  s2a[i].a[i - 1] = __LINE__;
  s2a[i].a[i] = __LINE__;
  s2a[i].a[i + 1] = __LINE__;

  p[i].a[i - 1] = __LINE__;
  p[i].a[i] = __LINE__;
  p[i].a[i + 1] = __LINE__;

  char *q = p->a;
  q[i - 1] = __LINE__;
  q[i] = __LINE__;
  q[i + 1] = __LINE__;
}

/* Same as above but with a size_t index in range [1, SIZE_MAX].  */

void* s2_nowarn_varidx_size (struct S2 *p, size_t i, size_t j)
{
  extern struct S2 s2;
  extern struct S2 s2a[];
  struct S2 *ps2 = __builtin_malloc (3 * sizeof *ps2);

  s2.a[i - 1] = __LINE__;
  s2.a[i] = __LINE__;
  s2.a[i + 1] = __LINE__;

  s2a[i].a[i - 1] = __LINE__;
  s2a[i].a[i] = __LINE__;
  s2a[i].a[i + 1] = __LINE__;

  p[i].a[i - 1] = __LINE__;
  p[i].a[i] = __LINE__;
  p[i].a[i + 1] = __LINE__;

  ps2->a[i - 1] = __LINE__;
  ps2->a[i] = __LINE__;
  ps2->a[i + 1] = __LINE__;

  char *q = p->a;
  q[i - 1] = __LINE__;
  q[i] = __LINE__;
  q[i + 1] = __LINE__;

  if (j == 0)
    return ps2;

  s2.a[j - 1] = __LINE__;
  s2.a[j] = __LINE__;
  s2.a[j + 1] = __LINE__;

  s2a[j].a[j - 1] = __LINE__;
  s2a[j].a[j] = __LINE__;
  s2a[j].a[j + 1] = __LINE__;

  p[j].a[j - 1] = __LINE__;
  p[j].a[j] = __LINE__;
  p[j].a[j + 1] = __LINE__;

  ps2->a[j - 1] = __LINE__;
  ps2->a[j] = __LINE__;
  ps2->a[j + 1] = __LINE__;

  q = p->a;
  q[j - 1] = __LINE__;
  q[j] = __LINE__;
  q[j + 1] = __LINE__;

  return ps2;
}

/* Verify that accesses to an interior zero-length array are diagnosed.  */

struct Si0 { char c, a[0], d; };

void si0_warn_cstidx (struct Si0 *p)
{
  // These are indistinguishable from valid accesses to p->d:
  //   MEM[(char *)p_1(D) + 1B] = 0;
  char *q = p->a;
  q[1] = __LINE__;            // { dg-warning "writing 1 byte into a region of size 0"  "pr?????" { xfail *-*-* } }
  q[9] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* } }
}

void si0_warn_cstoff_cstidx (struct Si0 *p)
{
  // Like those above, these too are indistinguishable from valid accesses
  // to p->d.
  char *q = p->a + 1;
  q[1] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* } }
  q[9] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* } }
}

void si0_warn_varoff_cstdix (struct Si0 *p, int i)
{
  char *q = p->a + i;
  q[1] = __LINE__;            // { dg-warning "\\\[-Warray-bounds|-Wstringop-overflow" }
  q[9] = __LINE__;            // { dg-warning "\\\[-Warray-bounds|-Wstringop-overflow" }
}

void si0_warn_cstoff_varidx (struct Si0 *p, int i)
{
  char *q = p->a + 1;
  q[i] = __LINE__;            // { dg-warning "\\\[-Wstringop-overflow" "pr?????" { xfail *-*-* } }
}

void si0_warn_varoff_varidx (struct Si0 *p, int i, int j)
{
  char *q = p->a + i;
  q[j] = __LINE__;            // { dg-warning "\\\[-Warray-bounds|-Wstringop-overflow" }
}

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.0059 ]--