summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2024-11-04 15:44:50 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-11-05 09:54:02 +0000
commitad2afaee629a165ee965e61158933fa3aa2a3e64 (patch)
treed419b0c71e60b1555c60a5b36e9fcdc31ae333a8 /compiler/optimizing/optimizing_compiler.cc
parent55cc56fba28ac4e02466ab937b2a19fc6bf8a221 (diff)
Fix buggy code in ProfileSaver.
The code has two bugs: 1. `ResolveTrackedLocations` generates N empty locations and passes them to `AddTrackedLocationsToMap`. 2. There is a check in `AddTrackedLocationsToMap` that was intended to filter out locations ending with '/' but unintentionally filters out empty locations (because std::string::npos has a value of -1 and therefore equals to `path.size() - 1` when `path` is empty). Interestingly, with both bugs present together, they result in correct behavior. However, we shouldn't rely on bugs that happen to work together. Test: art/test.py -b --host -r -t 595-profile-saving Change-Id: Ic6cddd529b8295df68bef61f0ceb26a26ad93304
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
0 files changed, 0 insertions, 0 deletions