Skip to content

Commit

Permalink
Fixed issues related to enabling generic math in a general sense (#4)
Browse files Browse the repository at this point in the history
- Disable constraint checking during EEInit
- Disable il linker running on CoreLib
- Fixup generic math tests to actually build
  • Loading branch information
davidwrighton authored and tannergooding committed Jun 23, 2021
1 parent f0c0d0d commit 4191dc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/coreclr/vm/typedesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1730,6 +1730,11 @@ BOOL TypeVarTypeDesc::SatisfiesConstraints(SigTypeContext *pTypeContextOfConstra
}
CONTRACTL_END;

// During EEStartup, we cannot safely validate constraints, but we can also be confident that the code doesn't violate them
// Just skip validation and declare that the constraints are satisfied.
if (g_fEEInit)
return TRUE;

IMDInternalImport* pInternalImport = GetModule()->GetMDImport();
mdGenericParamConstraint tkConstraint;

Expand Down

0 comments on commit 4191dc5

Please sign in to comment.