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

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

Issue 2526563002: Add a target to run the SyzyAsan RTL unittests in 4G (Closed)
Patch Set: Disable the wild access test in 4G. 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
Index: syzygy/agent/asan/runtime.cc
diff --git a/syzygy/agent/asan/runtime.cc b/syzygy/agent/asan/runtime.cc
index b6d240eeeadd8a77b3f6d5ce2b83cb958b7f460b..a211ebef0c71746def57fd306ef41c0d3f715a9a 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());
+ // Otherwise dynamically allocate the shadow memory.
chrisha 2016/11/23 15:19:27 "Otherwise" is no longer needed.
Sébastien Marchand 2016/11/23 15:28:04 Done.
+ 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();

Powered by Google App Engine
This is Rietveld 408576698