From 412e50e30688df9157dedb14d6618022e079f518 Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Thu, 15 Aug 2024 13:55:51 -0500 Subject: [PATCH] common-lisp: update ubuntu 24.04. Fix key hashing bug. Newer versions of sbcl now have the same sxhash issue on compound types as the other common lisp implementations. So always dereference the underlying base type when generating a hash. This fixes the bug in newer sbcl that was resulting in `get` and `contains?` not working for hash-maps. --- impls/common-lisp/Dockerfile | 2 +- impls/common-lisp/src/types.lisp | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/impls/common-lisp/Dockerfile b/impls/common-lisp/Dockerfile index 36019b78b4..36854ea428 100644 --- a/impls/common-lisp/Dockerfile +++ b/impls/common-lisp/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.04 MAINTAINER Joel Martin ########################################################## diff --git a/impls/common-lisp/src/types.lisp b/impls/common-lisp/src/types.lisp index f9f05a232d..6709c5e855 100644 --- a/impls/common-lisp/src/types.lisp +++ b/impls/common-lisp/src/types.lisp @@ -182,11 +182,9 @@ (defun make-mal-value-hash-table () (unless (gethash 'mal-data-value-hash genhash::*hash-test-designator-map*) - ;; ECL, ABCL and MKCL's implementations of sxhash do not work well with - ;; compound types, use a custom hash function which hashes the underlying - ;; value instead - (let ((hash-function #+(or ecl abcl mkcl) #'mal-sxhash - #-(or ecl abcl mkcl) #'sxhash)) + ;; sxhash does not work well with compound types, use a custom + ;; hash function which hashes the underlying value instead + (let ((hash-function #'mal-sxhash)) (register-test-designator 'mal-data-value-hash hash-function #'mal-data-value=)))