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
{{ message }}
Repository navigation
Using Covariant returns for RuntimeType crashes during crossgen #45356
It didn't seem so. It looked like a problem with the swapped order of those two class loads, but it was a checked build and so some details were obscured by the compiler optimizations. I am building a debug build now to be able to debug with comfort.
@benaadams I have a fix, it required just a bit more involved reordering of stuff in the SystemDomain::LoadBaseSystemClasses. With that, all the pri1 coreclr tests pass with your change.
I'll create a PR soon.
Activity
janvorli commentedon Nov 30, 2020
@benaadams it seems that the fix here is simple. With the change below, I was able to successfully build runtime:
janvorli commentedon Nov 30, 2020
I am running coreclr tests with your change and this fix to verify everything is fine.
benaadams commentedon Nov 30, 2020
Is a suggestion some of the types might get linked out #45355 (comment); which would be a different reason if the tests fail :)
janvorli commentedon Nov 30, 2020
So unfortunately the fix doesn't work at runtime. Attempt to run anything crashes. I need to figure out why.
benaadams commentedon Nov 30, 2020
Might be ILLink step removing too many things?
janvorli commentedon Nov 30, 2020
It didn't seem so. It looked like a problem with the swapped order of those two class loads, but it was a checked build and so some details were obscured by the compiler optimizations. I am building a debug build now to be able to debug with comfort.
benaadams commentedon Nov 30, 2020
Jit diff now works with your fix #45356 (comment) 🙂
Which I was trying to use to evaluate if covariant returns made much difference, and indeed it looks to allow devirtualization:
janvorli commentedon Nov 30, 2020
@benaadams I have a fix, it required just a bit more involved reordering of stuff in the SystemDomain::LoadBaseSystemClasses. With that, all the pri1 coreclr tests pass with your change.
I'll create a PR soon.
benaadams commentedon Nov 30, 2020
Thank you 😁
janvorli commentedon Sep 7, 2021
The crossgen is dead now, replaced by crossgen2 completely, closing the issue.