Skip to content

Commit fce5227

Browse files
authored
[mono][interp] Fix memory leaks for interpreted dynamic methods. (#88892)
* [mono] Set the 'dynamic' flag on method builders on creation so a MonoDynamicMethod is allocated instead of a MonoMethodWrapper. * [mono][interp] Fix memory leaks for interpreted dynamic methods. * Add a mempool to MonoDynamicMethod. * Modify the intepreter code to allocate from this mempool when interpreting dynamic methods.
1 parent 00b62a5 commit fce5227

10 files changed

+101
-42
lines changed

src/mono/mono/metadata/class-internals.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ struct _MonoMethodWrapper {
102102
struct _MonoDynamicMethod {
103103
MonoMethodWrapper method;
104104
MonoAssembly *assembly;
105+
MonoMemPool *mp;
105106
};
106107

107108
struct _MonoMethodPInvoke {

src/mono/mono/metadata/marshal-lightweight.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2185,12 +2185,6 @@ mb_skip_visibility_ilgen (MonoMethodBuilder *mb)
21852185
mb->skip_visibility = 1;
21862186
}
21872187

2188-
static void
2189-
mb_set_dynamic_ilgen (MonoMethodBuilder *mb)
2190-
{
2191-
mb->dynamic = 1;
2192-
}
2193-
21942188
static void
21952189
emit_synchronized_wrapper_ilgen (MonoMethodBuilder *mb, MonoMethod *method, MonoGenericContext *ctx, MonoGenericContainer *container, MonoMethod *enter_method, MonoMethod *exit_method, MonoMethod *gettypefromhandle_method)
21962190
{
@@ -3392,7 +3386,6 @@ mono_marshal_lightweight_init (void)
33923386
cb.emit_return = emit_return_ilgen;
33933387
cb.emit_vtfixup_ftnptr = emit_vtfixup_ftnptr_ilgen;
33943388
cb.mb_skip_visibility = mb_skip_visibility_ilgen;
3395-
cb.mb_set_dynamic = mb_set_dynamic_ilgen;
33963389
cb.mb_emit_exception = mb_emit_exception_ilgen;
33973390
cb.mb_emit_exception_for_error = mb_emit_exception_for_error_ilgen;
33983391
cb.mb_emit_byte = mb_emit_byte_ilgen;

src/mono/mono/metadata/marshal.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4073,7 +4073,10 @@ marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, Mono
40734073

40744074
sig = mono_method_signature_internal (method);
40754075

4076-
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
4076+
if (target_handle)
4077+
mb = mono_mb_new_dynamic (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
4078+
else
4079+
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
40774080

40784081
/*the target gchandle must be the first entry after size and the wrapper itself.*/
40794082
mono_mb_add_data (mb, target_handle);
@@ -4181,7 +4184,6 @@ marshal_get_managed_wrapper (MonoMethod *method, MonoClass *delegate_klass, Mono
41814184
mb, csig, sig->param_count + 16,
41824185
info, NULL);
41834186
} else {
4184-
get_marshal_cb ()->mb_set_dynamic (mb);
41854187
res = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
41864188
}
41874189
}
@@ -4254,7 +4256,7 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type)
42544256
mspecs = g_new0 (MonoMarshalSpec*, sig->param_count + 1);
42554257
mono_method_get_marshal_info (method, mspecs);
42564258

4257-
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
4259+
mb = mono_mb_new_dynamic (method->klass, method->name, MONO_WRAPPER_NATIVE_TO_MANAGED);
42584260
csig = mono_metadata_signature_dup_full (image, sig);
42594261
csig->hasthis = 0;
42604262
csig->pinvoke = 1;
@@ -4277,7 +4279,6 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type)
42774279
mono_marshal_emit_managed_wrapper (mb, sig, mspecs, &m, method, 0, error);
42784280
mono_error_assert_ok (error);
42794281

4280-
get_marshal_cb ()->mb_set_dynamic (mb);
42814282
method = mono_mb_create (mb, csig, sig->param_count + 16, NULL);
42824283
mono_mb_free (mb);
42834284

