int i;
gboolean val = FALSE;
+ if (m->wrapper_type == MONO_WRAPPER_DYNAMIC_METHOD) {
+ MonoDynamicMethod *dm = (MonoDynamicMethod *)m;
+ if (dm->assembly)
+ ass = dm->assembly;
+ }
g_assert (ass);
if (ass->wrap_non_exception_throws_inited)
return ass->wrap_non_exception_throws;
if (ei->flags == MONO_EXCEPTION_CLAUSE_FILTER) {
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->exceptions_filters++;
+ InterlockedIncrement (&mono_perfcounters->exceptions_filters);
#endif
#ifndef MONO_CROSS_COMPILE
}
mono_set_lmf (lmf);
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->exceptions_depth += frame_count;
+ InterlockedAdd (&mono_perfcounters->exceptions_depth, frame_count);
#endif
if (obj == (MonoObject *)domain->stack_overflow_ex)
jit_tls->handling_stack_ovf = FALSE;
MONO_PROFILER_RAISE (exception_clause, (method, i, ei->flags, ex_obj));
jit_tls->orig_ex_ctx_set = FALSE;
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->exceptions_finallys++;
+ InterlockedIncrement (&mono_perfcounters->exceptions_finallys);
#endif
}
if (ei->flags == MONO_EXCEPTION_CLAUSE_FAULT || ei->flags == MONO_EXCEPTION_CLAUSE_FINALLY) {
MONO_REQ_GC_UNSAFE_MODE;
#ifndef DISABLE_PERFCOUNTERS
- mono_perfcounters->exceptions_thrown++;
+ InterlockedIncrement (&mono_perfcounters->exceptions_thrown);
#endif
return mono_handle_exception_internal (ctx, obj, FALSE, NULL);
if (mono_ex->trace_ips) {
GList *trace_ips = NULL;
- gpointer ip = __builtin_return_address (0);
+ gpointer ip = MONO_RETURN_ADDRESS ();
size_t upper = mono_array_length (mono_ex->trace_ips);