-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Milestone
Description
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;
}