diff options
| author | Dmitry Antipov | 2011-10-11 23:09:40 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-10-11 23:09:40 -0700 |
| commit | 6e4b3fbe6d9b580ac32f78590eb14aa9dff90b22 (patch) | |
| tree | 036cde16cef4b11ab3a58f6f35e100d482fb2cda /src | |
| parent | b5525cacc35f18d13ee38e437c9bd362e9c06640 (diff) | |
| download | emacs-6e4b3fbe6d9b580ac32f78590eb14aa9dff90b22.tar.gz emacs-6e4b3fbe6d9b580ac32f78590eb14aa9dff90b22.zip | |
* alloc.c (Fgc_status): Do not access beyond zombies array
boundary if nzombies > MAX_ZOMBIES.
* alloc.c (dump_zombies): Add missing format specifier.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/alloc.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 8b4f56dd8c2..5dc440d0430 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2011-10-12 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * alloc.c (Fgc_status): Do not access beyond zombies array | ||
| 4 | boundary if nzombies > MAX_ZOMBIES. | ||
| 5 | * alloc.c (dump_zombies): Add missing format specifier. | ||
| 6 | |||
| 1 | 2011-10-12 Paul Eggert <eggert@cs.ucla.edu> | 7 | 2011-10-12 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 8 | ||
| 3 | * xdisp.c (set_cursor_from_row): Simplify conditionals, | 9 | * xdisp.c (set_cursor_from_row): Simplify conditionals, |
diff --git a/src/alloc.c b/src/alloc.c index 09ef4b085df..6e999a0ba6d 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4071,7 +4071,7 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", | |||
| 4071 | { | 4071 | { |
| 4072 | Lisp_Object args[8], zombie_list = Qnil; | 4072 | Lisp_Object args[8], zombie_list = Qnil; |
| 4073 | EMACS_INT i; | 4073 | EMACS_INT i; |
| 4074 | for (i = 0; i < nzombies; i++) | 4074 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); i++) |
| 4075 | zombie_list = Fcons (zombies[i], zombie_list); | 4075 | zombie_list = Fcons (zombies[i], zombie_list); |
| 4076 | args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S"); | 4076 | args[0] = build_string ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%), max %d/%d\nzombies: %S"); |
| 4077 | args[1] = make_number (ngcs); | 4077 | args[1] = make_number (ngcs); |
| @@ -4410,7 +4410,7 @@ dump_zombies (void) | |||
| 4410 | { | 4410 | { |
| 4411 | int i; | 4411 | int i; |
| 4412 | 4412 | ||
| 4413 | fprintf (stderr, "\nZombies kept alive = %"pI":\n", nzombies); | 4413 | fprintf (stderr, "\nZombies kept alive = %"pI"d:\n", nzombies); |
| 4414 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i) | 4414 | for (i = 0; i < min (MAX_ZOMBIES, nzombies); ++i) |
| 4415 | { | 4415 | { |
| 4416 | fprintf (stderr, " %d = ", i); | 4416 | fprintf (stderr, " %d = ", i); |