On 8/3/06, Daishi Kato <[EMAIL PROTECTED]> wrote:
Now, I can reproduce the problem.

% cat dump.scm
(use s11n)
(define x (make-hash-table))
(hash-table-set! x 'aaa (make-hash-table))
(hash-table-set! x 'bbb (make-hash-table))
(with-output-to-file "dump"
  (lambda ()
    (serialize x)))
% cat undump.scm
(use s11n)
(define (deserialize-fallback id)
  (cond ((string=? id "f_3497library.scm") ; chicken-2.315
         equal?)
        ((string=? id "f_6914extras.scm") ; chicken-2.315
         hash)
        (else
         (error "deserialize-fallback unknown id" id))))
(with-input-from-file "dump"
  (lambda ()
    (deserialize (current-input-port) deserialize-fallback)))
% /usr/local/chicken-2.315/bin/csi -q -s dump.scm
% /usr/local/chicken-2.41/bin/csi -q -s undump.scm
Error: (for-each) argument is not a proper list: ((aaa .
#<hash-table>) . #<procedure (hash x1094 . g10931095)>)

        Call history:

        <eval>          (##sys#require (quote s11n))
        <eval>          (with-input-from-file "dump" (lambda ()
(deserialize (current-input-port) deserialize-fallback)))
        <eval>          (deserialize (current-input-port) deserialize-fallback)
        <eval>          (current-input-port)
        <eval>          [deserialize-fallback] (string=? id "f_3497library.scm")
        <eval>          [deserialize-fallback] (string=? id "f_3497library.scm")
        <eval>          [deserialize-fallback] (string=? id
"f_6914extras.scm")<--

I can't say much about this problem. As I already said, the procedure-IDs
might be re-used, so this approach is definitely not safe.


cheers,
felix


--
http://galinha.ucpel.tche.br:8081/blog/blog.ssp


_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to