[metadata] If a static field fails while computing size, fail the class (#20652)
commit74f959c33d86bcbb1a4879fdccefc624143bbcd7
authorAleksey Kliger (λgeek) <alklig@microsoft.com>
Thu, 17 Dec 2020 15:53:44 +0000 (17 10:53 -0500)
committerGitHub <noreply@github.com>
Thu, 17 Dec 2020 15:53:44 +0000 (17 10:53 -0500)
tree0c8dbdb8f2013945b819ac52826e74201da607bd
parent375fd8368708c2222f506f4763c01e379ba537d7
[metadata] If a static field fails while computing size, fail the class (#20652)

* [metadata] If a static field fails while computing size, fail the class

Fixes https://github.com/mono/mono/issues/20650

* [interp] If generate fails early, td->line_numbers is null

Avoid a pointless warning from g_array_free

* [interp] Don't call mono_class_value_size on reference types
mono/metadata/class-init.c
mono/metadata/object.c
mono/mini/interp/transform.c
mono/tests/Makefile.am
mono/tests/struct-static.cs [new file with mode: 0644]