[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 556cc72: Improve C-h C-h bug fix
From: |
Paul Eggert |
Subject: |
master 556cc72: Improve C-h C-h bug fix |
Date: |
Sun, 16 Feb 2020 14:37:12 -0500 (EST) |
branch: master
commit 556cc727e5076d590f8286406e4f46cff3cee41e
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
Improve C-h C-h bug fix
* src/lread.c (read1): Guard against two 'struct Lisp_Vector *'
pointers differing only in their most significant bit. Problem
reported by Pip Cet (Bug#39529#22).
---
src/lread.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/src/lread.c b/src/lread.c
index 1613719..70984d3 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2982,10 +2982,13 @@ read1 (Lisp_Object readcharfun, int *pch, bool
first_in_list)
as 0. This placeholder 0 would lead to accidental sharing in
purecopy's hash-consing, so replace it with a (hopefully)
unique integer placeholder, which is negative so that it is
- not confused with a DOC file offset. Eventually
- Snarf-documentation should replace the placeholder with the
- actual docstring. */
- EMACS_UINT hash = XHASH (tmp) | (INTMASK - INTMASK / 2);
+ not confused with a DOC file offset (the USE_LSB_TAG shift
+ relies on the fact that VALMASK is one bit narrower than
+ INTMASK). Eventually Snarf-documentation should replace the
+ placeholder with the actual docstring. */
+ verify (INTMASK & ~VALMASK);
+ EMACS_UINT hash = ((XHASH (tmp) >> USE_LSB_TAG)
+ | (INTMASK - INTMASK / 2));
ASET (tmp, COMPILED_DOC_STRING, make_ufixnum (hash));
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 556cc72: Improve C-h C-h bug fix,
Paul Eggert <=