diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-05-12 08:40:30 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-05-12 08:40:30 -0400 |
commit | 44102714460aafe59d77fdba0b1101a7bea8ab75 (patch) | |
tree | 05d812f6b7d274efed9ddef9c80f0c38014119cc /src/or/main.c | |
parent | 61a367cadd235dacf3cdc5543ba261dfee66f5d4 (diff) | |
parent | 503f101d2b1d8dfdd17cc2aa79fc10d79eecd04c (diff) | |
download | tor-44102714460aafe59d77fdba0b1101a7bea8ab75.tar.gz tor-44102714460aafe59d77fdba0b1101a7bea8ab75.zip |
Merge branch 'ticket21953_029'
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c index fe63ddb091..f1a8cfb96e 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -3665,6 +3665,8 @@ tor_main(int argc, char *argv[]) int result = 0; #ifdef _WIN32 + /* 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. */ @@ -3673,7 +3675,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 |