bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#37006: 27.0.50; garbage collection not happening after 26de2d42


From: Mattias Engdegård
Subject: bug#37006: 27.0.50; garbage collection not happening after 26de2d42
Date: Sun, 11 Aug 2019 18:23:28 +0200

Observed on macOS as well. Reason: free_cons has the condition

 if (INT_ADD_WRAPV (consing_until_gc, sizeof *ptr, &consing_until_gc))

which will return true (overflow) if consing_until_gc is negative, which is 
kind of defensible since sizeof is unsigned which causes the sum 
(consing_until_gc + sizeof *ptr) to be a large unsigned number that doesn't fit 
into consing_until_gc.

Clang 10 defines __GNUC__ to 4 which causes intprops.h to not use 
__builtin_add_overflow despite that being present and working.

Casting the sizeof should fix it; patch attached.

Attachment: 0001-Avoid-unsigned-addend-in-overflow-check-bug-37006.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]