bug with equalp hash-table?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Undecided
|
Douglas Katzman |
Bug Description
According to the Spec, equalp should not distinguish between arrays depending on element-type and I guess the same should be true for equalp hash tables. Thus the following should probably return T,T:
(let ((table (make-hash-table :test 'equalp)))
(let ((x (vector 1.0d0 1.0d0))
(y (make-array 2 :element-type 'double-float :initial-contents '(1.0d0 1.0d0))))
(setf (gethash x table) t)
(gethash y table)))
It does so in SBCL 2.0.1. However, in recent SBCLs (I compiled SBCL 2.1.8.7-fb7df1c4d from source) it returns NIL,NIL.
uname -a
Linux mini 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
*features*
(:SWANK :QUICKLISP :ASDF3.3 :ASDF3.2 :ASDF3.1 :ASDF3 :ASDF2 :ASDF :OS-UNIX
:NON-BASE-
:COMMON-LISP :ELF :IEEE-FLOATING-
:PACKAGE-
:SBCL :UNIX)
Changed in sbcl: | |
assignee: | nobody → Douglas Katzman (dougk) |
Changed in sbcl: | |
status: | New → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
looks like e63feff826 should have used a psxhash where it used sxhash.
The fix isn't just that though, because to do it so simply would essentially nullify the effect of the change as far as avoiding consing