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

Side by Side Diff: chrome_elf/elf_imports_unittest.cc

Issue 2181793002: Add rpcrt4.dll to the list of allowed imports for chrome_elf.dll in the ELFImportsTest.ChromeElfSan… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <stdint.h> 5 #include <stdint.h>
6 #include <windows.h> 6 #include <windows.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 std::vector<std::string> elf_imports; 71 std::vector<std::string> elf_imports;
72 GetImports(dll, &elf_imports); 72 GetImports(dll, &elf_imports);
73 73
74 // Check that ELF has imports. 74 // Check that ELF has imports.
75 ASSERT_LT(0u, elf_imports.size()) << "Ensure the chrome_elf_unittests " 75 ASSERT_LT(0u, elf_imports.size()) << "Ensure the chrome_elf_unittests "
76 "target was built, instead of chrome_elf_unittests.exe"; 76 "target was built, instead of chrome_elf_unittests.exe";
77 77
78 static const char* const kValidFilePatterns[] = { 78 static const char* const kValidFilePatterns[] = {
79 "KERNEL32.dll", 79 "KERNEL32.dll",
80 #if defined(COMPONENT_BUILD) 80 "RPCRT4.dll",
krasin 2016/07/25 21:10:06 This change should probably be reflected in the CL
ananta 2016/07/25 21:11:42 Done.
81 "MSVC*.dll",
82 "VCRUNTIME*.dll",
83 "api-ms-win-crt-*.dll",
84 #endif
85 #if defined(SYZYASAN) 81 #if defined(SYZYASAN)
86 "syzyasan_rtl.dll", 82 "syzyasan_rtl.dll",
87 #endif 83 #endif
88 #if defined(ADDRESS_SANITIZER) && defined(COMPONENT_BUILD) 84 #if defined(ADDRESS_SANITIZER) && defined(COMPONENT_BUILD)
89 "clang_rt.asan_dynamic-i386.dll", 85 "clang_rt.asan_dynamic-i386.dll",
90 #endif 86 #endif
91 "ADVAPI32.dll", 87 "ADVAPI32.dll",
92 // On 64 bit the Version API's like VerQueryValue come from VERSION.dll. 88 // On 64 bit the Version API's like VerQueryValue come from VERSION.dll.
93 // It depends on kernel32, advapi32 and api-ms-win-crt*.dll. This should 89 // It depends on kernel32, advapi32 and api-ms-win-crt*.dll. This should
94 // be ok. 90 // be ok.
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 ASSERT_LT(0u, exe_imports.size()) << "Ensure the chrome_elf_unittests " 133 ASSERT_LT(0u, exe_imports.size()) << "Ensure the chrome_elf_unittests "
138 "target was built, instead of chrome_elf_unittests.exe"; 134 "target was built, instead of chrome_elf_unittests.exe";
139 135
140 // Chrome.exe's first import must be ELF. 136 // Chrome.exe's first import must be ELF.
141 EXPECT_EQ("chrome_elf.dll", exe_imports[0]) << 137 EXPECT_EQ("chrome_elf.dll", exe_imports[0]) <<
142 "Illegal import order in chrome.exe (ensure the chrome_elf_unittest " 138 "Illegal import order in chrome.exe (ensure the chrome_elf_unittest "
143 "target was built, instead of just chrome_elf_unittests.exe)"; 139 "target was built, instead of just chrome_elf_unittests.exe)";
144 } 140 }
145 141
146 } // namespace 142 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698