From 2c0bac868a7aefe7dafd2362cce42a7d3738319f Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 29 May 2020 12:56:16 -0700 Subject: [PATCH 1/2] =?UTF-8?q?Remove=20=E2=80=98maybe=5Flisp=5Fpointer?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s an invalid optimization, since pointers can address the middle of Lisp_Object data. * src/alloc.c (maybe_lisp_pointer): Remove. Only use removed. Do not merge to master, as we’ll put in a better fix there. --- src/alloc.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/alloc.c b/src/alloc.c index 1c6b664b22..b8382aca5b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4585,18 +4585,6 @@ mark_maybe_objects (Lisp_Object const *array, ptrdiff_t nelts) mark_maybe_object (*array); } -/* Return true if P might point to Lisp data that can be garbage - collected, and false otherwise (i.e., false if it is easy to see - that P cannot point to Lisp data that can be garbage collected). - Symbols are implemented via offsets not pointers, but the offsets - are also multiples of LISP_ALIGNMENT. */ - -static bool -maybe_lisp_pointer (void *p) -{ - return (uintptr_t) p % LISP_ALIGNMENT == 0; -} - /* If P points to Lisp data, mark that as live if it isn't already marked. */ @@ -4609,9 +4597,6 @@ mark_maybe_pointer (void *p) VALGRIND_MAKE_MEM_DEFINED (&p, sizeof (p)); #endif - if (!maybe_lisp_pointer (p)) - return; - if (pdumper_object_p (p)) { int type = pdumper_find_object_type (p); -- 2.17.1