Commit 94644d86 authored by Eli Zaretskii's avatar Eli Zaretskii
Browse files

Fix garbage collection

* src/alloc.c (free_cons): Avoid false positives in
INT_ADD_WRAPV.  (Bug#37006)
parent 73877cb3
Pipeline #2815 passed with stage
in 54 minutes and 56 seconds
......@@ -2542,7 +2542,9 @@ free_cons (struct Lisp_Cons *ptr)
ptr->u.s.u.chain = cons_free_list;
ptr->u.s.car = dead_object ();
cons_free_list = ptr;
if (INT_ADD_WRAPV (consing_until_gc, sizeof *ptr, &consing_until_gc))
if (consing_until_gc <= 0)
consing_until_gc += sizeof *ptr;
else if (INT_ADD_WRAPV (consing_until_gc, sizeof *ptr, &consing_until_gc))
consing_until_gc = OBJECT_CT_MAX;
gcstat.total_free_conses++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment