From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: gmane.emacs.bugs
Subject: bug#27057: 26.0.50; Equal defstruct objects not recognized in puthash
Date: Wed, 24 May 2017 11:39:56 -0400
Message-ID: <jwvvaoqtgab.fsf@pastel>
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain
X-Trace: blaine.gmane.org 1495640541 25019 195.159.176.226 (24 May 2017 15:42:21 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Wed, 24 May 2017 15:42:21 +0000 (UTC)
To: 27057@debbugs.gnu.org
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 24 17:42:17 2017
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Envelope-to: geb-bug-gnu-emacs@m.gmane.org
Original-Received: from lists.gnu.org ([208.118.235.17])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dDYQR-0006NL-HR
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 May 2017 17:42:15 +0200
Original-Received: from localhost ([::1]:55558 helo=lists.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>)
	id 1dDYQX-0005Tc-1M
	for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 May 2017 11:42:21 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42731)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dDYPJ-0004SP-P1
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:41:06 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dDYPG-0000Dp-Kh
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:41:05 -0400
Original-Received: from debbugs.gnu.org ([208.118.235.43]:33706)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
	(Exim 4.71) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
	id 1dDYPG-0000Dg-Bm
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:41:02 -0400
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
	(envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1dDYPG-0003YA-67
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:41:02 -0400
X-Loop: help-debbugs@gnu.org
Resent-From: Stefan Monnier <monnier@iro.umontreal.ca>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Wed, 24 May 2017 15:41:02 +0000
Resent-Message-ID: <handler.27057.B.149564041313577@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: report 27057
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: 
X-Debbugs-Original-To: bug-gnu-emacs@gnu.org
Original-Received: via spool by submit@debbugs.gnu.org id=B.149564041313577
	(code B ref -1); Wed, 24 May 2017 15:41:02 +0000
Original-Received: (at submit) by debbugs.gnu.org; 24 May 2017 15:40:13 +0000
Original-Received: from localhost ([127.0.0.1]:36383 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1dDYOT-0003Wv-2R
	for submit@debbugs.gnu.org; Wed, 24 May 2017 11:40:13 -0400
Original-Received: from eggs.gnu.org ([208.118.235.92]:51323)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <monnier@iro.umontreal.ca>) id 1dDYOR-0003Wg-Jo
	for submit@debbugs.gnu.org; Wed, 24 May 2017 11:40:12 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <monnier@iro.umontreal.ca>) id 1dDYOI-0008Iq-N0
	for submit@debbugs.gnu.org; Wed, 24 May 2017 11:40:06 -0400
Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:43436)
	by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <monnier@iro.umontreal.ca>)
	id 1dDYOI-0008Ia-Kc
	for submit@debbugs.gnu.org; Wed, 24 May 2017 11:40:02 -0400
Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42254)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <monnier@iro.umontreal.ca>) id 1dDYOH-0003mc-Jn
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:40:02 -0400
Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <monnier@iro.umontreal.ca>) id 1dDYOE-0008G2-FH
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:40:01 -0400
Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:64333)
	by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
	(Exim 4.71) (envelope-from <monnier@iro.umontreal.ca>)
	id 1dDYOE-0008F9-A7
	for bug-gnu-emacs@gnu.org; Wed, 24 May 2017 11:39:58 -0400
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: A0BAFAAPqCVZ/7vmSC1cHgYMg1VCW4Nyi1mREQGCO4oSiH6CDxyGAgSCcUEXAQIBAQEBAQEBayhCAQQJAYUkXxMhARwNil2ce5Ixi3GRCYUmBZ4jlRaJDYZ8lE4hATWBCi8gCC+EbQELQx2BfySBWYRxgw8BAQE
X-IPAS-Result: A0BAFAAPqCVZ/7vmSC1cHgYMg1VCW4Nyi1mREQGCO4oSiH6CDxyGAgSCcUEXAQIBAQEBAQEBayhCAQQJAYUkXxMhARwNil2ce5Ixi3GRCYUmBZ4jlRaJDYZ8lE4hATWBCi8gCC+EbQELQx2BfySBWYRxgw8BAQE
X-IronPort-AV: E=Sophos;i="5.38,386,1491278400"; d="scan'208";a="313484259"
Original-Received: from 45-72-230-187.cpe.teksavvy.com (HELO pastel.home)
	([45.72.230.187])
	by smtp.teksavvy.com with ESMTP; 24 May 2017 11:39:56 -0400
Original-Received: by pastel.home (Postfix, from userid 20848)
	id 5AFA562DA8; Wed, 24 May 2017 11:39:56 -0400 (EDT)
X-Debbug-Cc: Michael.Albinus@gmx.de (Michael Albinus),
	Lars Brinkhoff <lars@nocrew.org>,
	Stefan Monnier <monnier@iro.umontreal.ca>
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
	recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 208.118.235.43
X-BeenThere: bug-gnu-emacs@gnu.org
List-Id: "Bug reports for GNU Emacs,
	the Swiss army knife of text editors" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/bug-gnu-emacs/>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
	<mailto:bug-gnu-emacs-request@gnu.org?subject=subscribe>
Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org
Original-Sender: "bug-gnu-emacs"
	<bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org>
Xref: news.gmane.org gmane.emacs.bugs:132793
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/132793>

Package: Emacs
Version: 26.0.50

It looks like the new records-based code introduced a bug in the way
records are handled as keys in hash-tables when the test is `equal`:

    (progn
      (cl-defstruct sm-foo a b)
      (setq sm-hash (make-hash-table :test 'equal))
      (puthash (make-sm-foo :a 4 :b 6) "test1" sm-hash)
      (puthash (make-sm-foo :a 4 :b 6) "test2" sm-hash)
      (hash-table-count sm-hash))

this code return 2 here instead of 1.  Lars, could you take a look at it?


        Stefan