2021-06-27 21:25:29 +00:00
|
|
|
/***
|
|
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
|
|
|
|
File: ExceptionWatcher.Win32.cpp
|
|
|
|
Date: 2021-6-12
|
|
|
|
Author: Reece
|
|
|
|
***/
|
2021-09-30 14:57:41 +00:00
|
|
|
#include <Source/RuntimeInternal.hpp>
|
2021-06-27 21:25:29 +00:00
|
|
|
#include "Debug.hpp"
|
2022-01-27 05:24:08 +00:00
|
|
|
#include "ExceptionWatcher.NT.hpp"
|
2021-06-27 21:25:29 +00:00
|
|
|
#include "ExceptionWatcher.Win32.hpp"
|
2022-01-27 05:24:08 +00:00
|
|
|
#include "Stack.Win32.hpp"
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
#include <Source/Process/AuProcessMap.Win32.hpp>
|
2021-09-30 14:57:41 +00:00
|
|
|
#include <Source/Telemetry/Telemetry.hpp>
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
#include <Dbghelp.h>
|
|
|
|
#include <codecvt>
|
|
|
|
|
2021-09-06 10:58:08 +00:00
|
|
|
#include <vcruntime_exception.h>
|
2021-06-27 21:25:29 +00:00
|
|
|
#include <ehdata.h>
|
|
|
|
|
2022-12-17 20:14:19 +00:00
|
|
|
#include <Source/Process/AuProcessMap.hpp>
|
2022-01-27 05:24:08 +00:00
|
|
|
#include <Source/IO/FS/FS.hpp>
|
2022-01-24 18:37:06 +00:00
|
|
|
|
2022-11-17 07:46:07 +00:00
|
|
|
#include <Source/Grug/AuGrug.hpp>
|
|
|
|
#include <Source/Exit/AuExit.hpp>
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
|
2023-06-24 19:59:57 +00:00
|
|
|
#if 0
|
|
|
|
#include <WerApi.h>
|
|
|
|
#endif
|
2022-01-27 20:25:04 +00:00
|
|
|
|
2022-01-24 18:37:06 +00:00
|
|
|
static thread_local int gDebugLocked = 0;
|
2021-06-27 21:25:29 +00:00
|
|
|
|
|
|
|
namespace Aurora::Debug
|
|
|
|
{
|
|
|
|
#define EXCEPTION_ENTRY(n) {n, #n}
|
|
|
|
static const AuHashMap<DWORD, AuString> kExceptionTable
|
|
|
|
{
|
|
|
|
EXCEPTION_ENTRY(STILL_ACTIVE),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ACCESS_VIOLATION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_DATATYPE_MISALIGNMENT),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_BREAKPOINT),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_SINGLE_STEP),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ARRAY_BOUNDS_EXCEEDED),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_DENORMAL_OPERAND),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_DIVIDE_BY_ZERO),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_INEXACT_RESULT),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_INVALID_OPERATION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_STACK_CHECK),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_UNDERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INT_DIVIDE_BY_ZERO),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INT_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_PRIV_INSTRUCTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_IN_PAGE_ERROR),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ILLEGAL_INSTRUCTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_NONCONTINUABLE_EXCEPTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_STACK_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INVALID_DISPOSITION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_GUARD_PAGE),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INVALID_HANDLE),
|
|
|
|
//EXCEPTION_ENTRY(EXCEPTION_POSSIBLE_DEADLOCK),
|
2022-04-02 00:48:29 +00:00
|
|
|
EXCEPTION_ENTRY(CONTROL_C_EXIT),
|
|
|
|
EXCEPTION_ENTRY(DBG_CONTROL_C)
|
2021-06-27 21:25:29 +00:00
|
|
|
};
|
|
|
|
#undef EXCEPTION_ENTRY
|
|
|
|
#define EXCEPTION_ENTRY(n) {n, true}
|
|
|
|
static const AuHashMap<DWORD, bool> kExceptionFatalTable
|
|
|
|
{
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ACCESS_VIOLATION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_DATATYPE_MISALIGNMENT),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ARRAY_BOUNDS_EXCEEDED),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_DENORMAL_OPERAND),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_DIVIDE_BY_ZERO),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_INEXACT_RESULT),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_INVALID_OPERATION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_STACK_CHECK),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_FLT_UNDERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INT_DIVIDE_BY_ZERO),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INT_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_PRIV_INSTRUCTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_IN_PAGE_ERROR),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_ILLEGAL_INSTRUCTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_NONCONTINUABLE_EXCEPTION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_STACK_OVERFLOW),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_INVALID_DISPOSITION),
|
|
|
|
EXCEPTION_ENTRY(EXCEPTION_GUARD_PAGE)
|
|
|
|
};
|
|
|
|
#undef EXCEPTION_ENTRY
|
|
|
|
|
2023-06-24 19:43:32 +00:00
|
|
|
void PlatformHandleFatalEx2(bool fatal, CONTEXT &ctx, bool bNoExit);
|
|
|
|
|
2021-06-27 21:25:29 +00:00
|
|
|
static bool IsReadable(const void *address)
|
|
|
|
{
|
|
|
|
MEMORY_BASIC_INFORMATION info;
|
|
|
|
|
|
|
|
if (!VirtualQuery(address, &info, sizeof(info)))
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!info.BaseAddress)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (info.Protect & (PAGE_READONLY | PAGE_READWRITE)) != 0;
|
|
|
|
}
|
|
|
|
|
2022-06-16 00:27:00 +00:00
|
|
|
bool InPanic();
|
|
|
|
|
2022-03-18 07:32:38 +00:00
|
|
|
static LONG CALLBACK HandleVectorException(_EXCEPTION_POINTERS *ExceptionInfo)
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
2022-04-02 00:48:29 +00:00
|
|
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode == DBG_CONTROL_C)
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
2022-04-02 00:48:29 +00:00
|
|
|
Exit::PostLevel(AuThreads::GetThread(), Exit::ETriggerLevel::eSigTerminate);
|
2022-06-16 00:27:00 +00:00
|
|
|
return AuExchange(Exit::gHasCanceled, false) ? EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_CONTINUE_SEARCH;
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
2021-10-23 11:36:14 +00:00
|
|
|
|
2022-06-16 00:27:00 +00:00
|
|
|
// https://www.youtube.com/embed/w6P03sTzSqM?start=2&autoplay=1
|
2022-04-02 00:48:29 +00:00
|
|
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode < STATUS_GUARD_PAGE_VIOLATION)
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
|
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
|
|
}
|
2021-10-23 11:36:14 +00:00
|
|
|
|
2022-06-16 00:27:00 +00:00
|
|
|
#if defined(AU_CFG_ID_SHIP)
|
|
|
|
|
|
|
|
// you what?
|
|
|
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_BREAKPOINT)
|
|
|
|
{
|
|
|
|
SysPanic("");
|
|
|
|
return EXCEPTION_CONTINUE_EXECUTION;
|
|
|
|
}
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
// debugger go brrr
|
2022-04-02 00:48:29 +00:00
|
|
|
if (ExceptionInfo->ExceptionRecord->ExceptionCode == EXCEPTION_BREAKPOINT)
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
{
|
|
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
|
|
}
|
|
|
|
|
2022-06-16 00:27:00 +00:00
|
|
|
#endif
|
2022-01-27 05:24:08 +00:00
|
|
|
|
2022-06-16 00:27:00 +00:00
|
|
|
// debug builds can go do something stupid
|
|
|
|
// QA builds, staging, rel in any form should just give up trying if we're under a panic
|
|
|
|
#if !defined(AU_CFG_ID_DEBUG)
|
|
|
|
if (InPanic())
|
|
|
|
{
|
|
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// something dumb like this mess w hat i had before.
|
|
|
|
// gave up trying
|
|
|
|
auto minimal = gDebugLocked++;
|
2022-01-27 05:24:08 +00:00
|
|
|
if (minimal >= 5)
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
2022-01-27 05:24:08 +00:00
|
|
|
SysPanic("Nested Exception");
|
|
|
|
}
|
|
|
|
|
|
|
|
bool cxxThrow = ExceptionInfo->ExceptionRecord->ExceptionInformation[0] == EH_MAGIC_NUMBER1;
|
|
|
|
bool cxxThrowPure = ExceptionInfo->ExceptionRecord->ExceptionInformation[0] == EH_PURE_MAGIC_NUMBER1;
|
|
|
|
|
|
|
|
void *exception {};
|
|
|
|
HMODULE handle {};
|
|
|
|
ThrowInfo *pThrowInfo {};
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-01-27 05:24:08 +00:00
|
|
|
if ((ExceptionInfo->ExceptionRecord->ExceptionCode == EH_EXCEPTION_NUMBER) &&
|
2022-03-18 07:32:38 +00:00
|
|
|
(ExceptionInfo->ExceptionRecord->NumberParameters >= 3) &&
|
2022-01-27 05:24:08 +00:00
|
|
|
((cxxThrow) ||
|
|
|
|
(cxxThrowPure))
|
|
|
|
)
|
|
|
|
{
|
|
|
|
pThrowInfo = reinterpret_cast<ThrowInfo *>(ExceptionInfo->ExceptionRecord->ExceptionInformation[2]);
|
|
|
|
|
|
|
|
if (pThrowInfo)
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
2022-01-27 05:24:08 +00:00
|
|
|
auto attribs = pThrowInfo->attributes;
|
|
|
|
|
|
|
|
if (_EH_RELATIVE_TYPEINFO)
|
|
|
|
{
|
|
|
|
handle = reinterpret_cast<HMODULE>(ExceptionInfo->ExceptionRecord->ExceptionInformation[3]);
|
|
|
|
}
|
|
|
|
|
|
|
|
exception = reinterpret_cast<void *>(ExceptionInfo->ExceptionRecord->ExceptionInformation[1]);
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-03-30 18:07:15 +00:00
|
|
|
bool isCritical = AuExists(kExceptionFatalTable, ExceptionInfo->ExceptionRecord->ExceptionCode);
|
2022-01-27 05:24:08 +00:00
|
|
|
|
|
|
|
auto handleNoCppObject = [&]() -> AuString
|
|
|
|
{
|
|
|
|
const AuString *msg;
|
|
|
|
if (AuTryFind(kExceptionTable, ExceptionInfo->ExceptionRecord->ExceptionCode, msg))
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
2022-01-27 05:24:08 +00:00
|
|
|
return *msg;
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
else
|
2021-06-27 21:25:29 +00:00
|
|
|
{
|
2022-01-27 05:24:08 +00:00
|
|
|
return AuToString(ExceptionInfo->ExceptionRecord->ExceptionCode);
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
};
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2023-05-31 07:09:44 +00:00
|
|
|
StackTrace backtrace;
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
2023-05-31 06:15:55 +00:00
|
|
|
static bool bRunOnce {};
|
|
|
|
struct ArrowEx : Grug::Arrow
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
2023-05-31 06:15:55 +00:00
|
|
|
AuFunction<void()> callback;
|
|
|
|
};
|
|
|
|
ArrowEx empty;
|
|
|
|
|
|
|
|
empty.callback = [&]()
|
|
|
|
{
|
|
|
|
try
|
2022-03-18 07:32:38 +00:00
|
|
|
{
|
2023-05-31 06:15:55 +00:00
|
|
|
if (AuExchange(bRunOnce, true))
|
|
|
|
{
|
|
|
|
Telemetry::Mayday();
|
|
|
|
}
|
|
|
|
|
|
|
|
ParseStack(ExceptionInfo->ContextRecord, backtrace);
|
2022-03-18 07:32:38 +00:00
|
|
|
}
|
2023-05-31 06:15:55 +00:00
|
|
|
catch (...)
|
|
|
|
{
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2023-05-31 06:15:55 +00:00
|
|
|
}
|
2023-05-31 07:09:44 +00:00
|
|
|
};
|
2022-06-16 00:27:00 +00:00
|
|
|
|
2023-05-31 07:09:44 +00:00
|
|
|
empty.pCallback =[](Grug::Arrow *pBase) -> void
|
|
|
|
{
|
|
|
|
auto pEx = (ArrowEx *)pBase;
|
|
|
|
pEx->callback();
|
|
|
|
};
|
|
|
|
|
|
|
|
Grug::HurlArrow(&empty, empty.pCallback, {});
|
|
|
|
Grug::ArrowWait(&empty);
|
|
|
|
}
|
|
|
|
|
2023-06-24 19:43:32 +00:00
|
|
|
|
|
|
|
CONTEXT ctx {};
|
|
|
|
ctx.ContextFlags = CONTEXT_ALL;
|
|
|
|
|
|
|
|
if (!GetThreadContext(GetCurrentThread(), &ctx))
|
|
|
|
{
|
|
|
|
Debug::Panic();
|
|
|
|
}
|
|
|
|
|
2023-05-31 07:09:44 +00:00
|
|
|
AuVoidFunc doReportLocal;
|
|
|
|
{
|
|
|
|
|
|
|
|
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG)
|
|
|
|
const bool kShouldPrintErrors = true;
|
|
|
|
#else
|
|
|
|
const bool kShouldPrintErrors = false;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
doReportLocal = [&]()
|
|
|
|
{
|
2023-06-24 20:21:00 +00:00
|
|
|
ReportSEH(handle, exception, pThrowInfo, handleNoCppObject, backtrace, [&](const AuString &str)
|
2023-05-31 06:15:55 +00:00
|
|
|
{
|
2023-06-24 20:21:00 +00:00
|
|
|
// Pre-submit callback -> its showtime
|
|
|
|
if ((isCritical || kShouldPrintErrors) && (minimal == 0))
|
2023-05-31 06:15:55 +00:00
|
|
|
{
|
2023-06-24 20:21:00 +00:00
|
|
|
if (gRuntimeConfig.debug.bPrintExceptionStackTracesOut)
|
2023-05-31 07:09:44 +00:00
|
|
|
{
|
2023-06-24 20:21:00 +00:00
|
|
|
AuLogWarn("NT Exception: 0x{:x}, {}", ExceptionInfo->ExceptionRecord->ExceptionCode, str);
|
|
|
|
AuLogWarn("{}", StringifyStackTrace(backtrace));
|
2023-05-31 07:09:44 +00:00
|
|
|
}
|
2023-06-24 20:21:00 +00:00
|
|
|
}
|
|
|
|
});
|
2023-05-31 07:09:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
auto pThread = AuThreads::GetThread();
|
|
|
|
|
|
|
|
{
|
|
|
|
static bool bRunOnce {};
|
|
|
|
struct ArrowEx : Grug::Arrow
|
|
|
|
{
|
|
|
|
AuFunction<void()> callback;
|
|
|
|
};
|
|
|
|
ArrowEx empty;
|
|
|
|
|
|
|
|
empty.callback = [&]()
|
|
|
|
{
|
|
|
|
doReportLocal();
|
|
|
|
|
2023-06-30 14:42:50 +00:00
|
|
|
ReportStackTrace(backtrace, "");
|
|
|
|
|
2023-05-31 07:09:44 +00:00
|
|
|
try
|
|
|
|
{
|
2023-12-08 18:25:50 +00:00
|
|
|
if (isCritical ||
|
|
|
|
gRuntimeConfig.debug.bIsExceptionThrowFatal) // exception = literally anything
|
2023-05-31 06:15:55 +00:00
|
|
|
{
|
2023-12-08 18:25:50 +00:00
|
|
|
Exit::PostLevel(pThread, Aurora::Exit::ETriggerLevel::eFatalException);
|
2023-06-24 20:10:14 +00:00
|
|
|
PlatformHandleFatalEx2(true, ctx, true);
|
2023-05-31 06:15:55 +00:00
|
|
|
}
|
2023-06-24 12:53:32 +00:00
|
|
|
else
|
|
|
|
{
|
2023-12-08 18:25:50 +00:00
|
|
|
Exit::PostLevel(pThread, Aurora::Exit::ETriggerLevel::eProblematicEvent);
|
2023-06-24 19:43:32 +00:00
|
|
|
PlatformHandleFatalEx2(false, ctx, true);
|
2023-06-24 12:53:32 +00:00
|
|
|
}
|
2023-05-31 06:15:55 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
empty.pCallback =[](Grug::Arrow *pBase) -> void
|
2021-10-14 11:35:05 +00:00
|
|
|
{
|
2023-05-31 06:15:55 +00:00
|
|
|
auto pEx = (ArrowEx *)pBase;
|
|
|
|
pEx->callback();
|
|
|
|
};
|
2022-01-27 05:24:08 +00:00
|
|
|
|
2023-05-31 06:15:55 +00:00
|
|
|
Grug::HurlArrow(&empty, empty.pCallback, {});
|
|
|
|
Grug::ArrowWait(&empty);
|
2023-06-30 14:42:50 +00:00
|
|
|
|
|
|
|
ReportStackTrace(backtrace, "");
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
gDebugLocked = 0;
|
|
|
|
return EXCEPTION_CONTINUE_SEARCH;
|
|
|
|
}
|
|
|
|
|
|
|
|
static AuString GetDumpName()
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
2023-12-13 18:11:35 +00:00
|
|
|
auto pProcessName = Process::GetProcessName();
|
2022-01-27 05:24:08 +00:00
|
|
|
auto tm = Time::ToCivilTime(Time::CurrentClockMS());
|
2023-12-13 18:11:35 +00:00
|
|
|
return (pProcessName ? *pProcessName : AuString()) +
|
|
|
|
" " +
|
|
|
|
AuLocale::TimeDateToFileNameISO8601(tm) + ".dmp";
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
return "errordate.dmp";
|
|
|
|
}
|
|
|
|
}
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-06-01 14:25:32 +00:00
|
|
|
#if defined(AU_ENABLE_NATIVE_MINIDUMP)
|
2022-01-27 20:25:04 +00:00
|
|
|
void SaveMinidump(_EXCEPTION_POINTERS *ExceptionInfo, bool isFatal)
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
|
|
|
bool ok {};
|
2023-03-31 03:24:19 +00:00
|
|
|
MINIDUMP_EXCEPTION_INFORMATION info {};
|
2022-01-27 05:24:08 +00:00
|
|
|
info.ThreadId = GetCurrentThreadId();
|
|
|
|
|
2023-03-31 03:24:19 +00:00
|
|
|
info.ClientPointers = false;
|
2022-01-27 05:24:08 +00:00
|
|
|
info.ExceptionPointers = ExceptionInfo;
|
|
|
|
|
|
|
|
static const DWORD flags = MiniDumpWithFullMemory |
|
|
|
|
MiniDumpWithFullMemoryInfo |
|
|
|
|
MiniDumpWithHandleData |
|
|
|
|
MiniDumpWithUnloadedModules |
|
|
|
|
MiniDumpWithThreadInfo;
|
|
|
|
|
|
|
|
std::wstring path;
|
2022-01-27 08:14:48 +00:00
|
|
|
AuString utf8Path;
|
2022-01-27 05:24:08 +00:00
|
|
|
while (path.empty())
|
|
|
|
{
|
2021-06-27 21:25:29 +00:00
|
|
|
try
|
|
|
|
{
|
2022-01-27 08:14:48 +00:00
|
|
|
utf8Path = AuIOFS::NormalizePathRet("./Logs/Crashes/" + GetDumpName());
|
|
|
|
path = Locale::ConvertFromUTF8(utf8Path);
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-01-27 08:14:48 +00:00
|
|
|
AuIOFS::CreateDirectories(utf8Path, true);
|
|
|
|
|
2023-09-13 01:27:18 +00:00
|
|
|
auto hFile = Win32Open(path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, false, CREATE_ALWAYS, 0, FILE_ATTRIBUTE_NORMAL);
|
2022-01-27 05:24:08 +00:00
|
|
|
if (hFile == INVALID_HANDLE_VALUE)
|
|
|
|
{
|
|
|
|
AuLogWarn("Couldn't open minidump file. Has a debugger locked the .dmp file?");
|
|
|
|
goto miniDumpOut;
|
|
|
|
}
|
2022-01-18 14:26:38 +00:00
|
|
|
|
2023-08-27 16:43:29 +00:00
|
|
|
if (!pMiniDumpWriteDump)
|
|
|
|
{
|
|
|
|
goto miniDumpOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
ok = pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, (MINIDUMP_TYPE)flags, &info, nullptr, nullptr);
|
2022-01-27 05:24:08 +00:00
|
|
|
if (!ok)
|
|
|
|
{
|
2023-03-31 03:24:19 +00:00
|
|
|
AuLogWarn("Couldn't write minidump: {:x}", GetLastError());
|
2022-01-27 05:24:08 +00:00
|
|
|
goto miniDumpOut;
|
|
|
|
}
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-01-27 05:24:08 +00:00
|
|
|
CloseHandle(hFile);
|
2021-06-27 21:25:29 +00:00
|
|
|
|
2022-01-27 05:24:08 +00:00
|
|
|
miniDumpOut:
|
|
|
|
|
|
|
|
try
|
|
|
|
{
|
|
|
|
AuDebug::PrintError();
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-01-27 20:25:04 +00:00
|
|
|
if (isFatal)
|
|
|
|
{
|
2023-03-31 03:24:19 +00:00
|
|
|
try
|
|
|
|
{
|
|
|
|
Grug::GrugFlushFlushs();
|
|
|
|
Grug::GrugFlushWrites();
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2023-07-03 18:40:38 +00:00
|
|
|
|
2023-07-11 14:21:55 +00:00
|
|
|
Win32Terminate();
|
2022-01-27 20:25:04 +00:00
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2022-01-27 08:14:48 +00:00
|
|
|
void BlackboxReport(_EXCEPTION_POINTERS *ExceptionInfo, bool fatal)
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
|
|
|
HANDLE hFile;
|
2023-06-28 03:48:11 +00:00
|
|
|
std::wstring path;
|
2022-01-27 08:14:48 +00:00
|
|
|
AuString utf8Path;
|
2023-06-28 03:48:11 +00:00
|
|
|
bool ok { true };
|
2022-01-27 05:24:08 +00:00
|
|
|
MINIDUMP_EXCEPTION_INFORMATION info;
|
|
|
|
|
2023-03-31 03:24:19 +00:00
|
|
|
if (fatal)
|
|
|
|
{
|
|
|
|
AuDebug::AddMemoryCrunch();
|
|
|
|
}
|
|
|
|
|
2023-06-28 03:48:11 +00:00
|
|
|
auto dumpName = GetDumpName();
|
2022-01-27 05:24:08 +00:00
|
|
|
|
2023-03-31 03:24:19 +00:00
|
|
|
info.ClientPointers = false;
|
2022-01-27 05:24:08 +00:00
|
|
|
info.ThreadId = GetCurrentThreadId();
|
|
|
|
info.ExceptionPointers = ExceptionInfo;
|
|
|
|
|
|
|
|
static const DWORD flags = MiniDumpWithDataSegs |
|
|
|
|
MiniDumpWithFullMemoryInfo |
|
|
|
|
MiniDumpWithHandleData |
|
|
|
|
MiniDumpWithUnloadedModules |
|
|
|
|
MiniDumpWithThreadInfo;
|
|
|
|
|
2023-06-28 03:48:11 +00:00
|
|
|
while (path.empty())
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
utf8Path = AuIOFS::NormalizePathRet("./Logs/Crashes/" + dumpName);
|
|
|
|
path = Locale::ConvertFromUTF8(utf8Path);
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
2022-01-27 05:24:08 +00:00
|
|
|
|
2023-06-28 03:48:11 +00:00
|
|
|
}
|
|
|
|
}
|
2022-06-16 00:27:00 +00:00
|
|
|
|
|
|
|
AuIOFS::CreateDirectories(utf8Path, true); // potentially unsafe / could throw inside
|
|
|
|
|
2023-09-13 01:27:18 +00:00
|
|
|
hFile = Win32Open(path.c_str(), GENERIC_READ | GENERIC_WRITE, 0, false, CREATE_ALWAYS, 0, FILE_ATTRIBUTE_NORMAL);
|
2022-01-27 05:24:08 +00:00
|
|
|
if (hFile != INVALID_HANDLE_VALUE)
|
|
|
|
{
|
|
|
|
AuLogWarn("[1] Couldn't open minidump file. Has a debugger locked the .dmp file?");
|
|
|
|
goto miniMiniDumpOut;
|
|
|
|
}
|
|
|
|
|
2023-08-27 16:43:29 +00:00
|
|
|
if (!pMiniDumpWriteDump)
|
|
|
|
{
|
|
|
|
goto miniMiniDumpOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
ok = pMiniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hFile, (MINIDUMP_TYPE)flags, &info, nullptr, nullptr);
|
2022-01-27 05:24:08 +00:00
|
|
|
if (!ok)
|
|
|
|
{
|
2023-03-31 03:24:19 +00:00
|
|
|
AuLogWarn("Couldn't write minidump: {:x}", GetLastError());
|
2022-01-27 05:24:08 +00:00
|
|
|
goto miniMiniDumpOut;
|
|
|
|
}
|
|
|
|
|
|
|
|
CloseHandle(hFile);
|
|
|
|
|
|
|
|
miniMiniDumpOut:
|
|
|
|
|
2022-01-27 08:14:48 +00:00
|
|
|
if (fatal)
|
|
|
|
{
|
2023-06-28 03:48:11 +00:00
|
|
|
Telemetry::NewBlackBoxEntryMinidump report {};
|
|
|
|
report.includesRx = false;
|
|
|
|
report.resource.path = dumpName;
|
|
|
|
report.resource.type = Telemetry::ENewBlackBoxResourceType::eLocal;
|
|
|
|
Telemetry::ReportDyingBreath(report);
|
|
|
|
|
2023-07-11 14:21:55 +00:00
|
|
|
Win32Terminate();
|
2022-01-27 08:14:48 +00:00
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
}
|
|
|
|
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
static void CacheInternalBuildSymbols()
|
2022-01-27 05:24:08 +00:00
|
|
|
{
|
2022-06-16 00:27:00 +00:00
|
|
|
#if defined(AU_CFG_ID_INTERNAL) || defined(AU_CFG_ID_DEBUG)
|
2023-08-27 16:43:29 +00:00
|
|
|
if (pSymInitialize)
|
|
|
|
{
|
|
|
|
pSymInitialize(GetCurrentProcess(), NULL, TRUE);
|
|
|
|
}
|
2022-01-27 05:24:08 +00:00
|
|
|
#endif
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void DisableWindowsErrorReporting()
|
|
|
|
{
|
2023-06-24 19:59:57 +00:00
|
|
|
#if 0
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
// Windows has this annoying watchdog that triggers when your main loop doesnt respond after a while
|
2022-09-12 22:38:44 +00:00
|
|
|
// It's aggressive in its approach, giving the users a choice to forcefully terminate as soon as they spam click a busy app,
|
|
|
|
// or never at all. latterly, its not uncommon for the app to not come back up, bc win32.
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
// It's too easy to trigger the watchdog and impossible to stop it from deciding the windowed application must die
|
2023-12-13 18:11:35 +00:00
|
|
|
auto pProcName = Process::GetProcessName();
|
|
|
|
if (!pProcName)
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
{
|
|
|
|
AuLogWarn("Couldn't disable Microsoft Glowware Reporting!");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-03-30 18:07:15 +00:00
|
|
|
// Yes, this is prone to module-name conflict issues because it's a dumb registry utility function
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
// This isn't what we want, but it's probably what the user wants
|
2022-03-30 18:07:15 +00:00
|
|
|
// MSFT is such a loving company, they'll do almost nothing to ensure they wont steal all your data
|
2023-12-13 18:11:35 +00:00
|
|
|
WerAddExcludedApplication(AuLocale::ConvertFromUTF8(pProcName->data()).c_str(), false);
|
2023-06-24 19:59:57 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
// This implementation doesn't require a single IAT entry to a pointless dll
|
2023-12-13 18:11:35 +00:00
|
|
|
auto pProcName = Process::GetProcessName();
|
|
|
|
if (!pProcName)
|
2023-06-24 19:59:57 +00:00
|
|
|
{
|
2023-12-13 18:11:35 +00:00
|
|
|
AuLogWarn("Couldn't disable Microsoft Glowware Reporting!");
|
2023-06-24 19:59:57 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2023-12-13 18:11:35 +00:00
|
|
|
auto procNameWide = AuLocale::ConvertFromUTF8(pProcName->c_str());
|
2023-06-24 19:59:57 +00:00
|
|
|
|
|
|
|
HKEY hKey;
|
2023-10-11 01:13:49 +00:00
|
|
|
if (pRegOpenKeyExW &&
|
|
|
|
pRegOpenKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\ExcludedApplications", 0, KEY_WRITE, &hKey) == ERROR_SUCCESS)
|
2023-06-24 19:59:57 +00:00
|
|
|
{
|
|
|
|
DWORD bioluminescenceReductionFactor { 1 };
|
2023-10-11 01:13:49 +00:00
|
|
|
if (pRegSetValueExW)
|
|
|
|
{
|
|
|
|
(void)pRegSetValueExW(hKey, procNameWide.c_str(), 0, REG_DWORD, (const BYTE *)&bioluminescenceReductionFactor, sizeof(DWORD));
|
|
|
|
}
|
|
|
|
if (pRegCloseKey)
|
|
|
|
{
|
|
|
|
pRegCloseKey(hKey);
|
|
|
|
}
|
2023-06-24 19:59:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void InitWin32()
|
|
|
|
{
|
|
|
|
// ...
|
2022-09-12 22:38:44 +00:00
|
|
|
if (gRuntimeConfig.debug.bNonshipPrecachesSymbols)
|
2022-06-01 14:25:32 +00:00
|
|
|
{
|
|
|
|
CacheInternalBuildSymbols();
|
|
|
|
}
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
|
|
|
|
// ...
|
|
|
|
DisableWindowsErrorReporting();
|
2022-01-27 05:24:08 +00:00
|
|
|
|
[*/+/-] MEGA COMMIT. ~2 weeks compressed.
The intention is to quickly improve and add util apis, enhance functionality given current demands, go back to the build pipeline, finish that, publish runtime tests, and then use what we have to go back to to linux support with a more stable api.
[+] AuMakeSharedArray
[+] Technet ArgvQuote
[+] Grug subsystem (UNIX signal thread async safe ipc + telemetry flusher + log flusher.)
[+] auEndianness -> Endian swap utils
[+] AuGet<N>(...)
[*] AUE_DEFINE conversion for
ECompresionType, EAnsiColor, EHashType, EStreamError, EHexDump
[+] ConsoleMessage ByteBuffer serialization
[+] CmdLine subsystem for parsing command line arguments and simple switch/flag checks
[*] Split logger from console subsystem
[+] StartupParameters -> A part of a clean up effort under Process
[*] Refactor SysErrors header + get caller hack
[+] Atomic APIs
[+] popcnt
[+] Ring Buffer sink
[+] Added more standard errors
Catch,
Submission,
LockError,
NoAccess,
ResourceMissing,
ResourceLocked,
MalformedData,
InSandboxContext,
ParseError
[+] Added ErrorCategorySet, ErrorCategoryClear, GetStackTrace
[+] IExitSubscriber, ETriggerLevel
[*] Write bias the high performance RWLockImpl read-lock operation operation
[+] ExitHandlerAdd/ExitHandlerRemove (exit subsystem)
[*] Updated API style
Digests
[+] CpuId::CpuBitCount
[+] GetUserProgramsFolder
[+] GetPackagePath
[*] Split IStreamReader with an inl file
[*] BlobWriter/BlobReader/BlobArbitraryReader can now take shared pointers to bytebuffers. default constructor allocates a new scalable bytebuffer
[+] ICharacterProvider
[+] ICharacterProviderEx
[+] IBufferedCharacterConsumer
[+] ProviderFromSharedString
[+] ProviderFromString
[+] BufferConsumerFromProvider
[*] Parse Subsystem uses character io bufferer
[*] Rewritten NT's high perf semaphore to use userland SRW/ConVars [like mutex, based on generic semaphore]
[+] ByteBuffer::ResetReadPointer
[*] Bug fix bytebuffer base not reset on free and some scaling issues
[+] ProcessMap -> Added kSectionNameStack, kSectionNameFile, kSectionNameHeap for Section
[*] ProcessMap -> Refactor Segment to Section. I was stupid for keeping a type conflict hack API facing
[+] Added 64 *byte* fast RNG seeds
[+] File Advisorys/File Lock Awareness
[+] Added extended IAuroraThread from OS identifier caches for debug purposes
[*] Tweaked how memory is reported on Windows. Better consistency of what values mean across functions.
[*] Broke AuroraUtils/Typedefs out into a separate library
[*] Update build script
[+] Put some more effort into adding detail to the readme before rewriting it, plus, added some media
[*] Improved public API documentation
[*] Bug fix `SetConsoleCtrlHandler`
[+] Locale TimeDateToFileNameISO8601
[+] Console config stdOutShortTime
[*] Begin using internal UTF8/16 decoders when platform support isnt available (instead of stl)
[*] Bug fixes in decoders
[*] Major bug fix, AuMax
[+] RateLimiter
[+] Binary file sink
[+] Log directory sink
[*] Data header usability (more operators)
[+] AuRemoveRange
[+] AuRemove
[+] AuTryRemove
[+] AuTryRemoveRange
[+] auCastUtils
[+] Finish NewLSWin32Source
[+] AuTryFindByTupleN, AuTryRemoveByTupleN
[+] Separated AuRead/Write types, now in auTypeUtils
[+] Added GetPosition/SetPosition to FileWriter
[*] Fix stupid AuMin in place of AuMax in SpawnThread.Unix.Cpp
[*] Refactored Arbitrary readers to SeekingReaders (as in, they could be atomic and/or parallelized, and accept an arbitrary position as a work parameter -> not Seekable, as in, you can simply set the position)
[*] Hack back in the sched deinit
[+] File AIO loop source interop
[+] Begin to prototype a LoopQueue object I had in mind for NT, untested btw
[+] Stub code for networking
[+] Compression BaseStream/IngestableStreamBase
[*] Major: read/write locks now support write-entrant read routines.
[*] Compression subsystem now uses the MemoryView concept
[*] Rewrite the base stream compressions, made them less broken
[*] Update hashing api
[*] WriterTryGoForward and ReaderTryGoForward now revert to the previous relative index instead of panicing
[+] Added new AuByteBuffer apis
Trim, Pad, WriteFrom, WriteString, [TODO: ReadString]
[+] Added ByteBufferPushReadState
[+] Added ByteBufferPushWriteState
[*] Move from USC-16 to full UTF-16. Win32 can handle full UTF-16.
[*] ELogLevel is now an Aurora enum
[+] Raised arbitrary limit in header to 255, the max filter buffer
[+] Explicit GZip support
[+] Explicit Zip support
[+] Added [some] compressors
et al
2022-02-17 00:11:40 +00:00
|
|
|
// ..
|
2022-09-12 22:38:44 +00:00
|
|
|
if (gRuntimeConfig.debug.bEnableWin32RootExceptionHandler)
|
2022-06-16 00:27:00 +00:00
|
|
|
{
|
|
|
|
AddVectoredExceptionHandler(1, HandleVectorException);
|
|
|
|
}
|
2021-06-27 21:25:29 +00:00
|
|
|
}
|
|
|
|
}
|