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

Unified Diff: syzygy/agent/asan/runtime.cc

Issue 2526563002: Add a target to run the SyzyAsan RTL unittests in 4G (Closed)
Patch Set: Address nits. Created 4 years, 1 month 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 | « syzygy/agent/asan/rtl_unittest.cc ('k') | syzygy/agent/asan/shadow.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: syzygy/agent/asan/runtime.cc
diff --git a/syzygy/agent/asan/runtime.cc b/syzygy/agent/asan/runtime.cc
index b6d240eeeadd8a77b3f6d5ce2b83cb958b7f460b..a35ea5c7772302e01c0290df649a511f1d89b449 100644
--- a/syzygy/agent/asan/runtime.cc
+++ b/syzygy/agent/asan/runtime.cc
@@ -630,36 +630,19 @@ void AsanRuntime::SetErrorCallBack(const AsanOnErrorCallBack& callback) {
}
bool AsanRuntime::SetUpShadow() {
- // If a non-trivial static shadow is provided, but it's the wrong size, then
- // this runtime is unable to support hotpatching and its being run in the
- // wrong memory model.
- if (asan_memory_interceptors_shadow_memory_size > 1 &&
- asan_memory_interceptors_shadow_memory_size != Shadow::RequiredLength()) {
- static const char kMessage[] =
- "Runtime can't support the current memory model. LAA?";
- LaunchMessageBox(kMessage);
- NOTREACHED() << kMessage;
- }
-
- // Use the static shadow memory if possible.
- if (asan_memory_interceptors_shadow_memory_size == Shadow::RequiredLength()) {
- shadow_.reset(new Shadow(asan_memory_interceptors_shadow_memory,
- asan_memory_interceptors_shadow_memory_size));
- } else {
- // Otherwise dynamically allocate the shadow memory.
- shadow_.reset(new Shadow());
+ // Dynamically allocate the shadow memory.
+ shadow_.reset(new Shadow());
- // If the allocation fails, then return false.
- if (shadow_->shadow() == nullptr)
- return false;
+ // If the allocation fails, then return false.
+ if (shadow_->shadow() == nullptr)
+ return false;
#ifndef _WIN64
- // Patch the memory interceptors to refer to the newly allocated shadow.
- // If this fails simply explode because it is unsafe to continue.
- CHECK(PatchMemoryInterceptorShadowReferences(
- asan_memory_interceptors_shadow_memory, shadow_->shadow()));
+ // Patch the memory interceptors to refer to the newly allocated shadow.
+ // If this fails simply explode because it is unsafe to continue.
+ CHECK(PatchMemoryInterceptorShadowReferences(
+ asan_memory_interceptors_shadow_memory, shadow_->shadow()));
#endif
- }
// Setup the shadow and configure the various interceptors to use it.
shadow_->SetUp();
« no previous file with comments | « syzygy/agent/asan/rtl_unittest.cc ('k') | syzygy/agent/asan/shadow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698