Index: content/common/sandbox_win.cc |
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc |
index d89679bd472f1d61fb26540b2812976bdb1f95c2..17893ffa6fd399677431f2a16d8019002308ad03 100644 |
--- a/content/common/sandbox_win.cc |
+++ b/content/common/sandbox_win.cc |
@@ -339,6 +339,19 @@ bool AddGenericPolicy(sandbox::TargetPolicy* policy) { |
return false; |
#endif // NDEBUG |
+ // Add the policy for read-only PDB file access for AddressSanitizer. |
+#if defined(ADDRESS_SANITIZER) |
+ base::FilePath exe; |
+ if (!PathService::Get(base::FILE_EXE, &exe)) |
+ return false; |
+ base::FilePath pdb_path = exe.DirName().Append(L"*.pdb"); |
+ result = policy->AddRule(sandbox::TargetPolicy::SUBSYS_FILES, |
+ sandbox::TargetPolicy::FILES_ALLOW_READONLY, |
+ pdb_path.value().c_str()); |
+ if (result != sandbox::SBOX_ALL_OK) |
+ return false; |
+#endif |
+ |
AddGenericDllEvictionPolicy(policy); |
return true; |
} |