unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Pip Cet <pipcet@gmail.com>
To: Daniel Colascione <dancol@dancol.org>, emacs-devel@gnu.org
Cc: niwtrx@icloud.com, 38912@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
Subject: Re: bug#38912: 27.0.60; PDumper meets segmentation fault when evil is loaded
Date: Mon, 6 Jan 2020 17:13:40 +0000	[thread overview]
Message-ID: <CAOqdjBfekLB8ZaDOA3Zys5u83KkSQnb51ZcM0FVSXrcv9ZDeBQ@mail.gmail.com> (raw)
In-Reply-To: <8b2e879676c6ecc1371d50e033164424.squirrel@dancol.org>

Summary, since I'm CCing emacs-devel:

For bytecode objects, equal-equality does not imply sxhash-equality.
That led to an assertion failure in the pdumper code, even though the
pdumper code itself is apparently correct; it simply does not allow
for paradoxical behavior of hash tables with bytecode keys. (The
muffled sound you hear in the background is my trying not to point out
that eq-vs-eql leads to similar paradoxes).

On Mon, Jan 6, 2020 at 5:01 PM Daniel Colascione <dancol@dancol.org> wrote:
> >> Again, I doubt this is related to the original bug. That `equal'
> >> behaves weirdly like this is a problem I've mentioned before (when
> >> (equal a b) signals but (equal b a) succeeds), but the consensus then
> >> was not to change it, so it's possible this is only the rehashing
> >> check needing to be more careful.
> This consensus is wrong. We need to make equality imply sxhash equality or
> very odd things (like this) will happen.

I agree absolutely, of course, and maybe there's a consensus for
fixing equal for bytecodes but leaving it unfixed for cases in which
(equal a b) signals but (equal b a) does not.

> C++ and Java both require this
> relationship between hash code equality and object equality, and we should
> too.

We do document it, we just don't obey our documented API.

> Can we just fix the bytecode sxhash bug?

Is it too late to fix this for Emacs 27? If the answer is no, would a
good fix be to make equal=eq for bytecode objects? That should come
close to the old behavior, and we can fix things properly (by fixing
sxhash to hash byte code objects) on master.



       reply	other threads:[~2020-01-06 17:13 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <333553AC-68DE-4F1C-9586-5A13248AD6DD@icloud.com>
     [not found] ` <83ftgvh96l.fsf@gnu.org>
     [not found]   ` <D1473DD8-48F8-4204-80B5-BE6396B8B668@icloud.com>
     [not found]     ` <83a771g2tc.fsf@gnu.org>
     [not found]       ` <CAOqdjBfjpSqhDcMiHGQfaOGZEodmjmvhQionRPO1OQ0sVsLDPg@mail.gmail.com>
     [not found]         ` <83o8vgee85.fsf@gnu.org>
     [not found]           ` <8b2e879676c6ecc1371d50e033164424.squirrel@dancol.org>
2020-01-06 17:13             ` Pip Cet [this message]
2020-01-07  2:38               ` bug#38912: 27.0.60; PDumper meets segmentation fault when evil is loaded Paul Eggert
2020-01-07  3:34                 ` dancol
2020-01-07 14:16                   ` Stefan Monnier
2020-01-07 19:32                     ` Paul Eggert
2020-01-07 15:47                 ` Eli Zaretskii
2020-01-07 17:37                   ` Stefan Monnier
2020-01-07 17:43                     ` Eli Zaretskii
2020-01-07 18:01                       ` Stefan Monnier
2020-01-07 18:11                         ` Eli Zaretskii
2020-01-07 18:47                           ` Stefan Monnier
2020-01-07 18:29                         ` martin rudalics
2020-01-07 18:43                           ` Stefan Monnier
2020-01-07 18:58                             ` martin rudalics

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=CAOqdjBfekLB8ZaDOA3Zys5u83KkSQnb51ZcM0FVSXrcv9ZDeBQ@mail.gmail.com \
    --to=pipcet@gmail.com \
    --cc=38912@debbugs.gnu.org \
    --cc=dancol@dancol.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=niwtrx@icloud.com \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).