GNU bug report logs -
#37006
27.0.50; garbage collection not happening after 26de2d42
Previous Next
Reported by: Joseph Mingrone <jrm <at> ftfl.ca>
Date: Sun, 11 Aug 2019 12:41:01 UTC
Severity: normal
Tags: patch
Found in version 27.0.50
Done: Paul Eggert <eggert <at> cs.ucla.edu>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Mattias EngdegÄrd <mattiase <at> acm.org>
> Date: Sun, 11 Aug 2019 18:23:28 +0200
> Cc: Eli Zaretskii <eliz <at> gnu.org>, Paul Eggert <eggert <at> cs.ucla.edu>,
> 37006 <at> debbugs.gnu.org
>
> 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.
I believe it should be fixed now.
This bug report was last modified 5 years and 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.