if (info->exception_type == MONO_EXCEPTION_METHOD_ACCESS)
mono_error_set_generic_error (&cfg->error, "System", "MethodAccessException", "%s", msg);
- else if (info->exception_type == info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)
+ else if (info->exception_type == MONO_EXCEPTION_FIELD_ACCESS)
mono_error_set_generic_error (&cfg->error, "System", "FieldAccessException", "%s", msg);
else if (info->exception_type == MONO_EXCEPTION_UNVERIFIABLE_IL)
mono_error_set_generic_error (&cfg->error, "System.Security", "VerificationException", msg);
*/
ei->try_start = (guint8*)ei->try_start - cfg->backend->monitor_enter_adjustment;
}
- tblock = cfg->cil_offset_to_bb [ec->try_offset + ec->try_len];
+ if (ec->try_offset + ec->try_len < header->code_size)
+ tblock = cfg->cil_offset_to_bb [ec->try_offset + ec->try_len];
+ else
+ tblock = cfg->bb_exit;
+ if (G_UNLIKELY (cfg->verbose_level >= 4))
+ printf ("looking for end of try [%d, %d] -> %p (code size %d)\n", ec->try_offset, ec->try_len, tblock, header->code_size);
g_assert (tblock);
if (!tblock->native_offset) {
int j, end;
cfg->verbose_level = mini_verbose;
cfg->compile_aot = compile_aot;
cfg->full_aot = full_aot;
+ cfg->disable_omit_fp = debug_options.disable_omit_fp;
cfg->skip_visibility = method->skip_visibility;
cfg->orig_method = method;
cfg->gen_seq_points = debug_options.gen_seq_points_compact_data || debug_options.gen_sdb_seq_points;
return cfg;
}
- header = cfg->header = mono_method_get_header_checked (cfg->method, &err);
+ header = cfg->header = mono_method_get_header_checked (cfg->method, &cfg->error);
if (!header) {
mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
- cfg->error = err;
if (MONO_METHOD_COMPILE_END_ENABLED ())
MONO_PROBE_METHOD_COMPILE_END (method, FALSE);
return cfg;
}
}
+ /* Update llvm callees */
+ if (domain_jit_info (target_domain)->llvm_jit_callees) {
+ GSList *callees = g_hash_table_lookup (domain_jit_info (target_domain)->llvm_jit_callees, method);
+ GSList *l;
+
+ for (l = callees; l; l = l->next) {
+ gpointer *addr = (gpointer*)l->data;
+
+ *addr = code;
+ }
+ }
+
mono_emit_jit_map (jinfo);
#endif
mono_domain_unlock (target_domain);