Skip to content
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

Should IsGreaterAssemblyRefVersion ignore 65535.65535.65535.65535? #349

Open
CreateAndInject opened this issue Mar 27, 2020 · 4 comments
Open

Comments

@CreateAndInject
Copy link
Contributor

I don't know why, but sometimes there's a reference mscorlib, 65535.65535.65535.65535, should IsGreaterAssemblyRefVersion ignore it? And what's the meaning of this version?

@0xd4d
Copy link
Collaborator

0xd4d commented Mar 28, 2020

It's a valid value in metadata. C# (and probably VB.NET) don't allow any of the fields to have the max value (65535), possibly because of a Windows OS limitation. Those values are copied to other parts of the PE file which Windows checks.

Partition II 22.2 page 130 "3. MajorVersion, MinorVersion, BuildNumber, and RevisionNumber can each have any value"

So to answer your question, I don't see a reason to update the code.

@0xd4d
Copy link
Collaborator

0xd4d commented Mar 28, 2020

If you can show that CLR and/or CoreCLR have special checks for that version then the code will be updated though.

@CreateAndInject
Copy link
Contributor Author

CreateAndInject commented Mar 28, 2020

If there're references of mscorlib 2.0.0.0 4.0.0.0 and 65535.65535.65535.65535 in an assembly.
When someome call GetAssemblyRef("mscorlib"), I think he want to pick mscorlib 4.0.0.0 rather than 65535.65535.65535.65535
And I find this in ILSpy:
image

@CreateAndInject

This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant