diff options
author | Michal Klocek <michal.klocek@qt.io> | 2018-03-28 01:18:39 +0000 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2018-06-06 12:46:19 +0000 |
commit | 175e85a17d1cf321376cc9e8ba70711699040fed (patch) | |
tree | 9516c6c9f562c1212b6099b993707f3f73ac982e | |
parent | 746a5b92fae5dad5867a414a5819093b560dcee2 (diff) |
[Backport] Security Bug 826193
Properly handle the unknown module index in CallStackProfileMetricsProvider
Fixes an issue where the profile merging code did not retain the unknown
module state for frames that had it set.
Bug: 826193
Reviewed-on: https://chromium-review.googlesource.com/982543
Change-Id: I91616f7c5e82b4375a484ce607e8d2177ec09b08
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r-- | chromium/components/metrics/call_stack_profile_metrics_provider.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chromium/components/metrics/call_stack_profile_metrics_provider.cc b/chromium/components/metrics/call_stack_profile_metrics_provider.cc index 4a22264680e..0dc4e59163d 100644 --- a/chromium/components/metrics/call_stack_profile_metrics_provider.cc +++ b/chromium/components/metrics/call_stack_profile_metrics_provider.cc @@ -258,6 +258,10 @@ bool PendingProfiles::TryProfileMerge(const ProfilesState& profile_state, // Make a copy of the sample so we can update its module indexes. StackSamplingProfiler::Sample sample = base_sample; for (StackSamplingProfiler::Frame& frame : sample.frames) { + if (frame.module_index == + base::StackSamplingProfiler::Frame::kUnknownModuleIndex) { + continue; + } const auto& module = from_profile.modules[frame.module_index]; auto it = module_id_to_index.find(module.id); if (it == module_id_to_index.end()) { |