summaryrefslogtreecommitdiffstats
path: root/components/nacl/loader
diff options
context:
space:
mode:
authortimurrrr <timurrrr@chromium.org>2015-02-05 01:19:20 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-05 09:21:20 +0000
commitaf81370a77349709ce37cbaec93020e88400ef7e (patch)
tree0d179d0d3b070df012f124ab5c67d151ac360f50 /components/nacl/loader
parentc6ca44530c782348b6d49f5221b5678708353bb8 (diff)
downloadchromium_src-af81370a77349709ce37cbaec93020e88400ef7e.zip
chromium_src-af81370a77349709ce37cbaec93020e88400ef7e.tar.gz
chromium_src-af81370a77349709ce37cbaec93020e88400ef7e.tar.bz2
Make chrome.exe built with ASan/Win work with sandbox enabled
Also add an ASan test to sbox_integration_tests on Windows BUG=382867 Review URL: https://codereview.chromium.org/868253011 Cr-Commit-Position: refs/heads/master@{#314780}
Diffstat (limited to 'components/nacl/loader')
-rw-r--r--components/nacl/loader/nacl_main_platform_delegate_win.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/components/nacl/loader/nacl_main_platform_delegate_win.cc b/components/nacl/loader/nacl_main_platform_delegate_win.cc
index f530961..cc75ad2 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();
}