aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-07 08:46:45 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-07 08:46:45 -0400
commitc8a46cda5b7e254be67b4d117dfc6585de2cbfd7 (patch)
treebe3010378151d99b24d023f3c8d88c5d8b1e31fe
parentc68b4d6dac815f6da0427fa4c54e98ec9705c97e (diff)
parent987e12a58f6ce9e0001413e665ac2aa92869af77 (diff)
downloadtor-c8a46cda5b7e254be67b4d117dfc6585de2cbfd7.tar.gz
tor-c8a46cda5b7e254be67b4d117dfc6585de2cbfd7.zip
Merge branch 'maint-0.3.2' into release-0.3.2
-rw-r--r--changes/bug274615
-rw-r--r--src/or/main.c8
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 66b5920980..6c32ee5d87 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -3719,6 +3719,13 @@ tor_main(int argc, char *argv[])
#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. */
@@ -3732,6 +3739,7 @@ tor_main(int argc, char *argv[])
setdeppolicy(3);
}
}
+#endif /* !defined(_WIN64) */
#endif /* defined(_WIN32) */
configure_backtrace_handler(get_version());