projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2cfc551
)
[interp] Add some error handling to the interpreter
author
Rodrigo Kumpera
<kumpera@gmail.com>
Tue, 12 Sep 2017 20:04:46 +0000
(13:04 -0700)
committer
Rodrigo Kumpera
<kumpera@gmail.com>
Tue, 12 Sep 2017 20:04:46 +0000
(13:04 -0700)
mono/mini/interp/transform.c
patch
|
blob
|
history
diff --git
a/mono/mini/interp/transform.c
b/mono/mini/interp/transform.c
index 6faca6d5b93e0fe7e50928fd7553011c74347d55..4273f74553bb31935c3e5dcb319b17e99906eecb 100644
(file)
--- a/
mono/mini/interp/transform.c
+++ b/
mono/mini/interp/transform.c
@@
-4258,6
+4258,7
@@
mono_interp_transform_init (void)
MonoException *
mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context)
{
MonoException *
mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context)
{
+ MonoError error;
int i, align, size, offset;
MonoMethod *method = imethod->method;
MonoImage *image = method->klass->image;
int i, align, size, offset;
MonoMethod *method = imethod->method;
MonoImage *image = method->klass->image;
@@
-4275,9
+4276,11
@@
mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context)
MonoDomain *domain = imethod->domain;
// g_printerr ("TRANSFORM(0x%016lx): begin %s::%s\n", mono_thread_current (), method->klass->name, method->name);
MonoDomain *domain = imethod->domain;
// g_printerr ("TRANSFORM(0x%016lx): begin %s::%s\n", mono_thread_current (), method->klass->name, method->name);
- method_class_vt = mono_class_vtable (domain, imethod->method->klass);
+ method_class_vt = mono_class_vtable_full (domain, imethod->method->klass, &error);
+ if (!is_ok (&error))
+ return mono_error_convert_to_exception (&error);
+
if (!method_class_vt->initialized) {
if (!method_class_vt->initialized) {
- MonoError error;
jmp_buf env;
InterpFrame *last_env_frame = context->env_frame;
jmp_buf *old_env = context->current_env;
jmp_buf env;
InterpFrame *last_env_frame = context->env_frame;
jmp_buf *old_env = context->current_env;
@@
-4415,12
+4418,10
@@
mono_interp_transform_method (InterpMethod *imethod, ThreadContext *context)
break;
case MonoInlineMethod:
if (method->wrapper_type == MONO_WRAPPER_NONE && *ip != CEE_CALLI) {
break;
case MonoInlineMethod:
if (method->wrapper_type == MONO_WRAPPER_NONE && *ip != CEE_CALLI) {
- m = mono_get_method_
full (image, read32 (ip + 1), NULL, generic_context
);
- if (
m == NULL
) {
+ m = mono_get_method_
checked (image, read32 (ip + 1), NULL, generic_context, &error
);
+ if (
!is_ok (&error)
) {
g_free (is_bb_start);
g_free (is_bb_start);
- g_error ("FIXME: where to get method and class string?");
- return NULL;
- // return mono_get_exception_missing_method ();
+ return mono_error_convert_to_exception (&error);
}
mono_class_init (m->klass);
if (!mono_class_is_interface (m->klass))
}
mono_class_init (m->klass);
if (!mono_class_is_interface (m->klass))