diff options
author | 2024-11-04 15:44:50 +0000 | |
---|---|---|
committer | 2024-11-05 09:54:02 +0000 | |
commit | ad2afaee629a165ee965e61158933fa3aa2a3e64 (patch) | |
tree | d419b0c71e60b1555c60a5b36e9fcdc31ae333a8 /runtime/class_table.h | |
parent | 55cc56fba28ac4e02466ab937b2a19fc6bf8a221 (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 'runtime/class_table.h')
0 files changed, 0 insertions, 0 deletions