Run class cctor in RuntimeHelpers.GetUninitializedObject(type). (#44898)
authorZoltan Varga <vargaz@gmail.com>
Thu, 19 Nov 2020 22:42:01 +0000 (17:42 -0500)
committerGitHub <noreply@github.com>
Thu, 19 Nov 2020 22:42:01 +0000 (17:42 -0500)
commit34400211f28f98ffe698128fc6e5eea4537b5159
treed163db4bb9489346c32860ba08444fa3b47d209a
parent63923b52a5fdee74ccd16b471879b155af0f21bc
Run class cctor in RuntimeHelpers.GetUninitializedObject(type). (#44898)

* Run class cctor in RuntimeHelpers.GetUninitializedObject(type).

Fixes https://github.com/dotnet/runtime/issues/44852.

* Reenable test.

* Don't run the cctor for beforefieldinit classes.
src/libraries/System.Runtime/tests/System/Runtime/CompilerServices/RuntimeHelpersTests.cs
src/mono/mono/metadata/icall.c