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:     strlenopt-58.c (3.44 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* PR tree-optimization/86711 - wrong folding of memchr

   Verify that calls to memchr() with constant arrays initialized
   with wide string literals are folded.

   { dg-do compile }
   { dg-options "-O1 -Wall -fdump-tree-optimized" } */

#include "strlenopt.h"

typedef __WCHAR_TYPE__ wchar_t;

extern void* memchr (const void*, int, size_t);

#define CONCAT(x, y) x ## y
#define CAT(x, y) CONCAT (x, y)
#define FAILNAME(name) CAT (call_ ## name ##_on_line_, __LINE__)

#define FAIL(name) do {                \
    extern void FAILNAME (name) (void);        \
    FAILNAME (name)();                \
  } while (0)

/* Macro to emit a call to funcation named
   call_in_true_branch_not_eliminated_on_line_NNN()
   for each call that's expected to be eliminated.  The dg-final
   scan-tree-dump-time directive at the bottom of the test verifies
   that no such call appears in output.  */
#define ELIM(expr)                            \
  if (!(expr)) FAIL (in_true_branch_not_eliminated); else (void)0

#define T(s, n) ELIM (strlen (s) == n)


static const wchar_t wc = L'1';
static const wchar_t ws1[] = L"1";
static const wchar_t wsx[] = L"\x12345678";        /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */
static const wchar_t ws4[] = L"\x00123456\x12005678\x12340078\x12345600";        /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */

void test_wide (void)
{
  int i0 = 0;
  int i1 = i0 + 1;
  int i2 = i1 + 1;
  int i3 = i2 + 1;
  int i4 = i3 + 1;

  ELIM (memchr (L"" + 1, 0, 0) == 0);
  ELIM (memchr (&wc + 1, 0, 0) == 0);
  ELIM (memchr (L"\x12345678", 0, sizeof (wchar_t)) == 0);        /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */

  const size_t nb = sizeof ws4;
  const size_t nwb = sizeof (wchar_t);

  const char *pws1 = (const char*)ws1;
  const char *pws4 = (const char*)ws4;
  const char *pwsx = (const char*)wsx;

#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
  ELIM (memchr (ws1, 0, sizeof ws1) == pws1 + 1);
  ELIM (memchr (wsx, 0, sizeof wsx) == pwsx + sizeof *wsx);

  ELIM (memchr (&ws4[0], 0, nb) == pws4 + 3);
  ELIM (memchr (&ws4[1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 2);
  ELIM (memchr (&ws4[2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 1);
  ELIM (memchr (&ws4[3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 0);
  ELIM (memchr (&ws4[4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0);

  ELIM (memchr (&ws4[i0], 0, nb) == pws4 + 3);
  ELIM (memchr (&ws4[i1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 2);
  ELIM (memchr (&ws4[i2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 1);
  ELIM (memchr (&ws4[i3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 0);
  ELIM (memchr (&ws4[i4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0);
#else
  ELIM (memchr (ws1, 0, sizeof ws1) == pws1 + 0);
  ELIM (memchr (wsx, 0, sizeof wsx) == pwsx + sizeof *wsx);

  ELIM (memchr (&ws4[0], 0, nb) == pws4 + 0);
  ELIM (memchr (&ws4[1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 1);
  ELIM (memchr (&ws4[2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 2);
  ELIM (memchr (&ws4[3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 3);
  ELIM (memchr (&ws4[4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0);

  ELIM (memchr (&ws4[i0], 0, nb) == pws4 + 0);
  ELIM (memchr (&ws4[i1], 0, nb - 1 * nwb) == pws4 + 1 * nwb + 1);
  ELIM (memchr (&ws4[i2], 0, nb - 2 * nwb) == pws4 + 2 * nwb + 2);
  ELIM (memchr (&ws4[i3], 0, nb - 3 * nwb) == pws4 + 3 * nwb + 3);
  ELIM (memchr (&ws4[i4], 0, nb - 4 * nwb) == pws4 + 4 * nwb + 0);
#endif
}

/* { dg-final { scan-tree-dump-times "memchr" 0 "optimized" } }
   { dg-final { scan-tree-dump-times "call_in_true_branch_not_eliminated" 0 "optimized" } } */

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