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

Unified Diff: base/profiler/win32_stack_frame_unwinder_unittest.cc

Issue 1465273002: Stack sampling profiler: remove RUNTIME_FUNCTION sanity check (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: make variations add to 100 Created 5 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 | « base/profiler/win32_stack_frame_unwinder.cc ('k') | chrome/browser/stack_sampling_configuration.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/win32_stack_frame_unwinder_unittest.cc
diff --git a/base/profiler/win32_stack_frame_unwinder_unittest.cc b/base/profiler/win32_stack_frame_unwinder_unittest.cc
index 2fe34a70b333c36cf80e60afff0e36c6ec4a50d7..9e8fc8f73233874b2aaa2a6269948cb403be3a72 100644
--- a/base/profiler/win32_stack_frame_unwinder_unittest.cc
+++ b/base/profiler/win32_stack_frame_unwinder_unittest.cc
@@ -375,67 +375,4 @@ TEST_F(Win32StackFrameUnwinderTest, ModuleFromQuestionableFrameNotBlacklisted) {
}
}
-// Checks that frames with RUNTIME_FUNCTION structures with nonsensical values
-// are not unwound.
-TEST_F(Win32StackFrameUnwinderTest, RuntimeFunctionSanityCheck) {
- const DWORD64 image_base_for_sanity_check = 3072;
- {
- // Test the expected case: end address greater than begin address and
- // instruction pointer between the two.
- scoped_ptr<Win32StackFrameUnwinder> unwinder = CreateUnwinder();
- CONTEXT context = {0};
- ScopedModuleHandle module;
- RUNTIME_FUNCTION runtime_function = {0};
- runtime_function.BeginAddress = 128;
- runtime_function.EndAddress = 512;
- unwind_functions_->SetHasRuntimeFunction(image_base_for_sanity_check,
- runtime_function, 256,
- &context);
- EXPECT_TRUE(unwinder->TryUnwind(&context, &module));
- EXPECT_TRUE(module.IsValid());
- }
-
- {
- // Test begin address greater than end address.
- scoped_ptr<Win32StackFrameUnwinder> unwinder = CreateUnwinder();
- CONTEXT context = {0};
- ScopedModuleHandle module;
- RUNTIME_FUNCTION runtime_function = {0};
- runtime_function.BeginAddress = 512;
- runtime_function.EndAddress = 128;
- unwind_functions_->SetHasRuntimeFunction(image_base_for_sanity_check,
- runtime_function, 256,
- &context);
- EXPECT_FALSE(unwinder->TryUnwind(&context, &module));
- }
-
- {
- // Test instruction pointer before begin address.
- scoped_ptr<Win32StackFrameUnwinder> unwinder = CreateUnwinder();
- CONTEXT context = {0};
- ScopedModuleHandle module;
- RUNTIME_FUNCTION runtime_function = {0};
- runtime_function.BeginAddress = 128;
- runtime_function.EndAddress = 512;
- unwind_functions_->SetHasRuntimeFunction(image_base_for_sanity_check,
- runtime_function, 50,
- &context);
- EXPECT_FALSE(unwinder->TryUnwind(&context, &module));
- }
-
- {
- // Test instruction pointer after end address.
- scoped_ptr<Win32StackFrameUnwinder> unwinder = CreateUnwinder();
- CONTEXT context = {0};
- ScopedModuleHandle module;
- RUNTIME_FUNCTION runtime_function = {0};
- runtime_function.BeginAddress = 128;
- runtime_function.EndAddress = 512;
- unwind_functions_->SetHasRuntimeFunction(image_base_for_sanity_check,
- runtime_function, 600,
- &context);
- EXPECT_FALSE(unwinder->TryUnwind(&context, &module));
- }
-}
-
} // namespace base
« no previous file with comments | « base/profiler/win32_stack_frame_unwinder.cc ('k') | chrome/browser/stack_sampling_configuration.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698