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

Unified Diff: sandbox/win/tests/common/controller.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: scoped stuff 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
Index: sandbox/win/tests/common/controller.cc
diff --git a/sandbox/win/tests/common/controller.cc b/sandbox/win/tests/common/controller.cc
index 0033400945295fa6b97a4b4f4ce6121e39c6e82e..738ba14ac65e43cf1c068d0a41ff8d7057af7eb9 100644
--- a/sandbox/win/tests/common/controller.cc
+++ b/sandbox/win/tests/common/controller.cc
@@ -325,6 +325,13 @@ int DispatchCall(int argc, wchar_t **argv) {
else if (EVERY_STATE == state)
command(argc - 4, argv + 4);
+#if defined(ADDRESS_SANITIZER)
+ // Bind and leak dbghelp.dll before the token is lowered, otherwise
+ // AddressSanitizer will crash when trying to symbolize a report.
+ if (!LoadLibraryA("dbghelp.dll"))
+ return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;
+#endif
+
target->LowerToken();
} else if (0 != _wcsicmp(argv[1], L"-child-no-sandbox")) {
return SBOX_TEST_FAILED_TO_EXECUTE_COMMAND;

Powered by Google App Engine
This is Rietveld 408576698