g_assert (mono_error_ok (&error));
break;
case MONO_AOT_TYPEREF_GINST: {
+ MonoError error;
MonoClass *gclass;
MonoGenericContext ctx;
MonoType *type;
ctx.class_inst = decode_generic_inst (module, p, &p);
if (!ctx.class_inst)
return NULL;
- type = mono_class_inflate_generic_type (&gclass->byval_arg, &ctx);
+ type = mono_class_inflate_generic_type_checked (&gclass->byval_arg, &ctx, &error);
+ mono_error_assert_ok (&error); /* FIXME don't swallow the error */
klass = mono_class_from_mono_type (type);
mono_metadata_free_type (type);
break;
t->data.type = decode_type (module, p, &p);
break;
case MONO_TYPE_GENERICINST: {
+ MonoError error;
MonoClass *gclass;
MonoGenericContext ctx;
MonoType *type;
ctx.class_inst = decode_generic_inst (module, p, &p);
if (!ctx.class_inst)
return NULL;
- type = mono_class_inflate_generic_type (&gclass->byval_arg, &ctx);
+ type = mono_class_inflate_generic_type_checked (&gclass->byval_arg, &ctx, &error);
+ mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+
klass = mono_class_from_mono_type (type);
t->data.generic_class = klass->generic_class;
break;
if (!got [got_slots [pindex]] || ji->type == MONO_PATCH_INFO_SFLDA) {
/* In llvm-only made, we might encounter shared methods */
if (mono_llvm_only && ji->type == MONO_PATCH_INFO_METHOD && mono_method_check_context_used (ji->data.method)) {
- MonoError error;
-
g_assert (context);
- ji->data.method = mono_class_inflate_generic_method_checked (ji->data.method, context, &error);
+ ji->data.method = mono_class_inflate_generic_method_checked (ji->data.method, context, error);
+ if (!mono_error_ok (error)) {
+ g_free (got_slots);
+ mono_mempool_destroy (mp);
+ return FALSE;
+ }
}
/* This cannot be resolved in mono_resolve_patch_target () */
if (ji->type == MONO_PATCH_INFO_AOT_JIT_INFO) {
gboolean inited_ok = TRUE;
if (init_class)
- inited_ok = mono_runtime_class_init_full (mono_class_vtable (domain, init_class), &error);
+ inited_ok = mono_runtime_class_init_full (mono_class_vtable (domain, init_class), error);
else if (from_plt && klass && !klass->generic_container)
- inited_ok = mono_runtime_class_init_full (mono_class_vtable (domain, klass), &error);
+ inited_ok = mono_runtime_class_init_full (mono_class_vtable (domain, klass), error);
if (!inited_ok)
- mono_error_raise_exception (&error); /* FIXME don't raise here */
+ return FALSE;
return TRUE;
tinfo = g_new0 (MonoTrampInfo, 1);
tinfo->code = (guint8 *)code;
tinfo->code_size = code_size;
- tinfo->uw_info = uw_info;
tinfo->uw_info_len = uw_info_len;
+ if (uw_info_len)
+ tinfo->uw_info = uw_info;
*out_tinfo = tinfo;
}
uw_info = amodule->unwind_info + uw_offset;
uw_info_len = decode_value (uw_info, &uw_info);
- info->uw_info = uw_info;
info->uw_info_len = uw_info_len;
+ if (uw_info_len)
+ info->uw_info = uw_info;
+ else
+ info->uw_info = NULL;
/* If successful return the address of the following data */
return (guint32*)symbol_addr + 1;