Description
Description
When compiling with --opt-cross-module Crossgen2 can use invalid tokens from modules not within the version bubble of the compiled module. This is only seen during generation of generic dictionary lookups within generic methods.
Reproduction Steps
Run scenario privately distributed to the .NET Runtime team.
Expected behavior
No tokens from non-local modules can be used from within an R2R image which is not compiled with the --composite or --inputbubble options.
Actual behavior
Tokens from remote modules are used directly. When the dependency module is updated to a different version, these tokens are still used, which will cause the runtime to behave in unpredictable ways.
Regression?
No
Known Workarounds
Use the --opt-cross-module switch only to specify assemblies which are ALWAYS distributed together, and not updated separately. Do not use the --opt-cross-module:* feature.
Configuration
No response
Other information
No response