[Ecls-list] [BUG] Hash table serialization.

Samium Gromoff _deepfire at feelingofgreen.ru
Fri Nov 21 00:28:53 UTC 2008


Good day Juan,

It appears that ECL doesn't serialise hash-tables in accordance with
CLHS 3.2.4.1 Externalizable Objects and 3.2.4.2.1 Similarity of Aggregate
Objects:

reproduction.lisp:

(eval-when (:compile-toplevel :load-toplevel)
  (defstruct foo
    (x (make-hash-table)))
  (defvar foo (make-foo))
  (setf (gethash 1 (foo-x foo)) 2)
  (defmethod make-load-form ((o foo) &optional env)
    (make-load-form-saving-slots o :environment env)))

(defmacro get-foo ()
  `(let* ((hash-table (foo-x ,foo))
          (count (hash-table-count hash-table)))
     (format t "~%~%~S entries in re-loaded hash-table~%~%" count)
     count))

(defun reproduction ()
  (= (get-foo) 1))

deepfire at canopus:~$ LISP=ecl canned-test regvaldefs-62d311dd yes
Running: /usr/bin/ecl -nodebug -eval "(setf *compile-verbose* nil *compile-print* nil *break-on-signals* nil *load-verbose* nil)" -eval '(load (compile-file "reproduction.lisp"))' -eval "(if (reproduction) (si:quit #+sbcl :unix-status 0) (progn (format *error-output* \"Canned test regvaldefs-62d311dd failed.~%\") (si:quit #+sbcl :unix-status 1)))"
;;; Loading #P"/usr/lib/ecl-8.10.0/asdf.fas"
;;; Loading #P"/usr/lib/ecl-8.10.0/cmp.fas"
;;; Loading #P"/usr/lib/ecl-8.10.0/sysfun.lsp"


0 entries in re-loaded hash-table

Canned test regvaldefs-62d311dd failed.

deepfire at canopus:~$ LISP=clisp canned-test regvaldefs-62d311dd yes
Running: /usr/bin/clisp -on-error exit --quiet -x "(setf *compile-verbose* nil *compile-print* nil *break-on-signals* nil *load-verbose* nil)" -x '(load (compile-file "reproduction.lisp"))' -x "(if (reproduction) (ext:quit #+sbcl :unix-status 0) (progn (format *error-output* \"Canned test regvaldefs-62d311dd failed.~%\") (ext:quit #+sbcl :unix-status 1)))"
;; Loading file /home/deepfire/.clisprc.lisp ...
;; Loaded file /home/deepfire/.clisprc.lisp
NIL
T

1 entries in re-loaded hash-table

deepfire at canopus:~$ LISP=sbcl canned-test regvaldefs-62d311dd yes
Running: /usr/bin/sbcl --noinform --disable-debugger --eval "(setf *compile-verbose* nil *compile-print* nil *break-on-signals* nil *load-verbose* nil)" --eval '(load (compile-file "reproduction.lisp"))' --eval "(if (reproduction) (sb-ext:quit #+sbcl :unix-status 0) (progn (format *error-output* \"Canned test regvaldefs-62d311dd failed.~%\") (sb-ext:quit #+sbcl :unix-status 1)))"
; loading system definition from /usr/lib/sbcl/sb-grovel/sb-grovel.asd into
; #<PACKAGE "ASDF1">
; registering #<SYSTEM SB-GROVEL {ACDEF91}> as SB-GROVEL


1 entries in re-loaded hash-table





More information about the ecl-devel mailing list