Added ubsan

This commit is contained in:
Alex
2022-11-17 03:33:18 +02:00
parent 11641b1ff3
commit 2571c4f539
15 changed files with 410 additions and 26 deletions

View File

@ -55,8 +55,8 @@ namespace InterProcessCommunication
{
trace("Starting IPC Service...");
Vector<AuxiliaryVector> auxv;
TaskManager->CreateThread(TaskManager->GetCurrentProcess(), (Tasking::IP)IPCServiceStub, nullptr, nullptr, auxv);
TaskManager->GetCurrentThread()->Rename("IPC Service");
Tasking::TCB *thd = TaskManager->CreateThread(TaskManager->GetCurrentProcess(), (Tasking::IP)IPCServiceStub, nullptr, nullptr, auxv);
thd->Rename("IPC Service");
}
IPC::~IPC()

View File

@ -697,7 +697,15 @@ namespace Tasking
SmartCriticalSection(TaskingLock);
TCB *Thread = new TCB;
if (Parent == nullptr)
{
Thread->Parent = this->GetCurrentProcess();
if (Thread->Parent == nullptr)
{
error("Failed to get current process. Thread cannot be created.");
delete Thread;
return nullptr;
}
}
else
Thread->Parent = Parent;
@ -1086,7 +1094,6 @@ namespace Tasking
}
#endif
TaskingLock.Unlock();
this->IPCManager = new InterProcessCommunication::IPC;
IdleProcess = CreateProcess(nullptr, (char *)"Idle", TaskTrustLevel::Idle);
for (int i = 0; i < SMP::CPUCores; i++)
{