GNU bug report logs -
#32503
26.1; Byte-compiled functions don't hash consistently
Previous Next
Reported by: Adam Porter <adam <at> alphapapa.net>
Date: Wed, 22 Aug 2018 19:01:02 UTC
Severity: normal
Merged with 38912
Found in versions 26.1, 27.0.60
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 32503 <at> debbugs.gnu.org (full text, mbox):
Adam> I noticed that byte-compiled functions don't hash consistently.
The Lisp_Vectorlike case in Fequal has a number of special cases which
don't seem to be reflected in sxhash:
if (OVERLAYP (o1))
[...]
if (MARKERP (o1))
[...]
if (WINDOW_CONFIGURATIONP (o1))
[...]
/* Aside from them, only true vectors, char-tables, compiled
functions, and fonts (font-spec, font-entity, font-object)
are sensible to compare, so eliminate the others now. */
(Bignums and bool vectors are special-cased as well but are handled in
sxhash.) This is followed by code to loop over the pseudovector's
elements.
However, the Lisp_Vectorlike case in sxhash doesn't do any of this.
Probably there should be a rule that adding a new type should
necessitate adding a new hasher (much like how print syntax is needed);
or certainly if the type has non-trivial equal behavior.
Tom
This bug report was last modified 3 years and 20 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.