Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: sandbox/win/src/address_sanitizer_test.cc

Issue 1814863004: Cleanup/Remove Windows XP/Vista version checks from Windows sandbox code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert disabled reparse point check Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sandbox/win/src/Wow64_64.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdio.h> 5 #include <stdio.h>
6 6
7 #include "base/environment.h" 7 #include "base/environment.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 pdb_path.value().c_str())); 81 pdb_path.value().c_str()));
82 82
83 env_->SetVar("ASAN_OPTIONS", "exitcode=123"); 83 env_->SetVar("ASAN_OPTIONS", "exitcode=123");
84 if (asan_build) { 84 if (asan_build) {
85 int result = runner.RunTest(L"AddressSanitizerTests_Report"); 85 int result = runner.RunTest(L"AddressSanitizerTests_Report");
86 EXPECT_EQ(123, result); 86 EXPECT_EQ(123, result);
87 87
88 std::string data; 88 std::string data;
89 ASSERT_TRUE(base::ReadFileToString(base::FilePath(temp_file_name), &data)); 89 ASSERT_TRUE(base::ReadFileToString(base::FilePath(temp_file_name), &data));
90 // Redirection uses a feature that was added in Windows Vista. 90 // Redirection uses a feature that was added in Windows Vista.
91 if (base::win::GetVersion() >= base::win::VERSION_VISTA) { 91 ASSERT_TRUE(
92 ASSERT_TRUE( 92 strstr(data.c_str(), "ERROR: AddressSanitizer: heap-buffer-overflow"))
93 strstr(data.c_str(), "ERROR: AddressSanitizer: heap-buffer-overflow")) 93 << "There doesn't seem to be an ASan report:\n" << data;
94 << "There doesn't seem to be an ASan report:\n" << data; 94 ASSERT_TRUE(strstr(data.c_str(), "AddressSanitizerTests_Report"))
95 ASSERT_TRUE(strstr(data.c_str(), "AddressSanitizerTests_Report")) 95 << "The ASan report doesn't appear to be symbolized:\n" << data;
96 << "The ASan report doesn't appear to be symbolized:\n" << data; 96 ASSERT_TRUE(strstr(data.c_str(), strrchr(__FILE__, '\\')))
97 ASSERT_TRUE(strstr(data.c_str(), strrchr(__FILE__, '\\'))) 97 << "The stack trace doesn't have a correct filename:\n" << data;
98 << "The stack trace doesn't have a correct filename:\n" << data;
99 } else {
100 LOG(WARNING) << "Pre-Vista versions are not supported.";
101 }
102 } else { 98 } else {
103 LOG(WARNING) << "Not an AddressSanitizer build, skipping the run."; 99 LOG(WARNING) << "Not an AddressSanitizer build, skipping the run.";
104 } 100 }
105 } 101 }
106 102
107 } 103 }
OLDNEW
« no previous file with comments | « sandbox/win/src/Wow64_64.cc ('k') | sandbox/win/src/broker_services.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698