diff options
author | fanquake <fanquake@gmail.com> | 2020-01-13 16:36:16 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2020-01-13 16:36:16 +0800 |
commit | f2645c26017591f819344d24dc0a88dc32dde6fd (patch) | |
tree | fea9f5efc47b850116e7698e70519e58d63168eb | |
parent | e258ce792a4849927a6db51786732d71cbbb65fc (diff) |
windows: Enable heap terminate-on-corruption
This is default behavior from Windows 8 onwards, however we still support
Windows 7, so it should make sense to explicitly enable this.
More info:
https://docs.microsoft.com/en-us/windows/win32/api/heapapi/nf-heapapi-heapsetinformation
-rw-r--r-- | src/init.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index dc0f2ce05c..8ad32f4bdb 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -879,6 +879,9 @@ bool AppInitBasicSetup() #ifdef WIN32 // Enable Data Execution Prevention (DEP) SetProcessDEPPolicy(PROCESS_DEP_ENABLE); + + // Enable heap terminate-on-corruption + HeapSetInformation(nullptr, HeapEnableTerminationOnCorruption, nullptr, 0); #endif if (!SetupNetworking()) |