@@ -4292,11 +4293,10 @@ mono_marshal_get_vtfixup_ftnptr (MonoImage *image, guint32 token, guint16 type)
42924293
}
42934294

42944295
sig = mono_method_signature_internal (method);
4295-
mb = mono_mb_new (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_MANAGED);
4296+
mb = mono_mb_new_dynamic (method->klass, method->name, MONO_WRAPPER_MANAGED_TO_MANAGED);
42964297

42974298
param_count = sig->param_count + sig->hasthis;
42984299
get_marshal_cb ()->emit_vtfixup_ftnptr (mb, method, param_count, type);
4299-
get_marshal_cb ()->mb_set_dynamic (mb);
43004300

43014301
method = mono_mb_create (mb, sig, param_count, NULL);
43024302
mono_mb_free (mb);

src/mono/mono/metadata/marshal.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,6 @@ typedef struct {
351351
void (*emit_return) (MonoMethodBuilder *mb);
352352
void (*emit_vtfixup_ftnptr) (MonoMethodBuilder *mb, MonoMethod *method, int param_count, guint16 type);
353353
void (*mb_skip_visibility) (MonoMethodBuilder *mb);
354-
void (*mb_set_dynamic) (MonoMethodBuilder *mb);
355354
void (*mb_emit_exception) (MonoMethodBuilder *mb, const char *exc_nspace, const char *exc_name, const char *msg);
356355
void (*mb_emit_exception_for_error) (MonoMethodBuilder *mb, const MonoError *emitted_error);
357356
void (*mb_emit_byte) (MonoMethodBuilder *mb, guint8 op);

src/mono/mono/metadata/method-builder-ilgen.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ enum {
2929
#undef OPDEF
3030

3131
static MonoMethodBuilder *
32-
new_base_ilgen (MonoClass *klass, MonoWrapperType type)
32+
new_base_ilgen (MonoClass *klass, MonoWrapperType type, gboolean dynamic)
3333
{
3434
MonoMethodBuilder *mb;
3535
MonoMethod *m;
@@ -38,7 +38,10 @@ new_base_ilgen (MonoClass *klass, MonoWrapperType type)
3838

3939
mb = g_new0 (MonoMethodBuilder, 1);
4040

41-
mb->method = m = (MonoMethod *)g_new0 (MonoMethodWrapper, 1);
41+
if (dynamic)
42+
mb->method = m = (MonoMethod *)g_new0 (MonoDynamicMethod, 1);
43+
else
44+
mb->method = m = (MonoMethod *)g_new0 (MonoMethodWrapper, 1);
4245

4346
m->klass = klass;
4447
m->inline_info = 1;
@@ -47,6 +50,7 @@ new_base_ilgen (MonoClass *klass, MonoWrapperType type)
4750
mb->code_size = 40;
4851
mb->code = (unsigned char *)g_malloc (mb->code_size);
4952
mb->init_locals = TRUE;
53+
mb->dynamic = dynamic;
5054

5155
/* placeholder for the wrapper always at index 1 */
5256
mono_mb_add_data (mb, NULL);
@@ -109,7 +113,7 @@ create_method_ilgen (MonoMethodBuilder *mb, MonoMethodSignature *signature, int
109113
image = m_class_get_image (mb->method->klass);
110114

111115
if (mb->dynamic) {
112-
/* Allocated in reflection_methodbuilder_to_mono_method () */
116+
/* Allocated in reflection_methodbuilder_to_mono_method ()/mb_new () */
113117
method = mb->method;
114118
} else {
115119
method = (MonoMethod *)mb_alloc0 (mb, sizeof (MonoMethodWrapper));

src/mono/mono/metadata/method-builder.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ get_mb_cb (void)
7777
MonoMethodBuilder *
7878
mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType type)
7979
{
80-
MonoMethodBuilder *mb = get_mb_cb ()->new_base (klass, type);
80+
MonoMethodBuilder *mb = get_mb_cb ()->new_base (klass, type, FALSE);
8181
mb->name = (char*)name;
8282
mb->no_dup_name = TRUE;
8383
return mb;
@@ -89,7 +89,15 @@ mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType typ
8989
MonoMethodBuilder *
9090
mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type)
9191
{
92-
MonoMethodBuilder *mb = get_mb_cb ()->new_base (klass, type);
92+
MonoMethodBuilder *mb = get_mb_cb ()->new_base (klass, type, FALSE);
93+
mb->name = g_strdup (name);
94+
return mb;
95+
}
96+
97+
MonoMethodBuilder *
98+
mono_mb_new_dynamic (MonoClass *klass, const char *name, MonoWrapperType type)
99+
{
100+
MonoMethodBuilder *mb = get_mb_cb ()->new_base (klass, type, TRUE);
93101
mb->name = g_strdup (name);
94102
return mb;
95103
}

src/mono/mono/metadata/method-builder.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,17 @@ typedef struct _MonoMethodBuilder MonoMethodBuilder;
2626

2727
typedef struct {
2828
int version;
29-
MonoMethodBuilder* (*new_base) (MonoClass *klass, MonoWrapperType type);
29+
MonoMethodBuilder* (*new_base) (MonoClass *klass, MonoWrapperType type, gboolean dynamic);
3030
void (*free) (MonoMethodBuilder *mb);
3131
MonoMethod* (*create_method) (MonoMethodBuilder *mb, MonoMethodSignature *signature, int max_stack);
3232
} MonoMethodBuilderCallbacks;
3333

3434
MONO_COMPONENT_API MonoMethodBuilder *
3535
mono_mb_new (MonoClass *klass, const char *name, MonoWrapperType type);
3636

37+
MONO_COMPONENT_API MonoMethodBuilder *
38+
mono_mb_new_dynamic (MonoClass *klass, const char *name, MonoWrapperType type);
39+
3740
MonoMethodBuilder *
3841
mono_mb_new_no_dup_name (MonoClass *klass, const char *name, MonoWrapperType type);
3942

src/mono/mono/mini/interp/interp.c

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,15 @@ mono_interp_get_imethod (MonoMethod *method)
488488

489489
sig = mono_method_signature_internal (method);
490490

491-
imethod = (InterpMethod*)m_method_alloc0 (method, sizeof (InterpMethod));
491+
MonoMemPool *dyn_mp = NULL;
492+
if (method->dynamic)
493+
// FIXME: Use this in more places
494+
dyn_mp = mono_mempool_new_size (sizeof (InterpMethod));
495+
496+
if (dyn_mp)
497+
imethod = (InterpMethod*)mono_mempool_alloc0 (dyn_mp, sizeof (InterpMethod));
498+
else
499+
imethod = (InterpMethod*)m_method_alloc0 (method, sizeof (InterpMethod));
492500
imethod->method = method;
493501
imethod->param_count = sig->param_count;
494502
imethod->hasthis = sig->hasthis;
@@ -504,15 +512,22 @@ mono_interp_get_imethod (MonoMethod *method)
504512
imethod->rtype = m_class_get_byval_arg (mono_defaults.string_class);
505513
else
506514
imethod->rtype = mini_get_underlying_type (sig->ret);
507-
imethod->param_types = (MonoType**)m_method_alloc0 (method, sizeof (MonoType*) * sig->param_count);
515+
if (dyn_mp)
516+
imethod->param_types = (MonoType**)mono_mempool_alloc0 (dyn_mp, sizeof (MonoType*) * sig->param_count);
517+
else
518+
imethod->param_types = (MonoType**)m_method_alloc0 (method, sizeof (MonoType*) * sig->param_count);
508519
for (i = 0; i < sig->param_count; ++i)
509520
imethod->param_types [i] = mini_get_underlying_type (sig->params [i]);
510521

511522
jit_mm_lock (jit_mm);
512523
InterpMethod *old_imethod;
513-
if (!((old_imethod = mono_internal_hash_table_lookup (&jit_mm->interp_code_hash, method))))
524+
if (!((old_imethod = mono_internal_hash_table_lookup (&jit_mm->interp_code_hash, method)))) {
514525
mono_internal_hash_table_insert (&jit_mm->interp_code_hash, method, imethod);
515-
else {
526+
if (method->dynamic)
527+
((MonoDynamicMethod*)method)->mp = dyn_mp;
528+
} else {
529+
if (dyn_mp)
530+
mono_mempool_destroy (dyn_mp);
516531
imethod = old_imethod; /* leak the newly allocated InterpMethod to the mempool */
517532
}
518533
jit_mm_unlock (jit_mm);
@@ -1268,6 +1283,15 @@ compute_arg_offset (MonoMethodSignature *sig, int index)
12681283
return offset;
12691284
}
12701285

1286+
static gpointer
1287+
imethod_alloc0 (InterpMethod *imethod, size_t size)
1288+
{
1289+
if (imethod->method->dynamic)
1290+
return mono_mempool_alloc0 (((MonoDynamicMethod*)imethod->method)->mp, (guint)size);
1291+
else
1292+
return m_method_alloc0 (imethod->method, (guint)size);
1293+
}
1294+
12711295
static guint32*
12721296
initialize_arg_offsets (InterpMethod *imethod, MonoMethodSignature *csig)
12731297
{
@@ -1280,7 +1304,7 @@ initialize_arg_offsets (InterpMethod *imethod, MonoMethodSignature *csig)
12801304
if (!sig)
12811305
sig = mono_method_signature_internal (imethod->method);
12821306
int arg_count = sig->hasthis + sig->param_count;
1283-
guint32 *arg_offsets = (guint32*) g_malloc ((arg_count + 1) * sizeof (int));
1307+
guint32 *arg_offsets = (guint32*)imethod_alloc0 (imethod, (arg_count + 1) * sizeof (int));
12841308
int index = 0, offset = 0;
12851309

12861310
if (sig->hasthis) {
@@ -1302,8 +1326,8 @@ initialize_arg_offsets (InterpMethod *imethod, MonoMethodSignature *csig)
13021326
arg_offsets [index] = ALIGN_TO (offset, MINT_STACK_SLOT_SIZE);
13031327

13041328
mono_memory_write_barrier ();
1305-
if (mono_atomic_cas_ptr ((gpointer*)&imethod->arg_offsets, arg_offsets, NULL) != NULL)
1306-
g_free (arg_offsets);
1329+
/* If this fails, the new one is leaked in the mem manager */
1330+
mono_atomic_cas_ptr ((gpointer*)&imethod->arg_offsets, arg_offsets, NULL);
13071331
return imethod->arg_offsets;
13081332
}
13091333

@@ -3259,8 +3283,7 @@ interp_create_method_pointer_llvmonly (MonoMethod *method, gboolean unbox, MonoE
32593283

32603284
addr = mini_llvmonly_create_ftndesc (method, entry_wrapper, entry_ftndesc);
32613285

3262-
// FIXME:
3263-
MonoJitMemoryManager *jit_mm = get_default_jit_mm ();
3286+
MonoJitMemoryManager *jit_mm = jit_mm_for_method (method);
32643287
jit_mm_lock (jit_mm);
32653288
if (!jit_mm->interp_method_pointer_hash)
32663289
jit_mm->interp_method_pointer_hash = g_hash_table_new (NULL, NULL);
@@ -3438,12 +3461,24 @@ static void
34383461
interp_free_method (MonoMethod *method)
34393462
{
34403463
MonoJitMemoryManager *jit_mm = jit_mm_for_method (method);
3464+
InterpMethod *imethod;
3465+
MonoDynamicMethod *dmethod = (MonoDynamicMethod*)method;
34413466

34423467
jit_mm_lock (jit_mm);
3443-
/* InterpMethod is allocated in the domain mempool. We might haven't
3444-
* allocated an InterpMethod for this instance yet */
3468+
imethod = (InterpMethod*)mono_internal_hash_table_lookup (&jit_mm->interp_code_hash, method);
34453469
mono_internal_hash_table_remove (&jit_mm->interp_code_hash, method);
3470+
if (imethod && jit_mm->interp_method_pointer_hash) {
3471+
if (imethod->jit_entry)
3472+
g_hash_table_remove (jit_mm->interp_method_pointer_hash, imethod->jit_entry);
3473+
if (imethod->llvmonly_unbox_entry)
3474+
g_hash_table_remove (jit_mm->interp_method_pointer_hash, imethod->llvmonly_unbox_entry);
3475+
}
34463476
jit_mm_unlock (jit_mm);
3477+
3478+
if (dmethod->mp) {
3479+
mono_mempool_destroy (dmethod->mp);
3480+
dmethod->mp = NULL;
3481+
}
34473482
}
34483483

34493484
#if COUNT_OPS
@@ -8007,7 +8042,7 @@ interp_run_clause_with_il_state (gpointer il_state_ptr, int clause_index, MonoOb
80078042
imethod = mono_interp_get_imethod (il_state->method);
80088043
if (!imethod->transformed) {
80098044
// In case method is in process of being tiered up, make sure it is compiled
8010-
mono_interp_transform_method (imethod, context, error);
8045+
mono_interp_transform_method (imethod, context, error);
80118046
mono_error_assert_ok (error);
80128047
}
80138048

src/mono/mono/mini/interp/transform.c

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,15 @@ emit_ldptr (TransformData *td, gpointer data)
12871287
static MintICallSig
12881288
interp_get_icall_sig (MonoMethodSignature *sig);
12891289

1290+
static gpointer
1291+
imethod_alloc0 (TransformData *td, size_t size)
1292+
{
1293+
if (td->rtm->method->dynamic)
1294+
return mono_mempool_alloc0 (((MonoDynamicMethod*)td->rtm->method)->mp, (guint)size);
1295+
else
1296+
return mono_mem_manager_alloc0 (td->mem_manager, (guint)size);
1297+
}
1298+
12901299
static void
12911300
interp_generate_icall_throw (TransformData *td, MonoJitICallInfo *icall_info, gpointer arg1, gpointer arg2)
12921301
{
@@ -7657,7 +7666,7 @@ generate_code (TransformData *td, MonoMethod *method, MonoMethodHeader *header,
76577666
push_simple_type (td, STACK_TYPE_I);
76587667
interp_ins_set_dreg (td->last_ins, td->sp [-1].local);
76597668
/* This is a memory slot used by the wrapper */
7660-
gpointer addr = mono_mem_manager_alloc0 (td->mem_manager, sizeof (gpointer));
7669+
gpointer addr = imethod_alloc0 (td, sizeof (gpointer));
76617670
td->last_ins->data [0] = get_data_item_index (td, addr);
76627671
break;
76637672
}
@@ -8637,11 +8646,11 @@ generate_compacted_code (InterpMethod *rtm, TransformData *td)
86378646
size = compute_native_offset_estimates (td);
86388647

86398648
// Generate the compacted stream of instructions
8640-
td->new_code = ip = (guint16*)mono_mem_manager_alloc0 (td->mem_manager, size * sizeof (guint16));
8649+
td->new_code = ip = (guint16*)imethod_alloc0 (td, size * sizeof (guint16));
86418650

86428651
if (td->patchpoint_data_n) {
86438652
g_assert (mono_interp_tiering_enabled ());
8644-
td->patchpoint_data = (int*)mono_mem_manager_alloc0 (td->mem_manager, (td->patchpoint_data_n * 2 + 1) * sizeof (int));
8653+
td->patchpoint_data = (int*)imethod_alloc0 (td, (td->patchpoint_data_n * 2 + 1) * sizeof (int));
86458654
td->patchpoint_data [td->patchpoint_data_n * 2] = G_MAXINT32;
86468655
}
86478656

@@ -8697,7 +8706,7 @@ generate_compacted_code (InterpMethod *rtm, TransformData *td)
86978706

86988707
#if HOST_BROWSER
86998708
if (backward_branch_offsets_count > 0) {
8700-
rtm->backward_branch_offsets = mono_mem_manager_alloc(td->mem_manager, backward_branch_offsets_count * sizeof(guint16));
8709+
rtm->backward_branch_offsets = imethod_alloc0 (td, backward_branch_offsets_count * sizeof(guint16));
87018710
rtm->backward_branch_offsets_count = backward_branch_offsets_count;
87028711
memcpy(rtm->backward_branch_offsets, backward_branch_offsets, backward_branch_offsets_count * sizeof(guint16));
87038712
}
@@ -8709,7 +8718,7 @@ generate_compacted_code (InterpMethod *rtm, TransformData *td)
87098718
static void
87108719
interp_mark_reachable_bblocks (TransformData *td)
87118720
{
8712-
InterpBasicBlock **queue = mono_mem_manager_alloc0 (td->mem_manager, td->bb_count * sizeof (InterpBasicBlock*));
8721+
InterpBasicBlock **queue = mono_mempool_alloc0 (td->mempool, td->bb_count * sizeof (InterpBasicBlock*));
87138722
InterpBasicBlock *current;
87148723
int cur_index = 0;
87158724
int next_position = 0;
@@ -11208,7 +11217,7 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG
1120811217
code_len_u8 = GPTRDIFF_TO_UINT32 ((guint8 *) td->new_code_end - (guint8 *) td->new_code);
1120911218
code_len_u16 = GPTRDIFF_TO_UINT32 (td->new_code_end - td->new_code);
1121011219

11211-
rtm->clauses = (MonoExceptionClause*)mono_mem_manager_alloc0 (td->mem_manager, header->num_clauses * sizeof (MonoExceptionClause));
11220+
rtm->clauses = (MonoExceptionClause*)imethod_alloc0 (td, header->num_clauses * sizeof (MonoExceptionClause));
1121211221
memcpy (rtm->clauses, header->clauses, header->num_clauses * sizeof(MonoExceptionClause));
1121311222
rtm->code = (gushort*)td->new_code;
1121411223
rtm->init_locals = header->init_locals;
@@ -11232,6 +11241,8 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG
1123211241
rtm->alloca_size = td->total_locals_size + td->max_stack_size;
1123311242
g_assert ((rtm->alloca_size % MINT_STACK_ALIGNMENT) == 0);
1123411243
rtm->locals_size = td->param_area_offset;
11244+
// FIXME: Can't allocate this using imethod_alloc0 as its registered with mono_interp_register_imethod_data_items ()
11245+
//rtm->data_items = (gpointer*)imethod_alloc0 (td, td->n_data_items * sizeof (td->data_items [0]));
1123511246
rtm->data_items = (gpointer*)mono_mem_manager_alloc0 (td->mem_manager, td->n_data_items * sizeof (td->data_items [0]));
1123611247
memcpy (rtm->data_items, td->data_items, td->n_data_items * sizeof (td->data_items [0]));
1123711248

@@ -11245,7 +11256,7 @@ generate (MonoMethod *method, MonoMethodHeader *header, InterpMethod *rtm, MonoG
1124511256
int jinfo_len;
1124611257
jinfo_len = mono_jit_info_size ((MonoJitInfoFlags)0, header->num_clauses, 0);
1124711258
MonoJitInfo *jinfo;
11248-
jinfo = (MonoJitInfo *)mono_mem_manager_alloc0 (td->mem_manager, jinfo_len);
11259+
jinfo = (MonoJitInfo *)imethod_alloc0 (td, jinfo_len);
1124911260
jinfo->is_interp = 1;
1125011261
rtm->jinfo = jinfo;
1125111262
mono_jit_info_init (jinfo, method, (guint8*)rtm->code, code_len_u8, (MonoJitInfoFlags)0, header->num_clauses, 0);

0 commit comments

Comments
 (0)