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
pull/17916/head
fanquake 5 years ago
parent e258ce792a
commit f2645c2601
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1

@ -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())

Loading…
Cancel
Save