all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Adam Porter <adam@alphapapa.net>
Cc: 32503@debbugs.gnu.org
Subject: bug#32503: 26.1; Byte-compiled functions don't hash consistently
Date: Wed, 22 Aug 2018 19:42:12 -0600	[thread overview]
Message-ID: <87efep3ll7.fsf@tromey.com> (raw)
In-Reply-To: <CAO_b3FV+BOeguJU+UFpfo6VnrJ9Q5ympyeX61RHaKQhtcyhfug@mail.gmail.com> (Adam Porter's message of "Wed, 22 Aug 2018 14:00:28 -0500")

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





  reply	other threads:[~2018-08-23  1:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-22 19:00 bug#32503: 26.1; Byte-compiled functions don't hash consistently Adam Porter
2018-08-23  1:42 ` Tom Tromey [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-01-04  1:49 bug#38912: 27.0.60; PDumper meets segmentation fault when evil is loaded NiwTinray via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-01-04  9:17 ` Eli Zaretskii
     [not found]   ` <D1473DD8-48F8-4204-80B5-BE6396B8B668@icloud.com>
2020-01-05 18:45     ` Eli Zaretskii
2020-01-06 17:10       ` Daniel Colascione
2020-03-05  7:14         ` Eli Zaretskii
2020-03-09  2:15           ` Daniel Colascione
2020-03-09  3:26             ` Eli Zaretskii
2021-06-24 16:30               ` bug#32503: 26.1; Byte-compiled functions don't hash consistently Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87efep3ll7.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=32503@debbugs.gnu.org \
    --cc=adam@alphapapa.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.