projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a50271e
)
Fix arithmetic overflow in GC consing count
author
Paul Eggert
<eggert@day>
Sat, 27 Jul 2019 17:24:19 +0000
(10:24 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sat, 27 Jul 2019 17:24:45 +0000
(10:24 -0700)
* src/alloc.c (allow_garbage_collection):
Redo expression to avoid signed arithmetic overflow
in an intermediate expression when CONSING is negative.
src/alloc.c
patch
|
blob
|
history
diff --git
a/src/alloc.c
b/src/alloc.c
index c17bdb719a94247a0f8fe4ebaacb15172cd26580..5e089311a273788c3012834f69f2df0c6e41c206 100644
(file)
--- 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--;
}