diff options
author | Zoltan Varga <vargaz@gmail.com> | 2009-05-02 17:59:16 +0400 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2009-05-02 17:59:16 +0400 |
commit | aef787c83a78399dce15a4cf52a15e5239b15b36 (patch) | |
tree | c610228c8e35bf72c9fb4382f2ee671b62fedf76 | |
parent | ae9fe7714a2a0f67a55a62ba58074acb82bfa30f (diff) |
2009-05-02 Zoltan Varga <vargaz@gmail.com>
* method-to-ir.c (mono_method_to_ir): Handle loading errors in the
ldfld/stfld opcodes.
svn path=/trunk/mono/; revision=133382
-rw-r--r-- | mono/mini/ChangeLog | 3 | ||||
-rw-r--r-- | mono/mini/method-to-ir.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/mono/mini/ChangeLog b/mono/mini/ChangeLog index d00c6ad4df1..ae83b9175d6 100644 --- a/mono/mini/ChangeLog +++ b/mono/mini/ChangeLog @@ -1,5 +1,8 @@ 2009-05-02 Zoltan Varga <vargaz@gmail.com> + * method-to-ir.c (mono_method_to_ir): Handle loading errors in the + ldfld/stfld opcodes. + * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this as it is not used. diff --git a/mono/mini/method-to-ir.c b/mono/mini/method-to-ir.c index 18e1483945b..da25cd72d99 100644 --- a/mono/mini/method-to-ir.c +++ b/mono/mini/method-to-ir.c @@ -7826,7 +7826,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b goto load_error; if (!dont_verify && !cfg->skip_visibility && !mono_method_can_access_field (method, field)) FIELD_ACCESS_FAILURE; - mono_class_init (klass); + if (!mono_class_init (klass)) + goto load_error; /* XXX this is technically required but, so far (SL2), no [SecurityCritical] types (not many exists) have any visible *instance* field (in fact there's a single case for a static field in Marshal) XXX @@ -7963,7 +7964,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b field = mono_field_from_token (image, token, &klass, generic_context); if (!field) goto load_error; - mono_class_init (klass); + if (!mono_class_init (klass)) + goto load_error; if (!dont_verify && !cfg->skip_visibility && !mono_method_can_access_field (method, field)) FIELD_ACCESS_FAILURE; |