| 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();
|
|
|