-
Notifications
You must be signed in to change notification settings - Fork 800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes #16359 - correctly handle imports with 0 length public key tokens #16363
Merged
Conversation
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
abonie
approved these changes
Nov 30, 2023
T-Gro
approved these changes
Dec 1, 2023
T-Gro
added a commit
that referenced
this pull request
Dec 4, 2023
* Fixes #16359 - correctly handle imports with 0 length public key tokens (#16363) * Parser: recover on unfinished record decls, fix field ranges (#16357) * Parser: recover on unfinished record decls, fix field ranges * Fantomas * Better diagnostic ranges for fields * More parser tests * Update surface area * Fix xml doc test * Update baselines * Update src/Compiler/SyntaxTree/SyntaxTree.fsi Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com> * Add MutableKeyword to SynFieldTrivia. (#11) * Simplify * Fantomas --------- Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com> Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com> --------- Co-authored-by: Kevin Ransom (msft) <codecutter@hotmail.com> Co-authored-by: Eugene Auduchinok <eugene.auduchinok@jetbrains.com> Co-authored-by: Edgar Gonzalez <edgargonzalez.info@gmail.com> Co-authored-by: Florian Verdonck <florian.verdonck@outlook.com> Co-authored-by: Tomas Grosup <tomasgrosup@microsoft.com>
3 tasks
4 tasks
3 tasks
3 tasks
This was referenced Jan 11, 2024
3 tasks
This was referenced Jan 17, 2024
3 tasks
3 tasks
This was referenced Jan 19, 2024
3 tasks
3 tasks
3 tasks
3 tasks
3 tasks
3 tasks
3 tasks
Merged
3 tasks
3 tasks
3 tasks
3 tasks
3 tasks
3 tasks
2 tasks
3 tasks
3 tasks
This was referenced Sep 16, 2024
3 tasks
2 tasks
3 tasks
3 tasks
3 tasks
3 tasks
2 tasks
3 tasks
3 tasks
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.
Description
When the F# compiler imported an assembly, if the assembly had a publickey token record that was empty, I.e a 0 length Public key record, it treated the assembly as having a public key. When we subsequently wrote an assembly reference to this assembly, we would add a public key made up of a garbage value. This particular form is not usually produced by MS compilers and so it has escaped detection, however, some obfuscation programs when obfuscating signed assemblies will make the assembly unsigned by zeroing out the public key record length rather than the public key address. This change to the compiler ensures that when we import types we treat references to 0 length public keys as if there was no public key.
Fixes #16359