diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:46:45 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-09-07 08:46:45 -0400 |
commit | 1e50b0e8844937515922f9a4f52b8feea574c206 (patch) | |
tree | 71ef42e8c5a57abf105cede40a2682b92ec7b9db | |
parent | 1a3f9f377ca616ec408fdcd9e64b9f75e4a46fb6 (diff) | |
parent | 056003d602a2e6f5c2f417d176b68da50b921c32 (diff) | |
download | tor-1e50b0e8844937515922f9a4f52b8feea574c206.tar.gz tor-1e50b0e8844937515922f9a4f52b8feea574c206.zip |
Merge branch 'maint-0.3.3' into release-0.3.3
-rw-r--r-- | changes/bug27461 | 5 | ||||
-rw-r--r-- | src/or/main.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/changes/bug27461 b/changes/bug27461 new file mode 100644 index 0000000000..3571ee816a --- /dev/null +++ b/changes/bug27461 @@ -0,0 +1,5 @@ + o Minor bugfixes (compilation): + - Stop calling SetProcessDEPPolicy() on 64-bit Windows. It is not + supported, and always fails. Some compilers warn about the function + pointer cast on 64-bit Windows. + Fixes bug 27461; bugfix on 0.2.2.23-alpha. diff --git a/src/or/main.c b/src/or/main.c index 9ecdc95552..3aa730dcec 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -3995,6 +3995,13 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) #endif /* On heap corruption, just give up; don't try to play along. */ HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0); + + /* SetProcessDEPPolicy is only supported on 32-bit Windows. + * (On 64-bit Windows it always fails, and some compilers don't like the + * PSETDEP cast.) + * 32-bit Windows defines _WIN32. + * 64-bit Windows defines _WIN32 and _WIN64. */ +#ifndef _WIN64 /* Call SetProcessDEPPolicy to permanently enable DEP. The function will not resolve on earlier versions of Windows, and failure is not dangerous. */ @@ -4008,6 +4015,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg) setdeppolicy(3); } } +#endif /* !defined(_WIN64) */ #endif /* defined(_WIN32) */ configure_backtrace_handler(get_version()); |