Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[lldb/crashlog] Fix sticky image parsing logic
Prior to this patch, when a user loaded multiple crash report in lldb, they could get in a situation where all the targets would keep the same architecture and executable path as the first one that we've created. The reason behind this was that even if we created a new CrashLog object, which is derived from a Symbolicator class that has a newly constructoted image list as a default argument, because that default argument is only created once when the function is defined, every CrashLog object would share the same list. That will cause use to append newly parsed images to the same Symbolicator image list accross multiple CrashLog objects. To address this, this patch changes the default argument value for the image parameter to `None` and only initialize it as an empty list when no argument was passed. This also removes the image list stored in each CrashLog parsers since they shouldn't have any state and should be re-usable. So now, the only source of truth is stored in the CrashLog object. rdar://84984949 Differential Revision: https://reviews.llvm.org/D157044 Signed-off-by: Med Ismail Bennani <ismail@bennani.ma>
- Loading branch information
1 parent
4677041
commit 75bed96
Showing
2 changed files
with
6 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters