Index: sandbox/win/src/target_services.cc |
diff --git a/sandbox/win/src/target_services.cc b/sandbox/win/src/target_services.cc |
index 03813c8feb7bf691bd6ffb051c681b7e5d9099ad..bd33c050e814593c7a91228534aca5a67e9e13be 100644 |
--- a/sandbox/win/src/target_services.cc |
+++ b/sandbox/win/src/target_services.cc |
@@ -74,6 +74,14 @@ ResultCode TargetServicesBase::Init() { |
// Failure here is a breach of security so the process is terminated. |
void TargetServicesBase::LowerToken() { |
+#if defined(ADDRESS_SANITIZER) |
+ // Bind and leak dbghelp.dll before the token is lowered, otherwise |
+ // AddressSanitizer will crash when trying to symbolize a report. |
+ // TODO: find a better place to do this? |
rvargas (doing something else)
2015/02/02 20:55:58
I'd say this is a type of warming so it should be
Timur Iskhodzhanov
2015/02/02 21:28:38
Carlos, do you agree?
Btw, the *.pdb policy is se
|
+ if (!LoadLibraryA("dbghelp.dll")) |
+ // TODO: If this is a good place, define a new SBOX_FATAL exit code. |
+ ::TerminateProcess(::GetCurrentProcess(), 0x1234); |
+#endif |
if (ERROR_SUCCESS != |
SetProcessIntegrityLevel(g_shared_delayed_integrity_level)) |
::TerminateProcess(::GetCurrentProcess(), SBOX_FATAL_INTEGRITY); |