You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we try to aot an instance like Write<AStruct<string>>, the generic sharing code will aot Write<T_STRUCT>,
there T_STRUCT is a synthetic generic parameter constrained to AStruct<T_REF> where T_REF is a similar parameter constrained to reference types.
Problems can arise if the JIT replaces T_STRUCT with AStruct<T_REF> during JITing, which is done for example by mini_get_underlying_type (). The generic sharing runtime code will expand T_STRUCT to AStruct<string>, but it will not do the same for AStruct<T_REF> leading to problems.
The current workaround is to disable generic sharing, i.e. by setting cfg->prefer_instances.
Description
Currently, the mono generic sharing code has issues with nested structures.
Example:
If we try to aot an instance like
Write<AStruct<string>>
, the generic sharing code will aotWrite<T_STRUCT>
,there
T_STRUCT
is a synthetic generic parameter constrained toAStruct<T_REF>
where T_REF is a similar parameter constrained to reference types.Problems can arise if the JIT replaces
T_STRUCT
withAStruct<T_REF>
during JITing, which is done for example bymini_get_underlying_type ()
. The generic sharing runtime code will expand T_STRUCT toAStruct<string>
, but it will not do the same forAStruct<T_REF>
leading to problems.The current workaround is to disable generic sharing, i.e. by setting cfg->prefer_instances.
Re: #89417
Reproduction Steps
.
Expected behavior
.
Actual behavior
.
Regression?
No.
Known Workarounds
.
Configuration
dotnet/runtime master
Other information
No response
The text was updated successfully, but these errors were encountered: