• Re: Try this with a signal handler

    From Sam@21:1/5 to Bonita Montero on Wed Jun 12 23:40:09 2024
    Bonita Montero writes:

    #include <Windows.h>
    #include <iostream>
    #include <intrin.h>

    using namespace std;

    int main()
    {
    __try
    {
    __debugbreak();
    cout << "hello world" << endl;
    }
    __except( []( EXCEPTION_POINTERS &ep )
    {
    ep.ContextRecord->Rip += 1;
    return EXCEPTION_CONTINUE_EXECUTION;
    }( *GetExceptionInformation() ) )
    {
    }
    }

    Try this with a signal handler, or you may prefer suicide.

    I regret to inform you the unfortunate fact that you have confused comp.lang.c++ with Stackoverflow. It is the latter where this exact solution
    is often offered as a cure-all that remedies all kinds of undefined behavior.

    Your cooperation in ensuring that comp.lang.c++ remains unaffected by Stackoverflow is greatly appreciated.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sam@21:1/5 to Bonita Montero on Fri Jun 14 08:01:12 2024
    Bonita Montero writes:

    Am 13.06.2024 um 05:40 schrieb Sam:
    Bonita Montero writes:

    #include <Windows.h>
    #include <iostream>
    #include <intrin.h>

    using namespace std;

    int main()
    {
        __try
        {
            __debugbreak();
            cout << "hello world" << endl;
        }
        __except( []( EXCEPTION_POINTERS &ep )
            {
                ep.ContextRecord->Rip += 1;
                return EXCEPTION_CONTINUE_EXECUTION;
            }( *GetExceptionInformation() ) )
        {
        }
    }

    Try this with a signal handler, or you may prefer suicide.

    I regret to inform you the unfortunate fact that you have confused
    comp.lang.c++ with Stackoverflow. It is the latter where this exact solution >> is often offered as a cure-all that remedies all kinds of undefined behavior.

    Your cooperation in ensuring that comp.lang.c++ remains unaffected by
    Stackoverflow is greatly appreciated.


    It's C++ because I'm using a lambda, dude.

    Captain Obvious to the rescue!

    I /was/ talking about the C++ tag. What did you think I was referring to? Python?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)