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

Unified Diff: base/profiler/native_stack_sampler_win.cc

Issue 1469983002: Stack sampling profiler: fix off-by-one error on truncated stacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: update tests 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 | « no previous file | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/profiler/native_stack_sampler_win.cc
diff --git a/base/profiler/native_stack_sampler_win.cc b/base/profiler/native_stack_sampler_win.cc
index 167dc25e0a9364350a7c90c2336f925650382431..7b41fee4fd50d5478f5bc1e92c5601d40ca2aaf1 100644
--- a/base/profiler/native_stack_sampler_win.cc
+++ b/base/profiler/native_stack_sampler_win.cc
@@ -148,7 +148,7 @@ int RecordStack(CONTEXT* context, int max_stack_size,
for (; (i < max_stack_size) && context->Rip; ++i) {
instruction_pointers[i] = reinterpret_cast<const void*>(context->Rip);
if (!frame_unwinder.TryUnwind(context, &modules[i]))
- return i + 1;
+ return i;
}
return i;
#else
« no previous file with comments | « no previous file | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698