hash-table fails to remove key

Bug #1865094 reported by Eric Diethelm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
High
Douglas Katzman

Bug Description

When using a hash-table as key in another hash-table with :test #'equal, removing the key fails.

Code to reproduce:
(let ((object (make-hash-table))
      (store (make-hash-table :test #'equal)))
 (format t "Add: ~a~%" (setf (gethash object store) '(1 2 3)))
 (format t "Seek: ~a~%" (gethash object store))
 (format t "Remove: ~a~%" (remhash object store)))

Output:
Add: (1 2 3)
Seek: (1 2 3)
Remove: NIL

Expected output:
Add: (1 2 3)
Seek: (1 2 3)
Remove: T

Note: The expected behaviour - successfully removing the key - worked with SBCL 1.5.4 under Linux and Windows 7.

SBCL Versions:
2.0.0 on Windows 7
2.0.1 on Linux

uname -a
Linux laptop-eric 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux

*FEATURES*
(:CLOSER-MOP :5AM :SBCL-DEBUG-PRINT-VARIABLE-ALIST :BORDEAUX-THREADS
 ALEXANDRIA.1.0.0::SEQUENCE-EMPTYP :THREAD-SUPPORT :SWANK :QUICKLISP
 :SB-BSD-SOCKETS-ADDRINFO :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF
 :OS-UNIX :NON-BASE-CHARS-EXIST-P :ASDF-UNICODE :X86-64 :64-BIT :ANSI-CL
 :COMMON-LISP :ELF :GENCGC :IEEE-FLOATING-POINT :LINUX :LITTLE-ENDIAN
 :PACKAGE-LOCAL-NICKNAMES :SB-LDB :SB-PACKAGE-LOCKS :SB-THREAD :SB-UNICODE
 :SBCL :UNIX)

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Confirmed
importance: Undecided → High
Douglas Katzman (dougk)
Changed in sbcl:
assignee: nobody → Douglas Katzman (dougk)
Stas Boukarev (stassats)
Changed in sbcl:
status: Confirmed → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.