diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-13 11:13:22 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-13 11:13:22 -0500 |
commit | ece63105d9157fa432cc59d8b828ca23a80040ff (patch) | |
tree | 2068c36eb63af6cc6c815586669258889c4380f1 /src | |
parent | 5348c8996f53964ce7466f00acad33f625191983 (diff) | |
parent | c928fb988a6679cc5aca380bcc568b165e5f7c4a (diff) | |
download | tor-ece63105d9157fa432cc59d8b828ca23a80040ff.tar.gz tor-ece63105d9157fa432cc59d8b828ca23a80040ff.zip |
Merge branch 'maint-0.2.9' into maint-0.3.0
Diffstat (limited to 'src')
-rw-r--r-- | src/or/main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c index 3139381f30..478316b79f 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -3575,6 +3575,11 @@ tor_main(int argc, char *argv[]) int result = 0; #ifdef _WIN32 +#ifndef HeapEnableTerminationOnCorruption +#define HeapEnableTerminationOnCorruption 1 +#endif + /* On heap corruption, just give up; don't try to play along. */ + HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); /* Call SetProcessDEPPolicy to permanently enable DEP. The function will not resolve on earlier versions of Windows, and failure is not dangerous. */ @@ -3583,7 +3588,10 @@ tor_main(int argc, char *argv[]) typedef BOOL (WINAPI *PSETDEP)(DWORD); PSETDEP setdeppolicy = (PSETDEP)GetProcAddress(hMod, "SetProcessDEPPolicy"); - if (setdeppolicy) setdeppolicy(1); /* PROCESS_DEP_ENABLE */ + if (setdeppolicy) { + /* PROCESS_DEP_ENABLE | PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION */ + setdeppolicy(3); + } } #endif |