+2011-10-12 Dmitry Antipov <dmantipov@yandex.ru>
+
+ * alloc.c (Fgc_status): Do not access beyond zombies array
+ boundary if nzombies > MAX_ZOMBIES.
+ * alloc.c (dump_zombies): Add missing format specifier.
+
2011-10-12 Paul Eggert <eggert@cs.ucla.edu>
* xdisp.c (set_cursor_from_row): Simplify conditionals,
{
Lisp_Object args[8], zombie_list = Qnil;
EMACS_INT i;
- for (i = 0; i < nzombies; i++)
+ for (i = 0; i < min (MAX_ZOMBIES, nzombies); i++)
zombie_list = Fcons (zombies[i], zombie_list);
args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S");
args[1] = make_number (ngcs);
{
int i;
- fprintf (stderr, "\nZombies kept alive = %"pI":\n", nzombies);
+ fprintf (stderr, "\nZombies kept alive = %"pI"d:\n", nzombies);
for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i)
{
fprintf (stderr, " %d = ", i);