Skip to content

Commit

Permalink
Clear the saved register locations when processing the last frame dur…
Browse files Browse the repository at this point in the history
…ing precise stack scanning, the registers save info is not precise for the last frame.
  • Loading branch information
vargaz committed Oct 14, 2012
1 parent e1dfad1 commit 63a5e6a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mono/mini/mini-gc.c
Expand Up @@ -801,6 +801,18 @@ conservative_pass (TlsData *tls, guint8 *stack_start, guint8 *stack_end)
}
DEBUG (fprintf (logfile, "\t <Last frame>\n"));
last = FALSE;
/*
* new_reg_locations is not precise when a method is interrupted during its epilog, so clear it.
*/
for (i = 0; i < MONO_MAX_IREGS; ++i) {
if (reg_locations [i]) {
DEBUG (fprintf (logfile, "\tscan saved reg %s location %p.\n", mono_arch_regname (i), reg_locations [i]));
mono_gc_conservatively_scan_area (reg_locations [i], (char*)reg_locations [i] + SIZEOF_SLOT);
scanned_registers += SIZEOF_SLOT;
}
reg_locations [i] = NULL;
new_reg_locations [i] = NULL;
}
continue;
}

Expand Down

0 comments on commit 63a5e6a

Please sign in to comment.