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);
+ mono_error_set_generic_error (&cfg->error, "System.Security", "VerificationException", "%s", msg);
if (!mono_error_ok (&cfg->error)) {
mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
g_free (msg);
if (!cfg->backend->have_tls_get)
return NULL;
+#ifdef HAVE_KW_THREAD
+ /*
+ * MONO_THREAD_VAR_OFFSET definitions don't work when loading mono as a
+ * dynamic library. This means that we need to be conservative and don't
+ * aot code that contains these tls chunks.
+ *
+ * FIXME Remove HAVE_KW_THREAD altogether and use only pthread since it
+ * simplifies the code alot.
+ */
+ if (!cfg->full_aot)
+ cfg->disable_aot = TRUE;
+#endif
/*
* TLS offsets might be different at AOT time, so load them from a GOT slot and
* use a different opcode.
#ifdef MONO_ARCH_HAVE_OBJC_GET_SELECTOR
backend->have_objc_get_selector = 1;
#endif
-#ifdef MONO_ARCH_HAVE_GENERALIZED_IMT_THUNK
- backend->have_generalized_imt_thunk = 1;
+#ifdef MONO_ARCH_HAVE_GENERALIZED_IMT_TRAMPOLINE
+ backend->have_generalized_imt_trampoline = 1;
#endif
#ifdef MONO_ARCH_GSHARED_SUPPORTED
backend->gshared_supported = 1;
#ifdef MONO_ARCH_DYN_CALL_PARAM_AREA
backend->dyn_call_param_area = MONO_ARCH_DYN_CALL_PARAM_AREA;
#endif
+#ifdef MONO_ARCH_NO_DIV_WITH_MUL
+ backend->disable_div_with_mul = 1;
+#endif
}
/*
mono_cfg_set_exception_invalid_program (MonoCompile *cfg, char *msg)
{
mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
- mono_error_set_generic_error (&cfg->error, "System", "InvalidProgramException", msg);
+ mono_error_set_generic_error (&cfg->error, "System", "InvalidProgramException", "%s", msg);
}
#endif /* DISABLE_JIT */
vtable = mono_class_vtable (target_domain, method->klass);
if (!vtable) {
- ex = mono_class_get_exception_for_failure (method->klass);
- g_assert (ex);
- mono_error_set_exception_instance (error, ex);
+ g_assert (mono_class_has_failure (method->klass));
+ mono_error_set_for_class_failure (error, method->klass);
return NULL;
}