unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] GC zombies stuff fixes
@ 2011-10-12  5:08 Dmitry Antipov
  2011-10-12 12:51 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Antipov @ 2011-10-12  5:08 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2: zombie.patch --]
[-- Type: text/plain, Size: 1208 bytes --]

=== modified file 'src/ChangeLog'
--- src/ChangeLog	2011-10-11 17:35:16 +0000
+++ src/ChangeLog	2011-10-12 05:01:36 +0000
@@ -1,3 +1,9 @@
+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-11  Andreas Schwab  <schwab@linux-m68k.org>
 
 	* lisp.h (GCPRO1_VAR, GCPRO2_VAR, GCPRO3_VAR, GCPRO4_VAR)

=== modified file 'src/alloc.c'
--- src/alloc.c	2011-10-07 16:42:32 +0000
+++ src/alloc.c	2011-10-12 04:48:27 +0000
@@ -4071,7 +4071,7 @@
 {
   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);
@@ -4410,7 +4410,7 @@
 {
   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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] GC zombies stuff fixes
  2011-10-12  5:08 [PATCH] GC zombies stuff fixes Dmitry Antipov
@ 2011-10-12 12:51 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2011-10-12 12:51 UTC (permalink / raw)
  To: Dmitry Antipov; +Cc: emacs-devel

Thank you for this patch, I see Paul already installed it,


        Stefan



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-10-12 12:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-12  5:08 [PATCH] GC zombies stuff fixes Dmitry Antipov
2011-10-12 12:51 ` Stefan Monnier

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).