Skip to content

Tests Needed: PThread_ContinualThread Deletion #17

Description

@Phantom139

As noted with a lovely 4 line block comment in pContinualThread.cpp, we have a potential major issue here when a thread instance is deleted. Since the threading system itself by definition must also have multi-thread support, it is entirely possible that the instance of "this", may be deleted before a call to delete() is actually done, which would lead to access violation crashes.

Now, the notion of checking the this pointer itself, seems to be something that would be valid, however most people think it violates some silly "standard". I honestly have to disagree here since writing safe code has the precedence. However, I'm opening this issue to have a full test of the module to ensure this block of code behaves as intended.

                    if(this != NULL) {
                        SendToHell(this);
                    }
                    else {
                        GC_Error("PContinualThread::kill(): Thread kill exception leak blocked...");
                        return false;
                    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions