summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorwfh <wfh@chromium.org>2015-07-17 18:44:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-18 01:46:03 +0000
commit5af8a4d2402ed7f107eeb172f9ac44c51fec243d (patch)
tree8efb6bf23a7f8b194c1d6f0308ec7ef45f5384e4 /sandbox
parent246a86401b28fd42f17b093701b5d6fd8c4c8278 (diff)
downloadchromium_src-5af8a4d2402ed7f107eeb172f9ac44c51fec243d.zip
chromium_src-5af8a4d2402ed7f107eeb172f9ac44c51fec243d.tar.gz
chromium_src-5af8a4d2402ed7f107eeb172f9ac44c51fec243d.tar.bz2
Disable DEP checking tests on 64-bit since it's always enabled.
Windows returns ERROR_INVALID_PARAMETER if you call this on 64-bit on Windows 8.1 and above. BUG=508742 Review URL: https://codereview.chromium.org/1235183003 Cr-Commit-Position: refs/heads/master@{#339377}
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/win/src/process_mitigations_test.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/sandbox/win/src/process_mitigations_test.cc b/sandbox/win/src/process_mitigations_test.cc
index 5fe55d7c..5bcd491 100644
--- a/sandbox/win/src/process_mitigations_test.cc
+++ b/sandbox/win/src/process_mitigations_test.cc
@@ -31,7 +31,7 @@ typedef BOOL (WINAPI *GetProcessMitigationPolicyFunction)(
GetProcessMitigationPolicyFunction get_process_mitigation_policy;
bool CheckWin8DepPolicy() {
- PROCESS_MITIGATION_DEP_POLICY policy;
+ PROCESS_MITIGATION_DEP_POLICY policy = {};
if (!get_process_mitigation_policy(::GetCurrentProcess(), ProcessDEPPolicy,
&policy, sizeof(policy))) {
return false;
@@ -40,7 +40,7 @@ bool CheckWin8DepPolicy() {
}
bool CheckWin8AslrPolicy() {
- PROCESS_MITIGATION_ASLR_POLICY policy;
+ PROCESS_MITIGATION_ASLR_POLICY policy = {};
if (!get_process_mitigation_policy(::GetCurrentProcess(), ProcessASLRPolicy,
&policy, sizeof(policy))) {
return false;
@@ -49,7 +49,7 @@ bool CheckWin8AslrPolicy() {
}
bool CheckWin8StrictHandlePolicy() {
- PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY policy;
+ PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY policy = {};
if (!get_process_mitigation_policy(::GetCurrentProcess(),
ProcessStrictHandleCheckPolicy,
&policy, sizeof(policy))) {
@@ -60,7 +60,7 @@ bool CheckWin8StrictHandlePolicy() {
}
bool CheckWin8Win32CallPolicy() {
- PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY policy;
+ PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY policy = {};
if (!get_process_mitigation_policy(::GetCurrentProcess(),
ProcessSystemCallDisablePolicy,
&policy, sizeof(policy))) {
@@ -70,7 +70,7 @@ bool CheckWin8Win32CallPolicy() {
}
bool CheckWin8DllExtensionPolicy() {
- PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY policy;
+ PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY policy = {};
if (!get_process_mitigation_policy(::GetCurrentProcess(),
ProcessExtensionPointDisablePolicy,
&policy, sizeof(policy))) {
@@ -91,8 +91,10 @@ SBOX_TESTS_COMMAND int CheckWin8(int argc, wchar_t **argv) {
if (!get_process_mitigation_policy)
return SBOX_TEST_NOT_FOUND;
+#if !defined(_WIN64) // DEP is always enabled on 64-bit.
if (!CheckWin8DepPolicy())
return SBOX_TEST_FIRST_ERROR;
+#endif
#if defined(NDEBUG) // ASLR cannot be forced in debug builds.
if (!CheckWin8AslrPolicy())