🍒 [lldb][Windows] Require exact match in LLDBMemoryReader::resolvePointerAsSymbol#12916
Open
speednoisemovement wants to merge 2 commits intoswiftlang:swift/release/6.4.xfrom
Open
🍒 [lldb][Windows] Require exact match in LLDBMemoryReader::resolvePointerAsSymbol#12916speednoisemovement wants to merge 2 commits intoswiftlang:swift/release/6.4.xfrom
speednoisemovement wants to merge 2 commits intoswiftlang:swift/release/6.4.xfrom
Conversation
…erAsSymbol LLDBMemoryReader::resolvePointerAsSymbol will return a symbol if its argument points anywhere inside it. When we have sparse symbols for an image (for example, just COFF exports), we assume that the size of a given symbol is the distance between it and the next known symbol. However, this extent can actually include any number of private symbols. Because of this, multiple symbols resolve to the name of the preceding public symbol, and the last one read can overwrite the others in the `TypeRefBuilder`'s cache. This change adds a requirement on Windows that the pointer match the *start* of a symbol to keep the cache from being stomped. See swiftlang#12891 for details. (cherry picked from commit 565e24f)
Author
|
@swift-ci Please test |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
LLDBMemoryReader::resolvePointerAsSymbol will return a symbol if its argument points anywhere inside it. When we have sparse symbols for an image (for example, just COFF exports), we assume that the size of a given symbol is the distance between it and the next known symbol. However, this extent can actually include any number of private symbols.
Because of this, multiple symbols resolve to the name of the preceding public symbol, and the last one read can overwrite the others in the
TypeRefBuilder's cache.This change adds a requirement on Windows that the pointer match the start of a symbol to keep the cache from being stomped.
See #12891 for details.
(original: #12894)