[*] Major Linux build regressions

This commit is contained in:
Reece Wilson 2024-02-23 12:44:43 +00:00
parent 2da8332c0f
commit 493f449d1d
17 changed files with 35 additions and 43 deletions

View File

@ -110,7 +110,7 @@ namespace Aurora::Async
inline bool operator==(const WorkerPId_t &in) const noexcept
{
return in.GetPool() == this->GetPool() &&
return in.GetPool().get() == this->GetPool().get() &&
in.first == this->first &&
this->second == in.second;
}

View File

@ -100,12 +100,12 @@ namespace Aurora::Debug
}
}
AU_INLINE void SysPushError(EFailureCategory category, const AuString &str)
static AU_INLINE void SysPushError(EFailureCategory category, const AuString &str)
{
_PushError(GetIPNoBackend(), category, str.c_str());
}
AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, const AuString &str)
static AU_INLINE void SysPushError(EFailureCategory category, AuUInt16 uLineHint, const AuString &str)
{
_PushError(GetIPNoBackend(), category, str.c_str(), uLineHint);
}

View File

@ -53,36 +53,12 @@ static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary,
template<typename ... T>
static inline void AU_NORETURN SysPanic()
{
if (Aurora::RuntimeHasStarted())
{
Aurora::Debug::AddMemoryCrunch();
try
{
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal");
}
catch (...)
{
}
}
Aurora::Debug::Panic();
}
template<typename ... T>
static inline void AU_NORETURN SysPanic2(AuUInt uLineHintInNonshipBinary)
{
if (Aurora::RuntimeHasStarted())
{
Aurora::Debug::AddMemoryCrunch();
try
{
Aurora::Logging::WriteLinef(static_cast<AuUInt8>(Aurora::Logging::ELogLevel::eError), Aurora::Console::EAnsiColor::eBoldRed, "Fatal");
}
catch (...)
{
}
}
Aurora::Debug::Panic2(uLineHintInNonshipBinary);
}

View File

@ -23,7 +23,7 @@ namespace Aurora
void InitLinuxAddresses()
{
pgetsockname = getsockname;
}
template <typename... T>

View File

@ -8,6 +8,7 @@
#pragma once
#include <linux/aio_abi.h>
#include <sys/socket.h>
struct robust_list_head;
@ -60,4 +61,8 @@ namespace Aurora
int close_range(unsigned int first, unsigned int last,
unsigned int flags);
inline int (*pgetsockname)(int sockfd, struct sockaddr *addr,
socklen_t *addrlen);
}

View File

@ -24,5 +24,9 @@ namespace Aurora
#if defined(AURORA_IS_MODERNNT_DERIVED)
InitNTAddresses();
#endif
#if defined(AURORA_IS_LINUX_DERIVED)
InitLinuxAddresses();
#endif
}
}

View File

@ -361,7 +361,7 @@ namespace Aurora::IO
#endif
#if defined(AURORA_IS_POSIX_DERIVED)
handle = UNIX::ShareFileDescriptor((HANDLE)this->GetOSHandleSafe().ValueOr(-1));
handle = UNIX::ShareFileDescriptor(this->GetOSHandleSafe().ValueOr(-1));
#endif
if (handle.empty())

View File

@ -77,6 +77,7 @@ namespace Aurora::IO::FS
virtual void LIOS_Process(AuUInt32 read, bool failure, int err, bool mark) override;
AuSPtr<ProcessBlock> pProcessBlock_;
private:
AuSPtr<IIOHandle> pHandle_;
AuUInt64 lastAbstractOffset_ {};

View File

@ -325,7 +325,7 @@ namespace Aurora::IO::IPC
{
if (!nonblock)
{
SysPushErrorNested("File Error: {}", this->pHandle_->GetPath());
SysPushErrorNested("File Error: {}", this->fsHandle_->GetPath());
}
return nonblock;
@ -340,7 +340,7 @@ namespace Aurora::IO::IPC
return nonblock;
}
read.outVariable = tmp;
read.outVariable = offset;
return true;
}
@ -507,7 +507,7 @@ namespace Aurora::IO::IPC
return {};
}
if (object->bDead)
if (handle->bDead)
{
return {};
}

View File

@ -35,7 +35,7 @@ namespace Aurora::IO::Loop
}
}
bool TryInit(bool bTriggered, bool bAtomicRelease, bool bPermitMultipleTriggers)
bool LSEvent::TryInit(bool bTriggered, bool bAtomicRelease, bool bPermitMultipleTriggers)
{
this->handle = ::eventfd(bTriggered ? 1 : 0, EFD_NONBLOCK | EFD_CLOEXEC);
this->atomicRelease_ = bAtomicRelease;

View File

@ -510,7 +510,7 @@ namespace Aurora::IO::Net
#if defined(AURORA_IS_MODERNNT_DERIVED)
AuStaticCast<NtAsyncNetworkTransaction>(this->socketChannel_.inputChannel.pNetReadTransaction)->HasErrorCode()
#else
this->socketChannel_.inputChannel.pNetReadTransaction->Failed()
this->socketChannel_.inputChannel.pNetReadTransaction->HasFailed()
#endif
)
{
@ -520,7 +520,7 @@ namespace Aurora::IO::Net
#if defined(AURORA_IS_MODERNNT_DERIVED)
AuStaticCast<NtAsyncNetworkTransaction>(this->socketChannel_.outputChannel.pNetWriteTransaction_)->HasErrorCode()
#else
this->socketChannel_.outputChannel.pNetWriteTransaction_->Failed()
this->socketChannel_.outputChannel.pNetWriteTransaction_->HasFailed()
#endif
)
{

View File

@ -253,7 +253,6 @@ namespace Aurora::IO::Net
return false;
}
this->overlap.hEvent = (HANDLE)AuStaticCast<Loop::LSEvent>(pLoopSource)->GetHandle();
pCompletionGroup->AddWorkItem(this->SharedFromThis());
this->pCompletionGroup_ = pCompletionGroup;
return true;
@ -372,7 +371,6 @@ namespace Aurora::IO::Net
bool LinuxAsyncNetworkTransaction::IDontWannaUsePorts()
{
return true;
}
@ -406,7 +404,7 @@ namespace Aurora::IO::Net
return this->pSocket->ToPlatformHandle();
}
int NtAsyncNetworkTransaction::GetAlertable()
int LinuxAsyncNetworkTransaction::GetAlertable()
{
if (this->pCompletionGroup_)
{

View File

@ -51,6 +51,9 @@ namespace Aurora::IO::Net
virtual void LIOS_Process(AuUInt32 read, bool failure, int err, bool mark) override;
bool HasCompletedForGCWI() override;
void CleanupForGCWI() override;
void MakeSyncable();
void ForceNextWriteWait();

View File

@ -439,8 +439,10 @@ namespace Aurora::IO::UNIX
{
#endif
context->LIOS_SendProcess(bytesTransacted, bError, iErrNo);
#if 0
}
#endif
return true;
}

View File

@ -43,11 +43,12 @@ namespace Aurora::IO::UNIX
AuLoop::ILSEvent *optEvent2 {};
aio_context_t abortContext {};
// TODO:
AuSPtr<void> pin_;
AuSPtr<void> memPin_;
private:
AuUInt64 dataPtr_ {};
AuUInt dataLen_ {};
AuSPtr<void> pin_;
AuSPtr<void> memPin_;
int tempEPoll {-1};
iocb cb {};
};

View File

@ -39,7 +39,10 @@ namespace Aurora::Process
AuString fileName = info->dlpi_name[0] ? info->dlpi_name : AuString{};
if (fileName.empty())
{
GetProcFullPath(fileName);
if (auto optProcessPath = GetProcessFullPath())
{
fileName = *optProcessPath;
}
}
if (!AuIOFS::FileExists(fileName))

View File

@ -16,7 +16,6 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <Source/Threading/Primitives/AuSemaphore.Unix.hpp>
#include <Source/IO/AuIOHandle.Unix.hpp>
#if defined(AURORA_COMPILER_CLANG)