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

Unified Diff: components/nacl/loader/nacl_main_platform_delegate_win.cc

Issue 868253011: Make chrome.exe built with ASan/Win work with sandbox enabled (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more EXPECT turned into ASSERT Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/sandbox_init_win.cc » ('j') | sandbox/win/src/address_sanitizer_test.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_main_platform_delegate_win.cc
diff --git a/components/nacl/loader/nacl_main_platform_delegate_win.cc b/components/nacl/loader/nacl_main_platform_delegate_win.cc
index f530961700f1b27e921f3ee038dd5905ece51182..cc75ad282f1b0f145dbea9d44d65970c5ced7c3c 100644
--- a/components/nacl/loader/nacl_main_platform_delegate_win.cc
+++ b/components/nacl/loader/nacl_main_platform_delegate_win.cc
@@ -26,6 +26,13 @@ void NaClMainPlatformDelegate::EnableSandbox() {
// Warm up language subsystems before the sandbox is turned on.
::GetUserDefaultLangID();
::GetUserDefaultLCID();
+
+#if defined(ADDRESS_SANITIZER)
+ // Bind and leak dbghelp.dll before the token is lowered, otherwise
+ // AddressSanitizer will crash when trying to symbolize a report.
+ CHECK(LoadLibraryA("dbghelp.dll"));
+#endif
+
// Turn the sandbox on.
target_services->LowerToken();
}
« no previous file with comments | « no previous file | content/common/sandbox_init_win.cc » ('j') | sandbox/win/src/address_sanitizer_test.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698