GNU bug report logs - #26639
26.0.50; sxhash gives non-equal values for equal records

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Mon, 24 Apr 2017 14:51:01 UTC

Severity: normal

Tags: confirmed

Merged with 27057

Found in version 26.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Damien Cassou <damien <at> cassou.me>
Cc: 26639 <at> debbugs.gnu.org
Subject: bug#26639: 26.0.50; gethash can't find value from equal key
Date: Mon, 24 Apr 2017 19:05:12 +0200
On Apr 24 2017, Damien Cassou <damien <at> cassou.me> wrote:

> In emacs built from master today (53f8f4bf), evaluate this in the
> scratch buffer of `emacs -Q`:
>
> (cl-defstruct foo slot1 slot2)
> (setq foo1 (make-foo :slot1 "abc" :slot2 "cba"))
> (setq foo2 (make-foo :slot1 "abc" :slot2 "cba"))
>
> (equal foo1 foo2) ;; should be t

Looks like sxhash doesn't correctly handle records:

(= (sxhash foo1) (sxhash foo2)) => nil

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




This bug report was last modified 7 years and 363 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.