[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master c26469d: Fix arithmetic overflow in GC consing coun
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master c26469d: Fix arithmetic overflow in GC consing count |
Date: |
Sat, 27 Jul 2019 13:24:49 -0400 (EDT) |
branch: master
commit c26469daa752baf276bcad61b042b218402547de
Author: Paul Eggert <eggert@day>
Commit: Paul Eggert <address@hidden>
Fix arithmetic overflow in GC consing count
* src/alloc.c (allow_garbage_collection):
Redo expression to avoid signed arithmetic overflow
in an intermediate expression when CONSING is negative.
---
src/alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/alloc.c b/src/alloc.c
index c17bdb7..5e08931 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5498,7 +5498,7 @@ staticpro (Lisp_Object const *varaddress)
static void
allow_garbage_collection (intmax_t consing)
{
- consing_until_gc -= OBJECT_CT_MAX - consing;
+ consing_until_gc = consing - (OBJECT_CT_MAX - consing_until_gc);
garbage_collection_inhibited--;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master c26469d: Fix arithmetic overflow in GC consing count,
Paul Eggert <=