Skip to content

Commit

Permalink
[jit] Don't allocate memory for unused vreg
Browse files Browse the repository at this point in the history
cfg->next_vreg is not an allocated vreg
  • Loading branch information
BrzVlad committed Jan 16, 2016
1 parent 9d3604e commit 137c099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mono/mini/local-propagation.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ mono_local_cprop (MonoCompile *cfg)
restart:

max = cfg->next_vreg;
defs = (MonoInst **)mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * (cfg->next_vreg + 1));
def_index = (gint32 *)mono_mempool_alloc (cfg->mempool, sizeof (guint32) * (cfg->next_vreg + 1));
defs = (MonoInst **)mono_mempool_alloc (cfg->mempool, sizeof (MonoInst*) * cfg->next_vreg);
def_index = (gint32 *)mono_mempool_alloc (cfg->mempool, sizeof (guint32) * cfg->next_vreg);

for (bb = cfg->bb_entry; bb; bb = bb->next_bb) {
MonoInst *ins;
Expand Down

0 comments on commit 137c099

Please sign in to comment.